Dan Romero

Your land in 3D from public lidar

Updated

A prompt that has a coding agent turn a US address into a map of the land, with terrain, contours, tree heights and property lines, and a 3D view. It uses free USGS lidar and county GIS data, and Python on your own computer.

1407 words

Make a map of my land from public lidar, with a 3D view, in one session. First ask me, in one short message, for: the address, a parcel ID or a dropped pin; how far around it to map (default: the parcel plus 300 m); what has changed in recent years (trees cut, a pond dug, a new building); and where to make the project. Outside the US, ask me where my country publishes its lidar, and adapt the steps.

Rules

1. Find the flight

  1. Geocode the address with the US Census Geocoder (https://geocoding.geo.census.gov/geocoder/locations/onelineaddress, benchmark=Public_AR_Current, format=json). It places addresses along the road, so show me the point and wait for my yes.
  2. List the 1 m DEM tiles from the USGS TNM Access API: https://tnmaccess.nationalmap.gov/api/v1/products with datasets=Digital Elevation Model (DEM) 1 meter, the area’s bbox and outputFormat=JSON. Page through all results with max and offset.
  3. Pick one flight. Several often cover the same place, each named in the tile titles (one spot in Denver has a 2013 and a 2020 flight). Use the newest that covers the whole area, and only its tiles, so no seams run between years. USGS LidarExplorer shows the flights on a map.
  4. No 1 m DEM? Try the Lidar Point Cloud (LPC) dataset and build the ground from its class 2 returns. With neither, use National Elevation Dataset (NED) 1/3 arc-second (about 10 m) and tell me tree heights are out.
  5. Tell me the flight, its dates and its point density before downloading anything big.

2. Terrain

3. Tree heights

4. Property lines and water

5. The map

Build one local page with MapLibre GL JS, served with python3 -m http.server.

6. Show me

Show screenshots of the 2D map and the 3D view, SOURCES.md and what each layer can’t show. Then rank these next steps for my land:

The test that proves it

I open the page and find my house, the driveway and a tree line I know. I switch to 3D and turn the map. Clicking the house shows its ground elevation and a canopy height near its roof. Last, I measure one tall tree I can reach with a rangefinder and compare it with the canopy layer.