Skip to content

correndo/dggridpy

Repository files navigation

dggridpy: Discrete Global Grids for Python

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.

image

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.

Install

To install the package follow the instructions in INSTALL.md.

API

The initial set of APIs wrapped in Python are described in API.md.

Credits

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.

Licensing

This package includes several libraries adopting the following licenses:

This package, and all code and documentation not otherwise mentioned above are released under the MIT license, as stated in the LICENSE file.