Skip to main content

geo-micro

A zero-dependency, ultra-lightweight (<10KB) Python utility for GeoJSON sanitisation, coordinate order correction, bounding box calculations, and fast ray-casted point-in-polygon checks. Designed for AWS Lambda functions, microservices, and edge computing environments where heavy C-based libraries like Shapely or GDAL are overkill.

Features

  • Zero External Dependencies
  • Dirty Data Repair (string coordinates to floats and auto-closes unclosed polygon rings)
  • Coordinate Swapper: ([Lat, Lng] to [Lng, Lat] and vice versa)
  • Point-in-Polygon

Quickstart

from geomicro import GeoMicro, convert_coords

# 1. Fix Lat/Lng order for a list of coordinates
bad_coords = [[-27.468, 153.028], [-27.470, 153.030]]
fixed = convert_coords(bad_coords, mode="to_geojson")

# 2. Check containment and bounding boxes
polygon_feature = {
    "type": "Polygon",
    "coordinates": [[[153.0, -27.0], [154.0, -27.0], [154.0, -28.0], [153.0, -27.0]]]
}

geo = GeoMicro(polygon_feature)
print(geo.bbox()) # (153.0, -28.0, 154.0, -27.0)
print(geo.contains([153.5, -27.5])) # True

Metadata

Release files for geo-micro 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geo-micro 0.1.0
File Size Uploaded
geo_micro-0.1.0.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for geo-micro 0.1.0
File Interpreter ABI Platform
geo_micro-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.2 kB

Release files / geo_micro-0.1.0.tar.gz

Download URL geo_micro-0.1.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5ebe2a318548c583a9cd021b768105a1148eedb1370b12d6f485264212165d06
BLAKE2b-256 checksum
How to use checksums
b823a151faa49fdedb5d98e232c98cf973ed61659d98d80fc79f4948fa60f29b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.0

Release files / geo_micro-0.1.0-py3-none-any.whl

Download URL geo_micro-0.1.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
175689456a2bb524e68115541cb90346e318cfed01f62327057796eb97542b81
BLAKE2b-256 checksum
How to use checksums
1feab0adade9d20003667749f217a9c6c7c0fa6af08f5c9e82037823a0dee2ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page