Skip to main content

An implementation of the rHEALPix discrete global grid system

Project description

rHEALPixDGGS is a Python package that implements the rHEALPix Discrete Global Grid System (DGGS).

Release Notes

This package was originally authored in 2013 and has had only minor code updates since then.

0.5.15

Fixed get_finest_containing_cell returning None for polygons inside cap cells (issue #13). Cap cell boundaries cannot be represented as simple polygons in geographic coordinates, so containment is now tested in the rHEALPix plane for those cells.

Refer to file CHANGES.rst for a more detailed history of changes.

Requirements

  • requirements.txt - all the module requirements for operation
  • requirements.dev.txt - packages needed for developing this package

Installation

This package is available on PyPI, the Python Package Index from where it can be installed as follows:

pip install rhealpixdggs

rHEALPixDGGS is also available for download from the github repository https://github.com/manaakiwhenua/rhealpixdggs-py from where the latest version can be cloned.

You can install from source using Poetry in a virtual environment (MacOS and Linux, assuming Poetry is already installed on your system):

python3 -m venv rhealpixdggs
source rhealpixdggs/bin/activate
python install --upgrade pip
poetry install

Or on Windows:

python3 -m venv rhealpixdggs
rhealpixdggs\Scripts\activate
python install --upgrade pip
poetry install

For development:

::

poetry shell poetry install

Tests

The files in the tests directory test the rHEALPixDGGS modules. These files are plain unittest files (the Python testing framework contained within the standard distribution). Tests for examples in documents need the doctest module installed (see requirements.dev.txt).

Two UNIX shell scripts are included in this repository to run all unit and doc tests:

  • run_doctests.sh

  • run_unittests.sh

Running the command python tests/test_<foo>.py performs a sequence of automated tests of <foo>.py.

For example, tests/test_distortion.py automatically tests distortion.py.

If you update a module, then update its test file to test the changes you made!

Test early, test often, test automatically!

There are a couple of files in the main package directory that can be used to run all tests, starting run_....

Documentation

Documentation can be found at:

  • The rHEALPix Discrete Global Grid System - The rHEALPix Discrete Global Grid System

  • docs/build/latex/rHEALPixDGGS.pdf - The rHEALPixDGGS manual

  • docs/build/html/index.html - The rHEALPixDGGS manual in HTML format

The latter two documents are generated automatically from the source code of the rhealpixdggs package modules. To automatically build these yourself, install the Python package Sphinx (but do not run sphinx-quickstart, because the make file Makefile and the configuration file docs/source/conf.py already exist) and then from the docs directory run the command make latexpdf to make the PDF documentation or make html to make the HTML documentation. For the PDF documentation, you might also need to install LaTeX.

The source and build directories contain all the Sphinx source and build files, respectively.

License

This code is dual-licensed. You may choose to use it under either:

See the file LICENSE for more information about the dual licensing arrangement.

This dual licensing approach allows the software to be used in contexts where LGPL may not be permitted (such as certain corporate environments or standards bodies like the OGC) while still maintaining a copyleft option for those who prefer it.

# NB make a build/release makefile or script Releasing ——-

For PyPI:

::

# Build the distribution (.tar.gz and .whl) poetry build

# Upload to PyPI (test) poetry publish –repository testpypi

# Test install from testpypi pip install –index-url https://test.pypi.org/simple/ –extra-index-url https://pypi.org/simple rhealpixdggs

# Upload to PyPI poetry publish

A conda package rhealpixdggs is also maintained at [conda-forge](https://github.com/conda-forge/rhealpixdggs-feedstock).

Contact

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rhealpixdggs-0.5.15.tar.gz (543.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rhealpixdggs-0.5.15-py3-none-any.whl (66.0 kB view details)

Uploaded Python 3

File details

Details for the file rhealpixdggs-0.5.15.tar.gz.

File metadata

  • Download URL: rhealpixdggs-0.5.15.tar.gz
  • Upload date:
  • Size: 543.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.17.10-100.fc41.x86_64

File hashes

Hashes for rhealpixdggs-0.5.15.tar.gz
Algorithm Hash digest
SHA256 9ca45864bf6eb658d1c637c0c3d899e4c562052eaabc98a654ece25d798200bc
MD5 24ee5b3e7c5968b8ada04c9ff272244f
BLAKE2b-256 a78ca419315953182151712c84252b1a108f4044c94d5508be0b8ee9361c8879

See more details on using hashes here.

File details

Details for the file rhealpixdggs-0.5.15-py3-none-any.whl.

File metadata

  • Download URL: rhealpixdggs-0.5.15-py3-none-any.whl
  • Upload date:
  • Size: 66.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.17.10-100.fc41.x86_64

File hashes

Hashes for rhealpixdggs-0.5.15-py3-none-any.whl
Algorithm Hash digest
SHA256 a68adf72dbb6047360008bb2b710144d4591d84d6161c95372661e22bfc6eebf
MD5 159e31c7cd906ade9c3963fd322f1b0d
BLAKE2b-256 131f4ffe53003e48b5b76c57880533386ab181273515142fbd37671b1d9ce880

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page