spatial

Enable DuckDB spatial extension to analyze Overture Maps geospatial data.

1|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/nq-rdl/agent-extensions --skill spatial-nq-rdl
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: spatial
Source: https://github.com/nq-rdl/agent-extensions/tree/main/skills/duckdb/spatial
Command: npx skills add https://github.com/nq-rdl/agent-extensions --skill spatial-nq-rdl

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Answer spatial-data questions and inspect spatial datasets efficiently.

Core Features & Use Cases

  • Read a variety of spatial formats with ST_Read and ST_ReadOSM, and analyze datasets via Overture Maps.
  • Compute distances, intersections, containment, density, and transformations using DuckDB's spatial functions, including ST_Distance_Spheroid, ST_Contains, ST_Area_Spheroid, ST_Read, and H3-based density patterns.
  • Perform spatial joins and produce GeoJSON or GeoPackage outputs for visualization and downstream use.

Quick Start

Query a spatial dataset to find the top 10 nearest features to a given point.

Frequently Asked Questions about spatial

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run spatial queries on Overture Maps data?▼

Spatial queries on Overture Maps data are performed by loading DuckDB's spatial extension and reading the dataset via read_parquet. This enables distance calculations, containment checks, and spatial joins directly on the parquet files.

Can DuckDB read and convert Shapefile and GeoJSON formats?▼

DuckDB reads and converts formats like Shapefile, GeoJSON, GeoPackage, and GPX using the ST_Read function. After loading the spatial extension, you can perform spatial analysis and export the results back into these geospatial formats.

What is the correct way to calculate distance on a spheroid in DuckDB?▼

Spheroid distance calculations require configuring geometry_always_xy and using ST_Point with POINT_2D inputs. This setup ensures that functions like ST_Distance_Spheroid accurately process coordinates for curved surface measurements.

How do I find the nearest features to a specific point using DuckDB?▼

Finding the nearest features to a point requires loading the spatial extension and querying the dataset via read_parquet. You apply spatial functions to calculate distances and sort the results to retrieve the top nearest records.

Does DuckDB support spatial joins and density analyses?▼

DuckDB supports spatial joins and density analyses through its spatial extension. You can use H3-based density patterns, containment checks with ST_Contains, and intersection operations to analyze spatial relationships across datasets.

What are the limitations of using DuckDB for geospatial analysis?▼

DuckDB geospatial analysis requires explicit configuration, including loading the spatial extension and setting geometry_always_xy for spheroid calculations. Proper POINT_2D inputs are mandatory for accurate distance and area computations.