How elevation sources are ranked
The goal is the best suitable source, not the finest advertised grid. A 0.5 m grid resampled from sparse data contains no more real detail than a 1 m one, and it's slower to process. The code is in services/gis-worker/gis_worker/terrain/ranking.py. These rules are starting judgments, not published standards, so a drainage engineer should review them.
Sources that can't be used
| Condition | Why |
|---|---|
| Unknown vertical datum | Elevations could be off by feet, with no way to tell |
| Under 50% coverage | Too little of the area to build a terrain surface from |
| Coarser than 3 m | Can't support tile grades, which are measured in tenths of a percent |
These are still listed, with the reason, but they can't be recommended. If nothing is usable, the app says so rather than recommending bad data.
Score
Usable sources get a score out of 100.
| Factor | Points | How it's scored |
|---|---|---|
| Data quality | 35 | QL 0 or 1: 35. QL 2: 28. QL 3: 15. State program, level unstated: 24. Unknown: 10 |
| Usable detail | 25 | At 1 m or finer: 25. 2 m: 18. 3 m: 10 |
| Age | 15 | Full marks when new, falling to none at 15 years. Unknown date: 5 |
| Ready to use | 15 | Ready-made DEM: 15. Streaming point cloud: 10. Downloaded tiles: 3 |
| Coverage | 10 | Share of the area covered |
Three penalties apply:
- Below specification, minus 25. USGS marks some older datasets as not meeting its specification. They stay available, because sometimes they're all there is.
- Incomplete coverage, minus 30. Anything under 95% would leave holes in the terrain.
- Geoid not stated, minus 5. The height datum is known but the geoid model behind it isn't, which lowers confidence without ruling the data out.
Coverage is measured against where the data is
A USGS 1 m DEM comes in tiles 10 km square, and a lidar project's data can stop anywhere inside one. A field across the line between two projects is wholly inside both projects' tiles, though each has data for only part of it. Measured against the tiles, both scored 100%, the one covering less could be recommended, and the two were never offered joined.
So a 1 m DEM's coverage is its tiles' boxes cut down to the outline of its lidar work units, which USGS's 3DEP index gives with each project's dates and quality. A project in several work units has the outline of all of them together. The area is measured in the project's coordinate system, as before.
- The outlines are drawn more coarsely than the data. The one at Fargo has 76 corners around some 150 km, so coverage near a project's edge can be a little out either way. A build checks what it got: see "Mixed-vintage coverage" in
hard-cases.md. - Without an outline, the tiles' boxes are used as before, and the source says so: "Without an outline of this project from USGS's index, its coverage is measured against whole 10 km tiles, and may be less than it says." That happens when the index can't be read or has no record of the project.
- Only 1 m DEMs. Point cloud tiles are about 1 km square, so their boxes are close to their data, and they're left as they were.
Usable detail is what the data supports
A grid only counts for the detail its data can back up:
| Quality or measured density | Supports |
|---|---|
| QL 0 or QL 1, or 8+ points per m² | 0.5 m |
| QL 2, or 2+ points per m² | 1 m |
| QL 3, or 0.5+ points per m² | 2 m |
| Below that | 3 m |
A DEM with no stated quality level is treated as supporting 1 m. So a 0.5 m DEM of unknown quality scores the same detail as a 1 m one, and ties go to the coarser grid because it's quicker to process and no less real.
For point clouds, usable detail comes from the measured density when there is one, and otherwise from the quality level. A point cloud with neither has shown nothing yet, so it counts as 3 m until its density is measured.
Ties
Equal scores go to the coarser grid, then to the dataset ID, so the same inputs always give the same ranking.
Overriding
A person can choose any usable source instead. That's recorded in the project's history, and it stays until they go back to the recommendation.