SiteScan
Turns a parcel polygon into a review-ready KMZ for Google Earth and a DXF for AutoCAD.
What It Does
The idea here was to evaluate suitability of a parcel of land specified by the user for building data centers. In 24-48 hours I was able to wire up over 20 sources of data over different APIs identifying building constraints and mapping them into KMZ or directly to AutoCAD files.
How it works
You give SiteScan a polygon (typically a parcel boundary drawn in Google Earth or exported from a county GIS) and it runs a configurable set of data sources against it: assessor parcels, hydrology, utility corridors, zoning, transmission, and so on. The output is a single KMZ for review in Google Earth or a DXF for AutoCAD, or both. The DXF also comes with high-resolution NAIP aerial photography of the parcel.
Built with
- CLI: Typer, with a single
sitescan runcommand that takes--polygon,--buffer(parsed from human-friendly distances like500m,1mi,2km),--sources,--format, and--imageryoptions. - Web frontend: FastAPI + uvicorn with a single Jinja2 template. Upload a polygon, pick sources, download the bundle. Same code path as the CLI.
- Geo: shapely for polygon math, pyproj for coordinate transforms (UTM ↔ WGS84), simplekml for KMZ output, ezdxf for DXF.
- Imagery: USDA NAIP aerials fetched on demand at two resolutions (1 m for the parcel, 2 m for the surrounding buffer), written either as PDF underlays or JPEG sidecars.
- HTTP: httpx with tenacity-backed retries, plus per-source rate limiters that respect public-API politeness limits.
- Cache: aiosqlite at
~/.cache/sitescan/cache.sqlite, keyed by source name + clipped bbox, so re-runs are cheap. - Packaging: standard
pyproject.tomlwith asitescanentry point, runs in a venv or Docker.