Skip to main content

Adversarial test-data generator for geospatial systems

Project description

Geobane

Adversarial test-data generator for geospatial systems.

Geobane generates the specific edge cases that silently break geospatial code, not just random coordinates, but the exact failure patterns that cause real bugs: coordinate order confusion, antimeridian crossings, degenerate geometry, CRS mismatches, and floating-point precision issues.

Install

pip install geobane

Why

Most geospatial bugs don't crash, they silently produce wrong results. A swapped lat/lng pair still looks like a valid coordinate. A polygon crossing the date line still parses fine, right up until a bounding-box calculation treats it as spanning the entire globe. Geobane exists to throw these known failure patterns at your code before production does.

Usage

from geobane import coordinate_order, antimeridian, degenerate
from geobane import crs_mismatch, precision

# The single most common real-world geospatial bug
result = coordinate_order.swapped_pair(lat=51.5, lng=-0.12)
print(result["swapped"])  # (-0.12, 51.5) - fed to a system expecting (lat, lng)

# A polygon crossing the antimeridian - breaks naive bounding-box math
tricky_polygon = antimeridian.crossing_polygon()

# A self-intersecting "bowtie" polygon
bad_shape = degenerate.self_intersecting_bowtie()

# Web Mercator coordinates mislabeled as WGS84
wrong_crs = crs_mismatch.mercator_fed_as_wgs84()

# NaN/Infinity injected into a coordinate
broken = precision.nan_infinity_injection()

Every generator returns an explanation field describing the real-world bug it simulates, useful for understanding why the edge case matters, not just reproducing it.

Categories

Module Covers
coordinate_order lat/lng axis swap bugs
antimeridian date-line crossing polygons, linestrings, bboxes
degenerate zero-area, self-intersecting, unclosed geometry
crs_mismatch WGS84/Web Mercator confusion, missing CRS metadata
precision float32 boundaries, NaN/Infinity, over-precision

See TAXONOMY.md for the full edge-case reference, including planned categories for future versions.

Contributing

Found a geospatial bug pattern that isn't covered? Open an issue or PR, the taxonomy doc is the place to propose new categories.

License

MIT

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

geobane-0.1.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

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

geobane-0.1.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file geobane-0.1.0.tar.gz.

File metadata

  • Download URL: geobane-0.1.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for geobane-0.1.0.tar.gz
Algorithm Hash digest
SHA256 71c9e8b3e94ce4fd0c1e2c6f1713771e81a431e72aca4dc95468a0b7bad67488
MD5 952e95883c3e8a04eb3a0877829dfc29
BLAKE2b-256 bfb7c06f6788d8115ac0c0b432f4a7793717ace6b08b9870a660cd301c0e596d

See more details on using hashes here.

File details

Details for the file geobane-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: geobane-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for geobane-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c15719f5314fd5004293a85cb0a9f07bf1ba3953da8dd01a5c26c87f7e37fd66
MD5 0206a35f1e36d484c9656ff44dc85269
BLAKE2b-256 1adeace5db3cc229f06b8a9ea4196da1b55f737f637643cfbc46b1a1b5290085

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