Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/csiro-enviro-informatics/dggsforpoly
https://github.com/csiro-enviro-informatics/dggsforpoly
Last synced: about 5 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/csiro-enviro-informatics/dggsforpoly
- Owner: CSIRO-enviro-informatics
- License: other
- Created: 2022-01-06T05:08:10.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-17T01:40:15.000Z (over 2 years ago)
- Last Synced: 2024-10-29T02:39:01.224Z (21 days ago)
- Language: Python
- Size: 179 KB
- Stars: 0
- Watchers: 7
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# DGGSForPoly
## poly_fill
A function that returns a set of rHEALPIX DGGS cells that describe the geometry of the inputted polygon.The function is built on top of the rHealPIX DGGS Engine (https://github.com/manaakiwhenua/rhealpixdggs-py) and makes use of Shapely's Binary Predicates.
See the usage notebook for examples.
#### Fill Strategies
poly_fill() function has 3 fill_strategies:
1) poly_fully_covered_by_cells - returns a set of cells that completly encapsulating the polygon -> over estimates area
2) centroids_in_poly - returns a set of cells whose centroids are contained by the polygon.
3) cells_fully_contained_in_poly - returns a set of cells completely encapsulated *by* the Polygon -> under estimates area#### Hierarchical Representation
poly_fill() can return a uniform cell level representation or a hieerarchical representation by changing the value of the 'hybrid' bool. Default is True.## cell_operations
Contains modules for calculating area of cell list and for visualising sets of cells and the polygon they represent. poly_fill utilises some functions.## Setting up environment
```
$ python3 -m venv .venv
$ source .venv/bin/activate
# or on Windows: source .venv/Scripts/activate
$ python setup.py install
```Include testing
```
$ pip install -U pytest
$ pytest
```