Giter Site home page Giter Site logo

s2's Introduction

spatstat

CRAN_Status_Badge GitHub R package version Travis-CI Build Status codecov.io appveyor build status

What is spatstat?

spatstat is a family of R packages for analysing spatial point pattern data (and other kinds of spatial data). It has extensive capabilities for exploratory analysis, statistical modelling, simulation and statistical inference.

See the website www.spatstat.org or read the book.

spatstat has been split into a family of packages

Originally there was a single package called spatstat. It grew so large that CRAN required us to split it into pieces.

The original spatstat has now been divided into a family of sub-packages:

Sub-package CRAN page GitHub repository Description
spatstat.utils CRAN_Status_Badge GitHub R package version Basic utilities
spatstat.data CRAN_Status_Badge GitHub R package version Datasets
spatstat.sparse CRAN_Status_Badge GitHub R package version Sparse arrays
spatstat.geom CRAN_Status_Badge GitHub R package version Spatial data classes; geometrical operations
spatstat.random CRAN_Status_Badge GitHub R package version Generation of random patterns
spatstat.explore CRAN_Status_Badge GitHub R package version Exploratory Data Analysis of spatial data
spatstat.model CRAN_Status_Badge GitHub R package version Parametric modelling and formal inference for spatial data
spatstat.linnet CRAN_Status_Badge GitHub R package version Spatial analysis on a linear network
spatstat CRAN_Status_Badge GitHub R package version Umbrella package

Click the green badge to visit the CRAN page which contains the current release of each sub-package. Click the blue badge to visit the GitHub repository for the current development version of the sub-package.

There still exists a package called spatstat, which is now an umbrella package that requires all the sub-packages listed above.

You can install and load the new spatstat family in virtually the same way as you would previously have installed and loaded the old spatstat package. When you install the new umbrella package spatstat, all the sub-packages listed above will be installed. When you load the new umbrella spatstat package in an R session, all the sub-packages listed above will be loaded or imported.

Extension packages

Additionally there are extension packages which contain more functionality. These packages are not automatically installed or loaded; the user must do that if these extra features are desired.

Extension package CRAN page GitHub repository Description
spatstat.gui CRAN_Status_Badge GitHub R package version Graphical interface
spatstat.Knet CRAN_Status_Badge GitHub R package version linear networks
spatstat.local CRAN_Status_Badge GitHub R package version Local (geographically weighted) models
spatstat.sphere Not yet published GitHub R package version Spherical data

Family portrait

The pink box marked spatstat contains all the code that will be installed when you install the spatstat umbrella package, and loaded or imported when you load the spatstat umbrella package.

The blue boxes are extension packages which must be installed and loaded separately.

Spatstat pieces

Future development

spatstat is the result of 30 years of software development and contains over 180,000 lines of code. It is still under development, motivated by the needs of researchers in many fields, and driven by innovations in statistical science. We welcome contributions of code, and suggestions for improvements.

s2's People

Contributors

edzer avatar jeroen avatar rubak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

s2's Issues

Linking to openssl 1.1 on Debian not working

The package doesn't compile on Debian with openssl 1.1 which can be tested with rhub::check (with the root of the s2 package as current working directory):

rhub::check(platform = "debian-gcc-devel")

The problem arises when exactfloat.cc is compiled

g++ -std=gnu++11 -I/opt/R-devel/lib/R/include -DNDEBUG -DS2_USE_EXACTFLOAT -DHASH_NAMESPACE=std -DNDEBUG -I./geometry -I./geometry/s2 -I/usr/local/include -I"/home/docker/R/Rcpp/include"  -pthread -fpic  -Wall -pedantic -c geometry/util/math/exactfloat/exactfloat.cc -o geometry/util/math/exactfloat/exactfloat.o
In file included from geometry/util/math/exactfloat/exactfloat.cc:3:0:
./geometry/util/math/exactfloat/exactfloat.h:502:10: error: field ‘bn_’ has incomplete type ‘BIGNUM {aka bignum_st}’
   BIGNUM bn_;
          ^~~
In file included from /usr/include/openssl/bn.h:32:0,
                 from ./geometry/util/math/exactfloat/exactfloat.h:108,
                 from geometry/util/math/exactfloat/exactfloat.cc:3:
/usr/include/openssl/ossl_typ.h:80:16: note: forward declaration of ‘BIGNUM {aka struct bignum_st}’
 typedef struct bignum_st BIGNUM;
                ^~~~~~~~~
In file included from geometry/util/math/exactfloat/exactfloat.cc:3:0:
./geometry/util/math/exactfloat/exactfloat.h: In constructor ‘ExactFloat::ExactFloat()’:
./geometry/util/math/exactfloat/exactfloat.h:562:15: error: ‘BN_init’ was not declared in this scope
   BN_init(&bn_);
               ^
geometry/util/math/exactfloat/exactfloat.cc: In function ‘int BN_ext_count_low_zero_bits(const BIGNUM*)’:
geometry/util/math/exactfloat/exactfloat.cc:75:25: error: invalid use of incomplete type ‘const BIGNUM {aka const struct bignum_st}’
   for (int i = 0; i < bn->top; ++i) {
                         ^~
In file included from /usr/include/openssl/bn.h:32:0,
                 from ./geometry/util/math/exactfloat/exactfloat.h:108,
                 from geometry/util/math/exactfloat/exactfloat.cc:3:
/usr/include/openssl/ossl_typ.h:80:16: note: forward declaration of ‘BIGNUM {aka struct bignum_st}’
 typedef struct bignum_st BIGNUM;
                ^~~~~~~~~
geometry/util/math/exactfloat/exactfloat.cc:76:20: error: invalid use of incomplete type ‘const BIGNUM {aka const struct bignum_st}’
     BN_ULONG w = bn->d[i];
                    ^~
In file included from /usr/include/openssl/bn.h:32:0,
                 from ./geometry/util/math/exactfloat/exactfloat.h:108,
                 from geometry/util/math/exactfloat/exactfloat.cc:3:
/usr/include/openssl/ossl_typ.h:80:16: note: forward declaration of ‘BIGNUM {aka struct bignum_st}’
 typedef struct bignum_st BIGNUM;
                ^~~~~~~~~
geometry/util/math/exactfloat/exactfloat.cc: In constructor ‘ExactFloat::ExactFloat(double)’:
geometry/util/math/exactfloat/exactfloat.cc:90:15: error: ‘BN_init’ was not declared in this scope
   BN_init(&bn_);
               ^
geometry/util/math/exactfloat/exactfloat.cc: In constructor ‘ExactFloat::ExactFloat(int)’:
geometry/util/math/exactfloat/exactfloat.cc:113:15: error: ‘BN_init’ was not declared in this scope
   BN_init(&bn_);
               ^
geometry/util/math/exactfloat/exactfloat.cc: In copy constructor ‘ExactFloat::ExactFloat(const ExactFloat&)’:
geometry/util/math/exactfloat/exactfloat.cc:125:15: error: ‘BN_init’ was not declared in this scope
   BN_init(&bn_);
               ^

Adding AppendAllNeighbors functionality

Thank you for this package. Thus far I have used it for pretty basic grouping of spatial points. I'm now trying to apply spatial operations (distances calculations etc.) on a global dataset, where the comparisons are only important for points within the vicinity of one another. I would like to perform an initial join using neighboring s2cells and then apply the spatial calculations just for those points in neighboring s2cells. I had a quick look and I didn't seen an implementation of AppendAllNeighbors in the package. Is there any thought to adding this or any of the neighbor functions (GetEdgeNeighbors, GetVertexNeighbors)? That would be incredibly useful.

CPPFLAGS vs CXXFLAGS

From your Makevars files it seems you are confusing CPPFLAGS with CXXFLAGS / CXX1XFLAGS.

  • CPPFLAGS: C/C++ preprocessor flags. These are applied both to c and c++ preprocessor. Usually this only includes flags that start with -D and -I.
  • CFLAGS / CXXFLAGS / CXX1XFLAGS: Compiler flags for the c/c++/c++11 compiler that are not in the preprocessor. Things like -g -o -pthread. You should rarely set these as R automatically uses the appropriate defaults.

As a package author you do not have to manually pass any CXXFLAGS or CXX1X flags in your Makevars. R does that automatically: c++ code is always compiled with CXXFLAGS (or CXX1XFLAGS when CXX_STD = CXX11)

Hence the configure script should only set the CPPFLAGS which are system dependent based on how libssl was compiled and where it resides on the user system.

S2CellIdFromLatLng method is missing

Hello,
I have forked the project and added the code to support the S2CellIdFromLatLng.
Is there any instructions or script for making the package/library?

Thank you in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.