بنقرة واحدة
inspect-geo
// Inspect any raster or vector geospatial file. Returns CRS, bounds, bands, resolution, dtype, attribute summaries, and band statistics. Supports GeoTIFF, Shapefile, GeoJSON, GeoPackage, GeoParquet, and more.
// Inspect any raster or vector geospatial file. Returns CRS, bounds, bands, resolution, dtype, attribute summaries, and band statistics. Supports GeoTIFF, Shapefile, GeoJSON, GeoPackage, GeoParquet, and more.
Run pre-trained AI models on geospatial imagery. Detect buildings, cars, ships, solar panels, agriculture fields, or use text-prompted segmentation with GroundedSAM. Requires GPU for best performance.
Download NAIP aerial imagery for a bounding box. Specify coordinates as minx,miny,maxx,maxy in WGS84 and optionally a year.
Verify that the geoai Python package is installed and functional. If not, provide installation instructions. Optionally check extra dependencies for deep learning models.
Download Overture Maps data (buildings, places, roads, land use, water, etc.) for a bounding box. Returns a GeoDataFrame saved as GeoJSON or GeoPackage.
Process raster data: clip by bounding box, stack multiple bands, mosaic GeoTIFFs, or convert between raster and vector formats.
Search past Claude Code session logs to recover context from previous conversations. Finds past decisions, data paths, CRS info, model configurations, and unresolved work. Works across all projects or scoped to the current one.
| name | inspect-geo |
| description | Inspect any raster or vector geospatial file. Returns CRS, bounds, bands, resolution, dtype, attribute summaries, and band statistics. Supports GeoTIFF, Shapefile, GeoJSON, GeoPackage, GeoParquet, and more. |
| argument-hint | <filepath> [question about the data] |
| allowed-tools | Bash |
You are helping the user inspect a geospatial data file.
Filename given: $0
Question: ${1:-describe the data}
Follow these steps in order, stopping and reporting clearly if any step fails.
If $0 looks like an absolute path, use it directly. Otherwise search for it:
find "$PWD" -name "$0" -not -path '*/.git/*' 2>/dev/null
RESOLVED_PATH.Determine whether the file is raster or vector based on its extension:
.tif, .tiff, .img, .jp2, .vrt, .nc, .hdf.geojson, .json, .shp, .gpkg, .parquet, .geoparquet, .fgb, .kmlIf the extension is ambiguous, try raster first, then vector.
python3 -c "
import geoai
info = geoai.get_raster_info('RESOLVED_PATH')
for k, v in info.items():
print(f'{k}: {v}')
print('---')
print('Band Statistics:')
stats = geoai.get_raster_stats('RESOLVED_PATH')
for k, v in stats.items():
print(f'{k}: {v}')
"
python3 -c "
import geoai
info = geoai.get_vector_info('RESOLVED_PATH')
for k, v in info.items():
print(f'{k}: {v}')
"
Replace RESOLVED_PATH with the actual absolute path before running.
Using the metadata retrieved in Step 3, answer:
${1:-describe the data: summarize the file type, CRS, extent, and any notable properties.}
For vector files, if the question references a specific attribute, run an additional analysis:
python3 -c "
import geoai
result = geoai.analyze_vector_attributes('RESOLVED_PATH')
print(result)
"
Resolve the state directory:
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, update it with the inspected file info:
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['last_inspected'] = {
'path': 'RESOLVED_PATH',
'type': 'TYPE',
}
with open(state_file, 'w') as f:
json.dump(state, f, indent=2)
"
Replace STATE_DIR, RESOLVED_PATH, and TYPE (raster or vector) with actual values.
If no state directory exists yet, skip this step silently.
After reporting, briefly mention:
/geoai-skills:process-raster. To run AI detection on it, use /geoai-skills:detect-objects."/geoai-skills:overture-data."Keep suggestions brief and show them only once.
python3 is not found or import geoai fails, delegate to /geoai-skills:install-geoai.python3 -c "
import geoai
info = geoai.get_raster_info_gdal('RESOLVED_PATH')
for k, v in info.items():
print(f'{k}: {v}')
"
Or for vectors:
python3 -c "
import geoai
info = geoai.get_vector_info_ogr('RESOLVED_PATH')
for k, v in info.items():
print(f'{k}: {v}')
"