From geoai-skills
Downloads NAIP aerial imagery for a WGS84 bounding box via geoai library. Parses coordinates, validates extent, supports year, output dir, and max items.
How this skill is triggered — by the user, by Claude, or both
Slash command
/geoai-skills:download-dataThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are helping the user download NAIP aerial imagery using geoai.
You are helping the user download NAIP aerial imagery using geoai.
Input: $@
Follow these steps in order.
Extract the bounding box from the first argument (comma-separated minx,miny,maxx,maxy).
Parse optional flags from remaining arguments:
--year YYYY -> download year (default: most recent available)--output DIR -> output directory (default: ./naip_data/)--max-items N -> maximum number of items to download (default: 10)If the input is natural language (e.g. "download NAIP imagery for Knoxville, TN"), extract or infer the bounding box. If you cannot determine the bbox, ask the user for coordinates.
Confirm the bounding box has 4 numeric values and represents a valid geographic extent:
minx < maxx and miny < maxyIf validation fails, report the issue and ask for corrected coordinates.
python3 -c "
import geoai, os
bbox = (MINX, MINY, MAXX, MAXY)
output_dir = 'OUTPUT_DIR'
os.makedirs(output_dir, exist_ok=True)
result = geoai.download_naip(
bbox=bbox,
output_dir=output_dir,
year=YEAR,
max_items=MAX_ITEMS,
)
if isinstance(result, list):
for f in result:
size_mb = os.path.getsize(f) / (1024 * 1024) if os.path.exists(f) else 0
print(f'{f} ({size_mb:.1f} MB)')
print(f'Total files: {len(result)}')
elif isinstance(result, str):
size_mb = os.path.getsize(result) / (1024 * 1024) if os.path.exists(result) else 0
print(f'{result} ({size_mb:.1f} MB)')
else:
print(f'Result: {result}')
"
Replace MINX, MINY, MAXX, MAXY, OUTPUT_DIR, YEAR, and MAX_ITEMS with actual values.
For the year parameter:
--year was specified, use that value (e.g. year=2022)year=None to get the most recent availableIf a state directory exists, update it with the downloaded file paths:
STATE_DIR=""
test -f .geoai-skills/state.json && STATE_DIR=".geoai-skills"
PROJECT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || echo "$PWD")"
PROJECT_ID="$(echo "$PROJECT_ROOT" | tr '/' '-')"
test -f "$HOME/.geoai-skills/$PROJECT_ID/state.json" && STATE_DIR="$HOME/.geoai-skills/$PROJECT_ID"
If STATE_DIR is set:
python3 -c "
import json, os
state_file = 'STATE_DIR/state.json'
state = {}
if os.path.exists(state_file):
with open(state_file) as f:
state = json.load(f)
state.setdefault('downloaded_files', [])
state['downloaded_files'].extend(DOWNLOADED_FILES)
with open(state_file, 'w') as f:
json.dump(state, f, indent=2)
"
Summarize the download:
Then suggest: "Use /geoai-skills:inspect-geo to examine the downloaded imagery, or /geoai-skills:detect-objects to run AI models on it."
import geoai fails -> delegate to /geoai-skills:install-geoai.--max-items or using a smaller bounding box.npx claudepluginhub opengeos/geoai-skills --plugin geoai-skillsDownloads Overture Maps data (buildings, places, roads, land use, water) for a bounding box using geoai library. Saves GeoDataFrame as GeoJSON or GeoPackage.
Provides geospatial analysis: remote sensing, GIS, spatial ML, satellite imagery processing (Sentinel, Landsat, etc.), vector/raster ops, point clouds, network analysis, cloud-native workflows with 500+ code examples in 8 languages.
Downloads USGS 3DEP LiDAR DEM data for US locations, colorizes points with ESRI satellite imagery, generates CRS-tagged LAS files for Metashape import as laser scan ground truth to extend photogrammetry terrain.