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 uv

GitHub Actions Workflow Status: Linux GitHub Actions Workflow Status: Windows GitHub Actions Workflow Status: macOS GitHub Actions Workflow Status: Lint Test Coverage Actions Workflow Status: Test Python Prerelease

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.1.tar.gz (11.2 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.1-py3-none-any.whl (11.0 MB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for giso-1.0.1.tar.gz
Algorithm Hash digest
SHA256 22fc25d41bb4d1b4d1c9b8afe6a4d750e466f2cf6a0ed6cab20e5f86decb6911
MD5 0a0feca8b1a8c3b4a3b759d392d3fc28
BLAKE2b-256 d6649361a58bd658db87f35404d85a612457af39fcaa978fbe1df3f0ac85885e

See more details on using hashes here.

Provenance

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

Publisher: pypi-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.1-py3-none-any.whl.

File metadata

  • Download URL: giso-1.0.1-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.12

File hashes

Hashes for giso-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8f995782fadfd9675bd77b89ca0bcbe9d4c28764939a8afef9a020d832326328
MD5 aade0464cc30dbe8a76f7f6e81e1380b
BLAKE2b-256 e09c45a40e49afafa05f155548502d9a09cd5433539f5dbfad83474c12c7a459

See more details on using hashes here.

Provenance

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

Publisher: pypi-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