AGENT SKILL

spatial-joins

Provides techniques for performing spatial operations like joins, contains, and distance calculations to identify relations between geographic features.

License 许可
MIT
最近更新
2026-10-02
Stars
★ 93
Forks
8

01 前言 Front Matter

name
spatial-joins
description
Provides techniques for performing spatial operations like joins, contains, and distance calculations to identify relations between geographic features.

03 SKILL.md 正文

Spatial Operations with GeoPandas

Point-in-Polygon

Use geopandas.sjoin() to identify points contained within specific polygons (e.g., plates).

# Join points and polygons
joined = gpd.sjoin(points_gdf, polygons_gdf, how='inner', predicate='within')

Distance Calculation

To find the distance from points to boundaries, reproject to an appropriate CRS (meters) and calculate the distance to the nearest boundary.

# Find distance from each point to the nearest polygon boundary
distances = points_gdf.distance(boundaries_gdf.unary_union)

04 同仓库更多 Skills