dggstools

Tools to manipulate raster and vector GIS data in the spatial framework provided by a DGGS

https://github.com/iaaa-lab/dggstools

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 3 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.6%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Tools to manipulate raster and vector GIS data in the spatial framework provided by a DGGS

Basic Info
  • Host: GitHub
  • Owner: IAAA-Lab
  • License: agpl-3.0
  • Language: Python
  • Default Branch: main
  • Size: 18.6 MB
Statistics
  • Stars: 3
  • Watchers: 5
  • Forks: 0
  • Open Issues: 25
  • Releases: 24
Created about 2 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License Citation

README.md

DGGSTools

DOI

A python library (see the latest version API docs and command line tool to manipulate raster and vector GIS data in the spatial framework provided by a DGGS (rHEALPix for now).

Requirements - Python 3.10 or higher - pip for installing Python packages

Install the package and the command line tool

  1. If you want the latest stable version (which is in PyPi):

pip install dggstools

  1. If you prefer the latest non-stable version, you can download the latest package released on the GitHub Repository:

pip install ./name-of-the-file-you-have-downloaded.whl

  1. In any case, once installed you can run dggstools in the command line:

dggstools --help

And you will see something like this:

``` Usage: dggstools [OPTIONS] COMMAND [ARGS]...

╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ --install-completion Install completion for the current shell. │ │ --show-completion Show completion for the current shell, to copy it or customize the installation. │ │ --help Show this message and exit. │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │ print-ras-rhpx-metadata Takes a GeoTIFF file produced by dggstools and prints the metadata that dggstools stores in it. This metadata are necessary to store some │ │ rHEALPix system specific information. │ │ print-vec-rhpx-metadata Takes a GeoPackage file produced by dggstools and prints the metadata that dggstools stores in it. This metadata are necessary to store │ │ some rHEALPix system specific information, and some other information that can be useful if you want the original raster file back. │ │ ras-rhpx-to-vec-rhpx Transforms a rHEALPix GeoTIFF dataset produced by dggstools to a vector dataset in the GeoPackage format. │ │ ras-to-rhpx-ras Transforms a raster dataset in a common GIS format and reference system to a rHEALPix GeoTIFF. This includes: warping to the rHEALPix │ │ projection, resampling to one of the allowed rHEALPix resolutions (which depend on the rHEALPix system being used) and aligning to that │ │ rHEALPix grid. │ │ vec-ras-area-error Takes a vector file and a rasterized rHEALPix version (as produced by the vec-to-rhpx-ras command) and: - measures the area of each │ │ geometry in vector file; - compares each of these areas with the areas of the cells which correspond to that geometry in the vector file. │ │ This is an experimental, not thoroughly tested and barely documented command, and should be used just for testing purposes. │ │ vec-rhpx-to-ras-rhpx Transforms a vector dataset in rHEALPix produced by dggstools with the ras-rhpx-to-vec-rhpx command, to a raster dataset in GeoTIFF which │ │ is very similar to the one that was used as the original input to that operation. │ │ vec-to-rhpx-ras Transforms a vector dataset with polygons in a common GIS format and reference system to a rHEALPix GeoTIFF. This GeoTIFF has a │ │ rasterization of the polygons following the constraints of the rHEALPix system (projection, valid resolution and grid alignment). │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ```

Installation with Docker

We provide a Docker file for simplifying deployment and ensuring consistency across different development environments.

Build the image with:

docker build -t dggstools .

Run the tests with:

docker run --rm dggstools python -m unittest discover -s tests -p '*.py'

Installation from sources

To install dggstools, you can follow these steps right after you clone the Git repository (in its root directory):

  1. Update the build tools:

pip install --upgrade pip pip install --upgrade build pip install --upgrade wheel

  1. Install the dependencies and build the dggstools package:

pip install .

  1. Run the provided tests to see if everything is working (optional)

The package dggstools uses the unittest framework for testing. All the necessary data to run the tests are also included in the repository.

python -m unittest discover -s tests/data_tests -p '*.py'

Owner

  • Name: Advanced Information Systems Laboratory (IAAA)
  • Login: IAAA-Lab
  • Kind: organization
  • Location: Zaragoza, Spain

Adscribed to the Aragón Institute of Engineering Research at the Universidad Zaragoza

Citation (CITATION.cff)

# cff-version: 1.2.0
# message: "If you use this software, please cite it as below."
# authors:
# - family-names: "Bejar"
#   given-names: "Ruben"
#   orcid: "https://orcid.org/0000-0001-7866-3793"
# title: "dggstools"
# version: v0.1.0
# doi: 10.5281/zenodo.10659071
# date-released: 2024-02-14
# url: "https://github.com/IAAA-Lab/dggstools"

GitHub Events

Total
  • Release event: 4
  • Watch event: 1
  • Push event: 3
  • Create event: 3
Last Year
  • Release event: 4
  • Watch event: 1
  • Push event: 3
  • Create event: 3

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 26
  • Total pull requests: 0
  • Average time to close issues: about 1 month
  • Average time to close pull requests: N/A
  • Total issue authors: 1
  • Total pull request authors: 0
  • Average comments per issue: 0.04
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • rbejar (23)
Pull Request Authors
Top Labels
Issue Labels
enhancement (14) good first issue (9) bug (4) documentation (3) code quality (3) question (2) backlog bottom (1) performance (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 18 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 1
pypi.org: dggstools

A Python library and command line tool to manipulate raster and vector GIS data in a DGGS (rHEALPix for now).

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 18 Last month
Rankings
Dependent packages count: 11.0%
Forks count: 32.8%
Average: 35.2%
Stargazers count: 35.2%
Dependent repos count: 61.7%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/ci-reusable-build.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
.github/workflows/ci-reusable-data-tests.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
Dockerfile docker
  • ghcr.io/osgeo/gdal ubuntu-full-3.8.3 build
.github/workflows/ci.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • ncipollo/release-action v1 composite
pyproject.toml pypi
requirements.txt pypi
  • Fiona ==1.9.4.post1
  • GeoAlchemy2 ==0.12.5
  • Pillow ==10.2.0
  • SQLAlchemy ==2.0.21
  • SQLAlchemy-Utils ==0.41.1
  • affine ==2.3.1
  • attrs ==21.4.0
  • boto3 ==1.34.37
  • botocore ==1.34.37
  • build ==1.0.3
  • certifi ==2024.2.2
  • click ==8.1.2
  • click-plugins ==1.1.1
  • cligj ==0.7.2
  • cycler ==0.11.0
  • fonttools ==4.48.1
  • geopandas ==0.14.0
  • jmespath ==1.0.0
  • kiwisolver ==1.4.2
  • matplotlib ==3.7.2
  • munch ==2.5.0
  • networkx ==2.8.7
  • numpy ==1.26.4
  • packaging ==21.3
  • pandas ==1.4.3
  • psycopg2-binary ==2.9.9
  • pyarrow ==15.0.0
  • pyogrio ==0.7.2
  • pyparsing ==3.0.7
  • pyproj ==3.6.1
  • python-dateutil ==2.8.2
  • pytz ==2022.1
  • rHEALPixDGGS ==0.5.4
  • rasterio ==1.3.9
  • s3transfer ==0.10.0
  • scipy ==1.12.0
  • shapely ==2.0.1
  • six ==1.16.0
  • snuggs ==1.4.7
  • typer ==0.9.0
  • urllib3 ==2.0.7
setup.py pypi
.github/workflows/ci-stable-release.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • ncipollo/release-action v1 composite
.github/workflows/docs.yml actions
  • actions/checkout v4 composite
  • actions/deploy-pages v4 composite
  • actions/setup-python v5 composite
  • actions/upload-pages-artifact v3 composite
requirements_dev.txt pypi
  • pdoc ==14.4.0 development