Skip to main content

README

Project description

geojsonhash

CI Release Pypi License Code style: black

This package is responsible for generating identifiers for geojson objects. To do so, it makes use of the pygeohash library in charge of generating the identifiers of the different points contained in the geojson.

In this implementation, individual points are ignored, treating the input geojson as a set of polygons defining a surface. The polygons are sorted according to their coordinates while the northwest-most vertex of the polygons defines the starting point for encoding.

Installation

To install the package there are two options: through poetry or by using the pip command

Pip command

$ pip install geojsonhash

Poetry

$ git clone https://github.com/AdrianSeguraOrtiz/geojsonhash.git
$ cd geojsonhash
$ poetry install

Example

An example is shown below:

from geojsonhash import get_geojson_id
import json

with open("./resources/geojson.json") as geo_d:
    geojson = json.load(geo_d)

geojson_id = get_geojson_id(geojson)
print(geojson_id)

To run it through console we can do:

$ cd examples
$ python example.py

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

geojsonhash-0.1.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

geojsonhash-0.1.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file geojsonhash-0.1.1.tar.gz.

File metadata

  • Download URL: geojsonhash-0.1.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.10 CPython/3.9.6 Linux/5.4.0-1046-kvm

File hashes

Hashes for geojsonhash-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2458c505d8ff6700f9555898f1c052b2db0bfab78df159a82f3182e28d91e6eb
MD5 25eca9303d6d954cf49a9f7ef1a045dc
BLAKE2b-256 262231591da17be81d029d7c1b04af8dec8982257f88754fe34b750d6b7c1f2a

See more details on using hashes here.

File details

Details for the file geojsonhash-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: geojsonhash-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.10 CPython/3.9.6 Linux/5.4.0-1046-kvm

File hashes

Hashes for geojsonhash-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2ca5a3dbf9bd49f6c015d0f476f9b558e6567f35f6c1a52855d13494185fd96d
MD5 56fa3af2325b90c231c84999f4eb8cd7
BLAKE2b-256 d086306fa11166cd1c01b97324f622edc4b982f0eaac964883056e0dcdb1bf13

See more details on using hashes here.

Supported by

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