K-Dense-AI/scientific-agent-skills/skills/geopandas/SKILL.md
geopandas
Guidance and local audit tools for Python workflows that directly use GeoPandas GeoSeries, GeoDataFrame, spatial operations, or vector-data I/O.
- Source repository stars
- 31,966
- Declared platforms
- 0
- Static risk flags
- 1
- Last source update
- 2026-07-28
- Source checked
- 2026-07-28
Decision brief
What it does—and where it fits
Use GeoPandas for planar vector data represented as pandas-like GeoSeries and GeoDataFrame objects. This skill targets stable GeoPandas 1.1.4 (released 2026-06-26), not the unreleased 1.2 documentation.
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/K-Dense-AI/scientific-agent-skills --skill "skills/geopandas"Inspect the Agent Skill "geopandas" from https://github.com/K-Dense-AI/scientific-agent-skills/blob/e7ac42510774624f327003c95b6650e2883bc01d/skills/geopandas/SKILL.md at commit e7ac42510774624f327003c95b6650e2883bc01d. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Reproducible environment
GeoPandas 1.1.4 requires Python 3.10+; its tagged source requires NumPy =1.24, pandas =2.0, Shapely =2.0, pyproj =3.5, pyogrio =0.7.2, and packaging. This exact Python 3.12 snapshot was smoke-tested on 2026-07-23:
GeoPandas 1.1.4 requires Python 3.10+; its tagged source requires NumPy =1.24, pandas =2.0, Shapely =2.0, pyproj =3.5, pyogrio =0.7.2, and packaging. This exact Python 3.12 snapshot was smoke-tested on 2026-07-23:Keep optional plotting and PostGIS packages pinned in the project lock as well. Do not mix binary geospatial packages from incompatible package channels. - 02
Safety and privacy contract
Treat exact coordinates, addresses, parcel boundaries, trajectories, and
Treat exact coordinates, addresses, parcel boundaries, trajectories, andNever automatically load a URL, cloud URI, GDAL /vsi path, archive, orGDAL/OGR drivers, GEOS, PROJ, pyogrio, Shapely, pyproj, and their wheels are a - 03
Correctness gates
Apply these gates before trusting a result:
Identity and provenance — identify the source layer, stable feature key,Geometry state — count null, empty, invalid, mixed, Z/M, and collapsedCRS semantics — require CRS metadata. setcrs() assigns metadata; - 04
CRS and antimeridian rules
GeoPandas stores CRS as pyproj.CRS. Coordinate arrays use traditional GIS (x, y) order, while authority definitions can advertise latitude-first axes. Use Transformer(..., alwaysxy=True) for explicit coordinate-array pipelines, and record that choice.
GeoPandas stores CRS as pyproj.CRS. Coordinate arrays use traditional GIS (x, y) order, while authority definitions can advertise latitude-first axes. Use Transformer(..., alwaysxy=True) for explicit coordinate-array pi…tocrs() transforms vertices and assumes each segment is straight in the source CRS; it does not transform geodesic arcs. Geometries crossing ±180° or a projection boundary can be badly wrapped. Detect crossings, split/u… - 05
Core API decisions
Use isvalid and redacted isvalidreason() categories before makevalid(method="linework"|"structure", keepcollapsed=...). Repair can change geometry type or dimension; retain the original and compare counts, area, types, empties, and collapsed parts.
A GeoDataFrame can hold multiple geometry columns, each with CRS metadata,Binary GeoSeries methods are row-wise and align by index by default. UseDuplicate column names and duplicate feature IDs are ambiguous; reject or
Permission review
Static risk signals and limitations
Runs scripts
The documentation asks the agent to run terminal commands or scripts.
python skills/geopandas/scripts/vector_inventory.py --helpRuns scripts
The documentation asks the agent to run terminal commands or scripts.
python skills/geopandas/scripts/crs_reprojection_plan.py \Evidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 88/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 31,966 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- K-Dense-AI/scientific-agent-skills
- Skill path
- skills/geopandas/SKILL.md
- Commit
- e7ac42510774624f327003c95b6650e2883bc01d
- License
- MIT
- Collected
- 2026-07-28
- Default branch
- main
View the original SKILL.md
GeoPandas
Use GeoPandas for planar vector data represented as pandas-like GeoSeries and
GeoDataFrame objects. This skill targets stable GeoPandas 1.1.4 (released
2026-06-26), not the unreleased 1.2 documentation.
Reproducible environment
GeoPandas 1.1.4 requires Python 3.10+; its tagged source requires NumPy >=1.24,
pandas >=2.0, Shapely >=2.0, pyproj >=3.5, pyogrio >=0.7.2, and packaging.
This exact Python 3.12 snapshot was smoke-tested on 2026-07-23:
uv venv --python 3.12
uv pip install \
"geopandas==1.1.4" \
"numpy==2.5.1" \
"pandas==3.0.5" \
"shapely==2.1.2" \
"pyproj==3.7.2" \
"pyogrio==0.13.0" \
"pyarrow==25.0.0" \
"packaging==26.2"
Keep optional plotting and PostGIS packages pinned in the project lock as well. Do not mix binary geospatial packages from incompatible package channels.
Safety and privacy contract
- Treat exact coordinates, addresses, parcel boundaries, trajectories, and small-area joins as sensitive. Default reports to counts, categories, coarse extents, and redacted identifiers. Generalize before publication.
- Never automatically load a URL, cloud URI, GDAL
/vsi*path, archive, or geocode an address. Obtain explicit approval, validate provenance and hashes, then stage an unpacked local file in an isolated workspace. - GDAL/OGR drivers, GEOS, PROJ, pyogrio, Shapely, pyproj, and their wheels are a native-code trust boundary. Prefer official wheels/conda-forge, record native versions, restrict drivers, and process untrusted data in a sandbox.
- Do not open macro-enabled office files or nested archives through permissive GDAL drivers. The bundled CLIs use an extension allowlist and reject archives.
- Read only named database secrets such as
GEOPANDAS_POSTGIS_PASSWORD; use a secret manager or scoped environment variable. Never embed a password in a URL or source, print an engine/URL, or dump the environment. - Every derived artifact needs source hashes/versions, CRS, operation parameters, predicate, join cardinality, precision/repair choices, and row-count checks.
Correctness gates
Apply these gates before trusting a result:
- Identity and provenance — identify the source layer, stable feature key, duplicate IDs, row count, geometry column, parser/driver, and content hash.
- Geometry state — count null, empty, invalid, mixed, Z/M, and collapsed
geometries separately.
Noneis missing; an empty Shapely geometry is real. - CRS semantics — require CRS metadata.
set_crs()assigns metadata;to_crs()transforms coordinates. Never guess a CRS from coordinate ranges. - Units and operation — GeoPandas is planar. Geographic coordinates are angular; do not use them directly for buffer, distance, area, nearest joins, precision grids, or tolerances. Choose a fit-for-purpose local/equal-area CRS or a geodesic method.
- Transform quality — inspect axis order, area of use, datum pipeline, expected accuracy, ballpark status, and missing grids. Keep PROJ network disabled unless the user explicitly approves grid retrieval.
- Topology and precision — validate before and after repair/overlay. Pick a precision grid from source accuracy and CRS units; arbitrary snapping can collapse features or create bias.
- Cardinality — state expected one-to-one, one-to-many, or many-to-many
behavior before
merge,sjoin, orsjoin_nearest; audit unmatched and multiplied rows afterward. - Output contract — use a new output path, preserve a stable feature ID, document schema/CRS/encoding, reopen the artifact, and compare counts/types.
CRS and antimeridian rules
GeoPandas stores CRS as pyproj.CRS. Coordinate arrays use traditional GIS
(x, y) order, while authority definitions can advertise latitude-first axes.
Use Transformer(..., always_xy=True) for explicit coordinate-array pipelines,
and record that choice.
to_crs() transforms vertices and assumes each segment is straight in the
source CRS; it does not transform geodesic arcs. Geometries crossing ±180° or a
projection boundary can be badly wrapped. Detect crossings, split/unwrap and
densify in a documented geographic representation, transform parts, then
validate. Do not use Web Mercator as a general measurement CRS.
crs = gdf.crs # a pyproj.CRS when present
if crs is None or crs.is_geographic:
raise ValueError("Choose a justified projected CRS before planar measurement")
unit_names = [axis.unit_name for axis in crs.axis_info]
areas = gdf.geometry.area # square CRS units, not automatically square metres
See CRS management.
Core API decisions
Data structures
- A
GeoDataFramecan hold multiple geometry columns, each with CRS metadata, but onlyactive_geometry_namedrives frame-level spatial operations. - Binary
GeoSeriesmethods are row-wise and align by index by default. Usealign=Falseonly when positional pairing is explicitly intended and lengths and order were verified. - Duplicate column names and duplicate feature IDs are ambiguous; reject or resolve them before joins and exports.
See data structures.
Geometry validity, precision, and union
Use is_valid and redacted is_valid_reason() categories before
make_valid(method="linework"|"structure", keep_collapsed=...). Repair can
change geometry type or dimension; retain the original and compare counts,
area, types, empties, and collapsed parts.
set_precision(grid_size, mode=...) uses CRS units and may remove duplicate
vertices or collapse features. union_all(method="unary", grid_size=...) is the
robust default. Use coverage only after is_valid_coverage() proves
non-overlap and edge matching; use disjoint_subset with Shapely >=2.1 when its
partitioning assumption is useful.
See geometric operations.
Joins, overlay, clip, and dissolve
sjoinpredicates are directional:left.within(right)is notleft.contains(right).intersectsincludes boundary contact;containsexcludes boundary-only points, whilecoversincludes boundary points.predicate="dwithin"requiresdistance; scalar or per-left-row distances are in CRS units.sjoin_nearestreturns all equidistant nearest matches and does not implement ak=parameter.overlay(..., make_valid=True)repairs invalid input but can change types;keep_geom_type=Nonedrops other types with a warning. Precision mismatch can create slivers; quantify them rather than silently deleting them.clipdissolves the mask. Rectangle clipping is fast but possibly dirty and may omit a line collapsed to a point; validate its output.dissolvecombinesgroupby.aggwithunion_all; choose explicit attribute aggregations and audit null group keys.
See spatial analysis.
I/O, Arrow, and PostGIS
GeoPandas 1.x defaults to pyogrio. Driver availability and semantics come from the installed GDAL, not GeoPandas alone. Prefer local GeoPackage for general interchange and WKB GeoParquet for columnar interoperability.
GeoParquet defaults to stable schema 1.0.0. Native GeoArrow encodings and bbox
covering require schema 1.1.0 and remain less interoperable. A missing GeoParquet
crs key means OGC:CRS84; explicit crs: null means unknown—do not conflate
them. Reopen and validate every export.
Use parameterized SQL and a SQLAlchemy Engine/Connection for PostGIS.
if_exists="replace" is destructive; default to "fail" and use a transaction.
See data I/O.
Migration checklist
For code moving from GeoPandas 0.14 or earlier:
- GeoPandas 1.0 supports Shapely >=2 only; PyGEOS, Shapely <2, and the rtree spatial-index backend were removed.
- pyogrio replaced Fiona as the installed/default I/O engine. Set
engine=explicitly and test schema, empty, datetime, encoding, and append behavior. - Replace
sjoin(op=...)withpredicate=,sindex.query_bulk()withsindex.query(),unary_unionwithunion_all(), andGeometryArray.datawithto_numpy()/np.asarray. - Replace
read_file(include_fields=...|ignore_fields=...)withcolumns=. Useschema_version=, not the removed GeoParquetversion=compatibility. - Do not use removed
geopandas.datasets, internalgeopandas.io.*entry points, plotaxes/colormap, or set-operation operators. explode()now defaultsindex_parts=False; a named Series passed toset_geometry()supplies the new active-column name; a named right index can replaceindex_rightinsjoinoutput.- Do not assign
.crsto override metadata or rely on deprecatedset_geometry(drop=...); use explicitset_crs()and rename/drop steps. - GeoPandas 1.1 requires Python >=3.10, pandas >=2.0, NumPy >=1.24, and pyproj
=3.5. Version 1.1.2 fixed SQL injection through a PostGIS geometry-column name; the pinned 1.1.4 includes that fix.
Plotting and exploration
Maps are analytical outputs: label units, classification method, missing data,
normalization denominator, and date. explore() can expose every attribute in
tooltips/popups and contact tile/CDN servers; generalize first and use
tiles=None, tooltip=False, and popup=False for a local draft.
See visualization.
Bundled local CLIs
All helpers are deterministic, reject network/archive paths, bound input bytes
and feature counts, keep imports lazy so --help is dependency-free, and emit
JSON without coordinates or record identifiers.
| CLI | Purpose |
|---|---|
scripts/vector_inventory.py | Redacted local vector/GeoParquet technical inventory |
scripts/crs_reprojection_plan.py | CRS units, axes, candidate transform and antimeridian plan |
scripts/geometry_validity_report.py | Dry-run validity audit; optional repair to a new GeoPackage |
scripts/spatial_join_audit.py | Predicate semantics, duplicate IDs and join cardinality |
scripts/export_plan.py | Non-executing vector/GeoParquet export contract |
scripts/sensitive_coordinates_checklist.py | Privacy/generalization release gate |
python skills/geopandas/scripts/vector_inventory.py --help
python skills/geopandas/scripts/crs_reprojection_plan.py \
--source-crs EPSG:4326 --target-crs EPSG:32631
python skills/geopandas/scripts/geometry_validity_report.py data.gpkg
python skills/geopandas/scripts/spatial_join_audit.py points.gpkg zones.gpkg \
--predicate within --left-id point_id --right-id zone_id
python skills/geopandas/scripts/export_plan.py data.gpkg result.parquet \
--format geoparquet --schema-version 1.0.0 \
--stable-id-column feature_id --id-unique-verified
python skills/geopandas/scripts/sensitive_coordinates_checklist.py \
--public-output --precise-points --contains-addresses
Reference index
Sources (verified 2026-07-23)
- GeoPandas 1.1.4 on PyPI — released 2026-06-26.
- GeoPandas 1.1.4 release — bug-fix release.
- GeoPandas 1.1.4 tagged dependencies.
- Stable GeoPandas documentation.
- GeoPandas 1.0 migration release.
Alternatives
Compare before choosing
K-Dense-AI/scientific-agent-skills
dask
Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.
K-Dense-AI/scientific-agent-skills
medchem
Medicinal chemistry filters for compound triage. Apply drug-likeness rules (Lipinski, Veber, CNS), structural alert catalogs (PAINS, NIBR, ChEMBL), complexity metrics, and the medchem query language for library filtering.
K-Dense-AI/scientific-agent-skills
neurokit2
Use NeuroKit2 to build or audit reproducible research workflows for physiological time-series preprocessing, event/interval analysis, multimodal alignment, variability, and complexity. Trigger when code imports neurokit2 or needs its current APIs, schemas, and method-aware validation—not for diagnosis or device validation.
github/awesome-copilot
flowstudio-power-automate-mcp
Foundation skill for Power Automate via FlowStudio MCP — auth setup, the reusable MCP helper (Python + Node.js), tool discovery via `list_skills` / `tool_search`, and oversized-response handling. Load this skill first when connecting an agent to Power Automate. For specialized workflows, load `flowstudio-power-automate-build`, `flowstudio-power-automate-debug`, `flowstudio-power-automate-monitoring` (Pro+), or `flowstudio-power-automate-governance` (Pro+) — each contains the workflow narrative,