Python library and CLI tool to check density and densify (GeoJSON) geometries using the geodesic (ellipsoidal great-circle) calculation for accurate CRS transformations
Project description
geodense
Python library and CLI tool to check density and densify geometries using the geodesic (ellipsoidal great-circle) calculation for accurate CRS transformations.
Implementation based on Eenduidige transformatie van grenzen tussen ETRS89 en RD
Requires Python v3.12 or higher.
Depends on:
pyproj ~= 3.7.0
-> requires libproj>=9.2shapely ~= 2.0.6
-> requires libgeos>=3.9
Installation of binary dependencies (libproj, libgeos) is done through Python package management (uv
, pip
), since PyPI has binary distributions available for pyproj
and shapely
.
Usage CLI
Use either geodense
or the short gden
alias:
$ geodense --help
Usage: geodense [-h] [-v] {densify,check-density} ...
Check density of, and densify geometries using the geodesic (ellipsoidal great-circle) calculation for accurate CRS transformations
Commands:
{densify,check-density}
Options:
-h, --help show this help message and exit
-v, --version show program's version number and exit
Created by https://www.nsgi.nl/
Usage Docs
See
DOCS.md
for usage docs; for now only containing flow-charts of the densify
and
check-densify
subcommands.
Contributing
Issues (bugs/feature requests) can be reported in the issue tracker of this repository. Pull requests are more than welcome, but we encourage to start a discussion on the issue tracker first.
Development
Project uses uv for package management. To get started install uv
and run:
Install dev dependencies with:
uv sync
Enable pre-commit hooks with:
pre-commit install
Tests
Run tests:
pytest tests/
Check test coverage:
coverage run -p --source=src/geodense -m pytest -v tests && python3 -m coverage report --data-file $(ls -t .coverage.* | head -1)
Create release
Creating a release requires the build
and twine
packages, which are part of
this package's dev
dependencies. To create a release follow these steps:
To release a new version create a new git tag and push the new tag with
git tag -a x.x.x -m "tagging x.x.x release"
git push --tags
Create a new build with:
rm -rf dist/* # clean dist folder before build
uv build --wheel
Check wheel contains expected files:
unzip dist/geodense-0.0.1a3-py3-none-any.whl -d geodense-whl
tree geodense-whl
rm -rf geodense-whl
See .github/python-publish.yml for how to build an publish package on PyPI.
Note: requires
~/.pypirc
file with API token (when 2FA is enabled on PyPI).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for geodense-2.0.1a1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d5ef8369920ac1eed38957b8891e0c8fb8bf26a6cd36bc6e36f7532bdff006f |
|
MD5 | 5c07cd96e4250faeb404f0ead1a37b28 |
|
BLAKE2b-256 | 2c034341b2d49cc53332f3c022bbf7d677dfdb3043257e7dcd58b9f3acdf64c7 |