Skip to main content

Natural language to spatial geometry — compiles NL to PostGIS, GeoPandas, GeoJSON, DuckDB

Project description

geointent

Natural language → spatial geometry: turn plain-language location questions into PostGIS SQL, GeoPandas / Shapely code, GeoJSON-style filters, or DuckDB spatial SQL.

Install

pip install geointent
import geointent
from geointent import Dialect

engine = geointent.Engine(
    llm="claude",
    context=geointent.SpatialContext(
        schema=geointent.Schema.from_dict({...}),
        domain="utility_network",
        units="feet",
        srid=2965,
    ),
)
result = engine.translate("manholes within 50 feet of a gas line")
print(result.query)

Optional extras: pip install geointent[postgis], [duckdb], [geopandas].

Three common use cases

  1. Utility / asset network (PostGIS) — Projected CRS (e.g. state plane), mains and structures: Dialect.POSTGIS (default), parameterized SQL, optional Engine.execute with your SQLAlchemy connection.
  2. Parcels & zonesDialect.GEOJSON or Dialect.GEOPANDAS for polygon relationships and buffers.
  3. Overture / GeoParquet (DuckDB)Dialect.DUCKDB for bbox-safe SQL against remote Parquet.

Runnable demos (mock LLM, no API keys): python examples/utility_network.py, examples/overture_duckdb.py, examples/parcel_analysis.py.

Development (venv)

python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e ".[dev,postgis,geopandas]"
python -m pytest tests/ -m "not integration and not live and not realdata"

On macOS/Linux: source .venv/bin/activate.

See TESTING.md for PostGIS Docker setup and pytest tiers.

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

geointent-0.1.1.tar.gz (30.1 kB view details)

Uploaded Source

Built Distribution

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

geointent-0.1.1-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: geointent-0.1.1.tar.gz
  • Upload date:
  • Size: 30.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for geointent-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ba2d945df46043599f6205eb05ba977a52c5706370b99e347a0b2fec3f6533b2
MD5 d7c97b0602eb5bbc27645b5d0a1b2fb2
BLAKE2b-256 a814a7a68b5f7e8fcb779bc2fdb7820db54a83f4b87fd5d6da7b14fd0f0b4a44

See more details on using hashes here.

Provenance

The following attestation bundles were made for geointent-0.1.1.tar.gz:

Publisher: workflow.yml on FultonGeo/geointent

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

File details

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

File metadata

  • Download URL: geointent-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for geointent-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9943c6eee875d95f6f560be2eb218e835d1b2ce0747b74f17c5166aa76d5e58c
MD5 db4b42a2cd6c648c800d4de857cddbb6
BLAKE2b-256 6f8202c57e53bf3a6913945b2c3e7cbdef1461cc68f00a3da91379fdef520abe

See more details on using hashes here.

Provenance

The following attestation bundles were made for geointent-0.1.1-py3-none-any.whl:

Publisher: workflow.yml on FultonGeo/geointent

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