download-data
SolidDownload NAIP aerial imagery for a bounding box. Specify coordinates as minx,miny,maxx,maxy in WGS84 and optionally a year.
Data & Documents 24 stars
3 forks Updated 1 weeks ago MIT
Install
Quality Score: 83/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
Skill Content
You are helping the user download NAIP aerial imagery using geoai.
Input: `$@`
Follow these steps in order.
## Step 1 -- Parse arguments
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.
## Step 2 -- Validate the bounding box
Confirm the bounding box has 4 numeric values and represents a valid geographic extent:
- `minx < maxx` and `miny < maxy`
- Longitude values within -180 to 180
- Latitude values within -90 to 90
- The area is not unreasonably large (warn if the bbox spans more than 1 degree in either direction)
If validation fails, report the issue and ask for corrected coordinates.
## Step 3 -- Run the download
```bash
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...
Details
- Author
- opengeos
- Repository
- opengeos/geoai-skills
- Created
- 4 months ago
- Last Updated
- 1 weeks ago
- Language
- N/A
- License
- MIT
Bundled in these plugins
Similar Skills
Semantically similar based on skill content — not just same category
Data & Documents Solid
overture-data
Download Overture Maps data (buildings, places, roads, land use, water, etc.) for a bounding box. Returns a GeoDataFrame saved as GeoJSON or GeoPackage.
24 Updated 1 weeks ago
opengeos AI & Automation Solid
search-stac
Search and download satellite imagery from Microsoft Planetary Computer. Browse available collections, search by bbox and time range, list assets, and download specific items.
24 Updated 1 weeks ago
opengeos Data & Documents Solid
process-raster
Process raster data: clip by bounding box, stack multiple bands, mosaic GeoTIFFs, or convert between raster and vector formats.
24 Updated 1 weeks ago
opengeos