Thanks to visit codestin.com
Credit goes to pypi.org

Skip to main content

A simple command line tool to help with geocoding country/region ISO 3166-2 codes

Project description

PyPI - Version PyPI - Python Version PyPI Downloads License: MIT Pixi Badge

giso

A simple command line tool to help with geocoding country/region ISO 3166-2 codes.

Includes a public domain reference dataset from Natural Earth Data which is stored in GeoParquet format and is accessed with SedonaDB.

Installation

python -m pip install giso

Basic Usage

giso takes one of two inputs:

  • A longitude/latitude coordinate pair. (Decimal degrees in WGS 1984 separated by a comma or a space.) Returns the corresponding ISO 3166-2 code.
giso -122.2483823, 37.8245529
# US-CA
  • A valid ISO 3166-2 code. Returns the corresponding geometry as Well-Known Text (WKT).
giso US-CA
# MULTIPOLYGON (((-114.724285 32.712836, -114.764541 32.709839, [...]

Returns None if there are no hits.

giso can also be used as a Python package:

>>> import giso
>>> giso.reverse_geocode(103.8455041, 1.2936855)
'SG-01'
>>> giso.geocode("SG-01")
< POLYGON((103.898 1.305, 103.888 1.301, 103.853 1.277, 103.847 1.272, 103.8 ... >

References

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

giso-1.0.0.tar.gz (11.1 MB view details)

Uploaded Source

Built Distribution

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

giso-1.0.0-py3-none-any.whl (11.0 MB view details)

Uploaded Python 3

File details

Details for the file giso-1.0.0.tar.gz.

File metadata

  • Download URL: giso-1.0.0.tar.gz
  • Upload date:
  • Size: 11.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for giso-1.0.0.tar.gz
Algorithm Hash digest
SHA256 49be05da1d6561418031adfca797e9b0d91a7b46bd942f651c298a570094f01c
MD5 e3f1a735c616e7014e56f4ceae74c2e2
BLAKE2b-256 12ba633b2152cedb5820ef5a3de0d940866a77822a9595374131020c080a5792

See more details on using hashes here.

Provenance

The following attestation bundles were made for giso-1.0.0.tar.gz:

Publisher: python-publish.yml on corbel-spatial/giso

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file giso-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: giso-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for giso-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ee30695182f0da2408b47114703978d96cbb4ca68b528c891e78ed3bf81989d6
MD5 c90b7198fd6db3c5a16a16223791cb92
BLAKE2b-256 3585fb40dc1a69ba827ab3bb90d3b8128d79e6171bc836c0df8d6ed4b88db20c

See more details on using hashes here.

Provenance

The following attestation bundles were made for giso-1.0.0-py3-none-any.whl:

Publisher: python-publish.yml on corbel-spatial/giso

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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