Agent skill

Geospatial Analysis

by benchflow-ai in benchflow-ai/skillsbench

Analyze geospatial data using geopandas with proper coordinate projections.

MITAuto-check passedData & Analytics

Install Geospatial Analysis

skills CLI
$ npx skills add benchflow-ai/skillsbench --skill geospatial-analysis -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install benchflow-ai/skillsbench geospatial-analysis --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/benchflow-ai/skillsbench.git skills-src && mkdir -p .claude/skills && cp -r skills-src/tasks/earthquake-plate-calculation/environment/skills/geospatial-analysis .claude/skills/geospatial-analysis && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
geospatial-analysis
GitHub stars
1.8k
Token cost
~1.9k tokens
SKILL.md length
351 words
Files
1
Skills in repo
189
Repo updated
First seen
Licence
MIT

At a glance

Analyze geospatial data using geopandas with proper coordinate projections.

  • Works in 4 steps: Filter before projecting: Reduce data… → Project once: Convert to metric CRS… → Use .unary_union: Combine geometries… → …
  • Calculating distances between geographic features
  • SKILL.md covers Overview, Key Concepts, Loading Geospatial Data and Spatial Filtering, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Geospatial Analysis is an agent skill from benchflow-ai/skillsbench. Analyze geospatial data using geopandas with proper coordinate projections. Use when calculating distances between geographic features, performing spatial filtering, or working with plate boundaries and earthquake data.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Data & Analytics, covering Geospatial analysis. The repository describes itself as: SkillsBench evaluates how well skills work and how effective agents are at using them. The licence is MIT.

When your agent uses it

  • Calculating distances between geographic features
  • Performing spatial filtering
  • Working with plate boundaries and earthquake data

Example prompts

  • “/geospatial-analysis”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Filter before projecting: Reduce data size before expensive operations
  2. Project once: Convert to metric CRS once, not in loops
  3. Use .unary_union: Combine geometries before distance calculations
  4. Copy when modifying: Use .copy() when creating filtered DataFrames

What it can do on your machine

Read from SKILL.md and the folder at commit 9a1f4dd. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Geospatial Analysis loads about 1.9k tokens when it runs. Until then it costs about 60 tokens; SKILL.md has 351 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~60
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from benchflow-ai/skillsbench at commit 9a1f4dd, republished under its MIT licence (© benchflow-ai). 351 words, ~1,880 tokens.

Download SKILL.mdSave it as .claude/skills/geospatial-analysis/SKILL.md (or your agent's skills folder).
name
geospatial-analysis
description
Analyze geospatial data using geopandas with proper coordinate projections. Use when calculating distances between geographic features, performing spatial filtering, or working with plate boundaries and earthquake data.
license
MIT

Geospatial Analysis with GeoPandas

Overview

When working with geographic data (earthquakes, plate boundaries, etc.), using geopandas with proper coordinate projections provides accurate distance calculations and efficient spatial operations. This guide covers best practices for geospatial analysis.

Key Concepts

Geographic vs Projected Coordinate Systems
Coordinate SystemTypeUnitsUse Case
EPSG:4326 (WGS84)GeographicDegrees (lat/lon)Data storage, display
EPSG:4087 (World Equidistant Cylindrical)ProjectedMetersDistance calculations

Critical Rule: Never calculate distances directly in geographic coordinates (EPSG:4326). Always project to a metric coordinate system first.

Why Projection Matters
python
# ❌ INCORRECT: Calculating distance in EPSG:4326
# This treats degrees as if they were equal distances everywhere on Earth
gdf = gpd.GeoDataFrame(..., crs="EPSG:4326")
distance = point1.distance(point2)  # Wrong! Returns degrees, not meters

# ✅ CORRECT: Project to metric CRS first
gdf_projected = gdf.to_crs("EPSG:4087")
distance_meters = point1_proj.distance(point2_proj)  # Correct! Returns meters
distance_km = distance_meters / 1000.0

Loading Geospatial Data

From GeoJSON Files
python
import geopandas as gpd

# Load GeoJSON files directly
gdf_plates = gpd.read_file("plates.json")
gdf_boundaries = gpd.read_file("boundaries.json")
From Regular Data with Coordinates
python
from shapely.geometry import Point
import geopandas as gpd

# Convert coordinate data to GeoDataFrame
data = [
    {"id": 1, "lat": 35.0, "lon": 140.0, "value": 5.5},
    {"id": 2, "lat": 36.0, "lon": 141.0, "value": 6.0},
]

geometry = [Point(row["lon"], row["lat"]) for row in data]
gdf = gpd.GeoDataFrame(data, geometry=geometry, crs="EPSG:4326")

Spatial Filtering

Finding Points Within a Polygon
python
# Get the polygon of interest
target_poly = gdf_plates[gdf_plates["Name"] == "Pacific"].geometry.unary_union

# Filter points that fall within the polygon
points_inside = gdf_points[gdf_points.within(target_poly)]

print(f"Found {len(points_inside)} points inside the polygon")
Using .unary_union for Multiple Geometries

When you have multiple polygons or lines that should be treated as one:

python
# Combine multiple boundary segments into one geometry
all_boundaries = gdf_boundaries.geometry.unary_union

# Or filter first, then combine
pacific_boundaries = gdf_boundaries[
    gdf_boundaries["Name"].str.contains("PA")
].geometry.unary_union

Distance Calculations

Point to Line/Boundary Distance
python
# 1. Load your data
gdf_points = gpd.read_file("points.json")
gdf_boundaries = gpd.read_file("boundaries.json")

# 2. Project to metric coordinate system
METRIC_CRS = "EPSG:4087"
points_proj = gdf_points.to_crs(METRIC_CRS)
boundaries_proj = gdf_boundaries.to_crs(METRIC_CRS)

# 3. Combine boundary segments if needed
boundary_geom = boundaries_proj.geometry.unary_union

# 4. Calculate distances (returns meters)
gdf_points["distance_m"] = points_proj.geometry.distance(boundary_geom)
gdf_points["distance_km"] = gdf_points["distance_m"] / 1000.0
Finding Furthest Point
python
# Sort by distance and get the furthest point
furthest = gdf_points.nlargest(1, "distance_km").iloc[0]

print(f"Furthest point: {furthest['id']}")
print(f"Distance: {furthest['distance_km']:.2f} km")

Common Workflow Pattern

Here's a complete example for analyzing earthquakes near plate boundaries:

python
import geopandas as gpd
from shapely.geometry import Point

# 1. Load data
earthquakes_data = [...]  # Your earthquake data
gdf_plates = gpd.read_file("plates.json")
gdf_boundaries = gpd.read_file("boundaries.json")

# 2. Create earthquake GeoDataFrame
geometry = [Point(eq["longitude"], eq["latitude"]) for eq in earthquakes_data]
gdf_eq = gpd.GeoDataFrame(earthquakes_data, geometry=geometry, crs="EPSG:4326")

# 3. Spatial filtering - find earthquakes in specific plate
target_plate = gdf_plates[gdf_plates["Code"] == "PA"].geometry.unary_union
earthquakes_in_plate = gdf_eq[gdf_eq.within(target_plate)].copy()

# 4. Calculate distances (project to metric CRS)
METRIC_CRS = "EPSG:4087"
eq_proj = earthquakes_in_plate.to_crs(METRIC_CRS)

# Filter and combine relevant boundaries
plate_boundaries = gdf_boundaries[
    gdf_boundaries["Name"].str.contains("PA")
].to_crs(METRIC_CRS).geometry.unary_union

# Calculate distances
earthquakes_in_plate["distance_km"] = eq_proj.geometry.distance(plate_boundaries) / 1000.0

# 5. Find the furthest earthquake
furthest_eq = earthquakes_in_plate.nlargest(1, "distance_km").iloc[0]

Filtering by Attributes

python
# Filter by name or code
pacific_plate = gdf_plates[gdf_plates["PlateName"] == "Pacific"]
pacific_plate_alt = gdf_plates[gdf_plates["Code"] == "PA"]

# Filter boundaries involving a specific plate
pacific_bounds = gdf_boundaries[
    (gdf_boundaries["PlateA"] == "PA") | 
    (gdf_boundaries["PlateB"] == "PA")
]

# String pattern matching
pa_related = gdf_boundaries[gdf_boundaries["Name"].str.contains("PA")]

Performance Tips

  1. Filter before projecting: Reduce data size before expensive operations
  2. Project once: Convert to metric CRS once, not in loops
  3. Use .unary_union: Combine geometries before distance calculations
  4. Copy when modifying: Use .copy() when creating filtered DataFrames
python
# Good: Filter first, then project
small_subset = gdf_large[gdf_large["region"] == "Pacific"]
small_projected = small_subset.to_crs(METRIC_CRS)

# Avoid: Projecting large dataset just to filter
# gdf_projected = gdf_large.to_crs(METRIC_CRS)
# small_subset = gdf_projected[gdf_projected["region"] == "Pacific"]
Show full SKILL.md (163 more words)Show less

Common Pitfalls

IssueProblemSolution
Distance in degreesUsing EPSG:4326 for distance calculationsProject to EPSG:4087 or similar metric CRS
Antimeridian issuesManual longitude adjustments (±360)Use geopandas spatial operations, they handle it
Slow performanceCalculating distance to each boundary point separatelyUse .unary_union + single .distance() call
Missing geometriesSome features have no geometryFilter with gdf[gdf.geometry.notna()]

When NOT to Use Manual Calculations

Avoid implementing your own:

  • Haversine distance formulas (use geopandas projections instead)
  • Point-in-polygon checks (use .within())
  • Iterating through boundary points (use .distance() with .unary_union)

These manual approaches are slower, more error-prone, and less accurate than geopandas methods.

Best Practices Summary

  1. ✅ Load GeoJSON with gpd.read_file()
  2. ✅ Use .within() for spatial filtering
  3. ✅ Project to metric CRS (EPSG:4087) before distance calculations
  4. ✅ Combine geometries with .unary_union before distance calculation
  5. ✅ Use .distance() method for point-to-geometry distances
  6. ✅ Use .nlargest() / .nsmallest() for finding extreme values
  7. ❌ Never calculate distances in EPSG:4326
  8. ❌ Avoid manual Haversine implementations
  9. ❌ Don't iterate through individual boundary points

© benchflow-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in tasks/earthquake-plate-calculation/environment/skills/geospatial-analysis of benchflow-ai/skillsbench.

Open the folder on GitHubat commit 9a1f4dd

Compare with similar skills

Geospatial Analysis next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Geospatial Analysis compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Geospatial Analysis this skillbenchflow-ai/skillsbench1.8k—~1.9kAutomated safety check: PassMIT
Antv L7antvis/L74.1k—~1.4kAutomated safety check: PassMIT
Portaljs Add Geodatopian/portaljs2.4k1 repos~1.7kAutomated safety check: PassMIT
Thematic Mapzzhonglei/GeoCode-Release189—~3.1kAutomated safety check: PassMIT
Rs Paper Pipelinethinson/RS-PaperClaw230—~319Automated safety check: PassMIT
Remote Sensing Research Radarlimi124/remote-sensing-research-radar143—~1.3kAutomated safety check: PassNone

Similar skills

  • Antv L7

    antvis/L7

    Comprehensive guide for AntV L7 geospatial visualization library.

    4.1k GitHub stars~1.4k tokensUpdated 1 mo ago
    Data & AnalyticsAuto-check passed
  • Portaljs Add Geo

    datopian/portaljs

    Auto-ingest a geospatial file (GeoJSON, Shapefile, GeoPackage, KML/KMZ, FlatGeobuf, CSV-with-geometry) into a PortalJS portal on the user's own machine, with no server.

    2.4k GitHub starsUsed in 1 repo~1.7k tokens
    Data & AnalyticsAuto-check passed
  • Thematic Map

    zzhonglei/GeoCode-Release

    Create well-designed maps that follow standard cartographic conventions.

    189 GitHub stars~3.1k tokensUpdated 6 days ago
    Data & AnalyticsAuto-check passed
  • Rs Paper Pipeline

    thinson/RS-PaperClaw

    A skill your agent uses when operating or maintaining the RS-PaperClaw pipeline that fetches remote-sensing arXiv papers, creates per-paper issues, builds daily digests, reconciles issue sets, and…

    230 GitHub stars~319 tokensUpdated today
    Data & AnalyticsAuto-check passed
  • Remote Sensing Research Radar

    limi124/remote-sensing-research-radar

    Track, retrieve, screen, and synthesize research frontiers for geospatial AI, remote sensing big data, and transferable computer vision methods.

    143 GitHub stars~1.3k tokensUpdated 5 mo ago
    Data & AnalyticsAuto-check passed
  • Live Weather Briefing Skill

    FrancyJGLisboa/agent-skills-platform

    Create a current, source-linked weather briefing for a named city using the Open-Meteo geocoding and forecast APIs.

    2.4k GitHub stars~599 tokensUpdated 24 days ago
    Data & AnalyticsAuto-check passed

More from benchflow-ai/skillsbench

All 189 skills in this repo
  • Lean4 Memories

    benchflow-ai/skillsbench

    This skill should be used when working on Lean 4 formalization projects to maintain persistent memory of successful proof patterns, failed approaches, project conventions, and user preferences…

    1.8k GitHub stars~3.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Senior Data Engineer

    benchflow-ai/skillsbench

    World-class data engineering skill for building scalable data pipelines, ETL/ELT systems, real-time streaming, and data infrastructure.

    1.8k GitHub stars~5.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Ac Branch Pi Model

    benchflow-ai/skillsbench

    AC branch pi-model power flow equations (P/Q and |S|) with transformer tap ratio and phase shift, matching acopf-math-model.md and MATPOWER branch fields.

    1.8k GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed
  • Civ6lib

    benchflow-ai/skillsbench

    Civilization 6 district mechanics library. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~1.7k tokensUpdated 2 mo ago
    Auto-check passed
  • D3 Visualization

    benchflow-ai/skillsbench

    Build deterministic, verifiable data visualizations with D3.js (v6).

    1.8k GitHub stars~1.5k tokensUpdated 2 mo ago
    Auto-check passed
  • Dc Power Flow

    benchflow-ai/skillsbench

    DC power flow analysis for power systems. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~717 tokensUpdated 2 mo ago
    Auto-check passed

Questions about Geospatial Analysis

What does Geospatial Analysis do?

Analyze geospatial data using geopandas with proper coordinate projections. Geospatial Analysis is an agent skill from benchflow-ai/skillsbench. Analyze geospatial data using geopandas with proper coordinate projections.

When should I use Geospatial Analysis?

Geospatial Analysis fits situations like: calculating distances between geographic features; performing spatial filtering; working with plate boundaries and earthquake data.

How do I install Geospatial Analysis in Claude Code?

Run `npx skills add benchflow-ai/skillsbench --skill geospatial-analysis -a claude-code`. Or copy the skill folder (tasks/earthquake-plate-calculation/environment/skills/geospatial-analysis in benchflow-ai/skillsbench) into .claude/skills/geospatial-analysis in your project. Claude Code loads it when a task matches its description.

How do I install Geospatial Analysis in Codex?

Run `npx skills add benchflow-ai/skillsbench --skill geospatial-analysis -a codex`. Or copy the skill folder (tasks/earthquake-plate-calculation/environment/skills/geospatial-analysis in benchflow-ai/skillsbench) into .agents/skills/geospatial-analysis in your project. Codex loads it when a task matches its description.

Can I use Geospatial Analysis in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add benchflow-ai/skillsbench --skill geospatial-analysis -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/geospatial-analysis, .gemini/skills/geospatial-analysis, .github/skills/geospatial-analysis and .opencode/skills/geospatial-analysis in your project.

What does Geospatial Analysis need to run?

SKILL.md names no scripts, command-line tools or credentials: Geospatial Analysis is instructions for the agent only. Our summary lists: Python 3.

Does Geospatial Analysis access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Geospatial Analysis safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Geospatial Analysis use?

Geospatial Analysis is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Geospatial Analysis use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Geospatial Analysis?

Skills that share tags, products or a category with Geospatial Analysis: Antv L7 (antvis/L7, 4.1k stars), Portaljs Add Geo (datopian/portaljs, 2.4k stars), Thematic Map (zzhonglei/GeoCode-Release, 189 stars) and Rs Paper Pipeline (thinson/RS-PaperClaw, 230 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Geospatial Analysis?

benchflow-ai (a GitHub organization) maintains it in benchflow-ai/skillsbench, which has 1,835 GitHub stars. The repository holds 189 skills in this directory. The repository was last updated on July 23, 2026.

Source: benchflow-ai/skillsbench on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.