Discrete Global Grid Systems (DGGS for short) allow to subdivide the Earth's sphere in equal size regions that can be used to index or bin geospatial data into homogeneous bins.
dggridpy
offers a python binding to some of the API implemented in the DGGRID library and the dggridR package to transform latitude/longitude coordinates in DGGS cells, and back from DGGS cells into the tiles' shapes to visualise results in a map.
In detail, the package implements API for:
Grid Generation. Generate the cells of a DGG.
Address Conversion. Transform a collection of locations from one address form (such as longitude/latitude) to another (such as DGG cell indexes).
Point Value Binning. By using the address conversion, values associated with a location can be associated with equal-size bins, then, using tools like pandas, the cells' values can be analysed (e.g. computing the arithmetic mean of the values which are contained in that cell).
Output Grid Statistics. Output a table of grid characteristics for the specified DGG.
To install the package follow the instructions in INSTALL.md.
The initial set of APIs wrapped in Python are described in API.md.
The code in the src directory is the DGGRIDv6.2b developed by Southern Terra Cognita Laboratory and includes also modifications from Richard Barnes for easing the wrapping in R.
This package includes several libraries adopting the following licenses:
clipper: released under the Boostv1 license
dggrid: released DGGRID with a GNU Affero General Public License
proj4lib: Gerald Evenden has released this code into the public domain. More recent versions of the library, not used here, are under an MIT license.
shapelib: released under the MIT license.
This package, and all code and documentation not otherwise mentioned above are released under the MIT license, as stated in the LICENSE file.