Przejdź do treści
Biblioteka skilli
Dane i analityka · Budowanie i kod

spatial-sql

/spatial-sql

Pisze, sprawdza i optymalizuje zapytania spatial SQL w DuckDB Spatial, PostGIS, BigQuery GIS, Snowflake i Sedonie.

Repozytorium
open-gis ↗
Licencja
MIT
Ostatnia zmiana repozytorium
27.10.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
6
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 27.10.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Pisze, sprawdza i optymalizuje zapytania spatial SQL w DuckDB Spatial, PostGIS, BigQuery GIS, Snowflake i Sedonie.

Oryginalny opis (EN)

Write, review, debug or optimize spatial SQL on an already chosen engine, including DuckDB Spatial, PostGIS, BigQuery GIS, Snowflake and Sedona. Use for spatial predicates, joins, indexes, query plans, CRS and metric/geodesic correctness. Route unresolved engine or cross-system architecture choices to open-map-stack; ordinary non-spatial SQL and casual place questions are outside this skill.

Jak działa

  1. Query workflow
  2. When the task expands
Sekcje z nagłówków SKILL.md, w oryginale · 63 linii, 496 słów
Podgląd SKILL.md
---
name: spatial-sql
description: "Write, review, debug or optimize spatial SQL on an already chosen engine, including DuckDB Spatial, PostGIS, BigQuery GIS, Snowflake and Sedona. Use for spatial predicates, joins, indexes, query plans, CRS and metric/geodesic correctness. Route unresolved engine or cross-system architecture choices to open-map-stack; ordinary non-spatial SQL and casual place questions are outside this skill."
metadata:
  version: "0.4.0"
---

# Spatial SQL

Solve the query in the engine the user has chosen. Read
`references/spatial-sql.md` for the relevant engine and query patterns, and
`references/formats-and-crs.md` when coordinate or format semantics matter.

When the user has dlt, Dagster, dbt, QGIS or Observable in their stack, read
`references/established-stack.md` for ownership and integration boundaries.
Preserve their chosen tools; retain source pins, GIS correctness and reproducible
evidence. Do not duplicate their SQL, ingestion or scheduler definitions.

## Query workflow

1. Establish the engine/version, available spatial functions, geometry versus
   geography types, CRS/SRID, input grain, expected result and scale. Inspect
   the existing query and plan when available. Do not assume different engines
   share function signatures, boundary semantics or index behavior.
2. Express the intended spatial relationship precisely. Resolve intersects
   versus contains/covers, boundary inclusion, null/empty/invalid geometries,
   and whether several spatial matches should duplicate an entity or produce
   a single membership result.
3. Make distance, area and buffers use the intended units and method. A
   geographic geometry in EPSG:4326 does not acquire metre units from a numeric
   threshold. Use the engine's explicitly supported geodesic/geography
   operation, or a projected CRS whose area of use contains the data's known
   extent. For distance and within-distance tests on an unknown or wide
   extent, prefer an operation the engine documents as geodesic for the
   geometry types involved; do not guess a UTM zone or national grid. A
   geography type does not make every operation geodesic: check buffers and
   other constructions per operation. Assigning an SRID is not coordinate
   transformation; Web Mercator is not a general metric-analysis CRS.
4. Preserve analytical correctness while improving execution. Consider spatial
   indexes or candidate filters, predicate pushdown, partition pruning and
   join cardinality. An expression or cast can prevent use of an existing
   index; verify the relevant plan instead of promising index use by syntax.
5. Run a small meaningful control when an engine is available: qualifying and
   non-qualifying features, a boundary, and duplicate matches where relevant.
   Report actual execution evidence separately from a reasoned SQL review.
   An unavailable engine is `not_testable`, not a successful query run.

Return corrected SQL, consequential assumptions and a short explanation of
correctness and performance. Do not create a full GIS project for a bounded
query review. Preserve source data; an optimization must not silently change
the metric, feature population or authoritative geometry.

## When the task expands

Engine selection, shared-system design and joint compute/storage/delivery
trade-offs belong with an installed `open-map-stack` or an explicit architecture
discussion. Compiling a material analysis belongs with the generalist or
`reproducible-gis-project`. Keep the SQL contribution bounded and supply the
assumptions/evidence needed for that handoff; do not claim to have completed
the whole analysis.

No project template, worked example or OpenMapStack CLI is needed for a bounded
query task. Hand off the SQL and its assumptions to an installed `open-map-stack`
or `reproducible-gis-project` if the user also wants a full project. Sibling
skills are optional and are never automatically installed.

For optional product expertise, read `references/companion-skills.md`.
Keep GIS correctness and the task boundaries above when using a companion.
Pliki w paczce (6)
  • SKILL.md 4 KB
  • agents/openai.yaml 1 KB
  • references/companion-skills.md 3 KB
  • references/established-stack.md 9 KB
  • references/formats-and-crs.md 21 KB
  • references/spatial-sql.md 11 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · jaakla/open-gis100MIT
wiatrek-kevin-s/columbus100Apache-2.0

Identyczna treść występuje jeszcze w 1 innych folderach na GitHubie. Tu pokazujemy jedną, najlepiej ocenioną kopię.

Migawka bazy z 13.11.2026 · wersja paczki ff0cd225699a (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100postgis-spatial-sql
    Obsługuje przestrzenny SQL i dobór backendu: PostGIS, DuckDB Spatial, SpatiaLite, funkcje ST_*, złączenia przestrzenne, duże zapytania GeoParquet, indeksy GiST i BRIN, KNN i optymalizacja przez EXPLAIN.
  • 100postgis-spatial-query-optimization
    Projektuje, indeksuje i optymalizuje bazy przestrzenne w PostgreSQL i PostGIS: geometry i geography, SRID 4326 i 3857, indeksy GiST i SP-GiST, złączenia przestrzenne, zapytania KNN i ST_ClusterDBSCAN.
  • 100duckdb-spatial
    Prowadzi analizę przestrzenną w DuckDB: rozszerzenie spatial, ST_Read dla Shapefile, GeoPackage i GeoJSON, funkcje ST_*, kafelki ST_AsMVT, DuckDB-WASM w przeglądarce i eksport do GeoParquet.
  • 100malloy
    Pomaga pisać modele, źródła, widoki, złączenia i zagnieżdżone zapytania w Malloy, języku modelowania semantycznego kompilowanym do SQL dla DuckDB, BigQuery, Snowflake, PostgreSQL i innych baz.
  • 95study-db
    Odczytuje katalog baz Postgres i PostGIS, SQL Server, MySQL i GeoPackage: kolumny przestrzenne, indeksy i wolne zapytania.
  • 100open-map-stack
    Planuje i prowadzi wieloetapowe prace GIS, dobierając autorytatywne źródła, moc obliczeniową, przechowywanie i dostarczanie: analizy wektorowe, rastrowe, chmury punktów, routing, QGIS i kafelki map.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.