dekart-xyz/geosql

A Claude/Codex skill for geospatial data

What it solves

GeoSQL provides a way for data scientists and analysts to perform complex geospatial analysis using natural language. It eliminates the need to write manual spatial SQL queries for various data warehouses like PostGIS, BigQuery, Snowflake, and Wherobots, while ensuring that the generated queries are cost-effective and geometrically accurate.

How it works

GeoSQL integrates as a skill for AI agents (such as Claude Code, GitHub Copilot, and others). It operates through a loop that includes a map rendering step:

  1. Discovery: The agent explores actual warehouse metadata to understand table schemas and columns.
  2. SQL Generation: It writes spatial SQL tailored to the specific database engine being used.
  3. Cost Guardrails: For BigQuery, it performs dry-runs to estimate costs and rewrites queries that exceed a 10 GiB billing cap.
  4. Validation: The agent validates geometry (e.g., checking total area or length) against domain knowledge.
  5. Map Feedback: The agent renders results via Dekart to visually inspect the map and correct geometry errors that a text-only process would miss.

Who it’s for

Data scientists and analysts who work with geospatial data across different cloud data warehouses and want to leverage AI agents to accelerate their spatial analysis workflows.

Highlights

  • Map-in-the-loop: Uses visual feedback from rendered maps to self-correct geometry mistakes, resulting in a 4x performance improvement.
  • Multi-warehouse support: Works with PostGIS, BigQuery, Snowflake, and Wherobots.
  • Local-first: Works 100% locally or self-hosted with no SaaS account required.
  • Cost control: Built-in billing caps and automatic query rewriting for BigQuery.
  • Secure: Uses local CLI authentication, ensuring warehouse credentials are never sent to the agent.

Related

  • Project
  • Project
  • Project
  • Project
  • Project