Loading...
Loading...
Answer questions about spatial data using DuckDB. Use when the user mentions locations, coordinates, lat/lng, distances, maps, addresses, "near", "within", "closest", geographic names, or spatial file formats (GeoJSON, Shapefile, GeoPackage, GPX, GeoParquet). Also triggers when the user wants to find places, buildings, or roads — Overture Maps provides free global data on S3 with zero API keys. Handles spatial joins, distance calculations, containment checks, density analysis, and format conversions for geographic data.
npx skill4agent add duckdb/duckdb-skills spatial$0${1:-}| Pattern | Data source | Key functions |
|---|---|---|
| "Find X near Y" (no user file) | Overture Maps on S3 | |
| "How far between A and B" | Geocode or user data | |
| "Which points fall inside polygons" | User files | |
| "Analyze this GeoJSON/Shapefile/GPX" | User file | |
| "Show density/hotspots" | User or Overture data | H3 hex binning |
| "Convert to GeoJSON/GeoPackage" | User file | |
| "Count buildings/roads in area" | Overture Maps | bbox filtering + aggregation |
references/overture.mdreferences/functions.mdLOAD spatial;
SET geometry_always_xy = true;LOAD httpfs; CREATE SECRET (TYPE S3, PROVIDER config, REGION 'us-west-2');INSTALL h3 FROM community; LOAD h3;bbox.xmin/xmax/ymin/ymaxgeometry_always_xy = trueST_Distance_SpheroidST_DistanceST_Distance_SpheroidST_Area_SpheroidPOINT_2DGEOMETRYGEOMETRY('OGC:CRS84')ST_Point(ST_X(geometry), ST_Y(geometry))::POINT_2DST_Point(longitude, latitude)duckdb -c "
LOAD spatial;
<ADDITIONAL_SETUP>
<YOUR_QUERY>
"COPY TO 'result.geojson' WITH (FORMAT GDAL, DRIVER 'GeoJSON')duckdb: command not found/duckdb-skills:install-duckdbINSTALL spatial; LOAD spatial;INSTALL h3 FROM community; LOAD h3;