Feat/osm dem - #55
Merged
Merged
Feat/osm dem#55
Conversation
type = "osm" reads ways (roads, rivers, ...) by Overpass statements, clipped to
the grid plus a margin, and registers them as a vector source with checksum and
provenance, ready for the `distance` and `count` operators.
- The answer is cached by request (statements, bbox, date): a pipeline reads the
same bytes, hence the same spec_hash, on every run and workspace.
- `date` asks for an older snapshot ([date:"..."]); with `years`,
date = "{year}-07-01" gives one per year.
- Several public Overpass servers are tried in turn with retries; HTTP 406 stops
at once and points to OSM_CONTACT; an empty answer is an error and not cached.
- Provenance: request, server, time retrieved, timestamp_osm_base, features,
checksum, ODbL attribution.
- Tests run against a local fake Overpass server (no network); guide
docs/guides/osm.md.
Ports 02b_fetch_osm.py of lab15-reconstruction. Not exercised against the real
Overpass API (unreachable from the environment this was written in).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…PODATA type = "dem" reads a digital elevation model over the grid (plus a margin) and registers elevation, or slope in degrees or percent, as a raster source with checksum and provenance, ready for the zonal operators. - dem = srtm | copernicus | topodata, or `tiles` with your own GeoTIFFs. Only the window over the grid is read (HTTP range requests for SRTM and Copernicus); TOPODATA sheets are downloaded once into $DISSCUBE_CACHE/dem. - Slope is computed in the source, because an operator does not see the neighbours of a pixel: bilinear to the UTM zone of the grid's centre at `resolution` metres, then central differences (numpy.gradient). - Voids and values outside -1000..9000 m become NaN. A tile that cannot be opened is skipped with a warning; none readable is an error. - Asking for a Copernicus slope logs a warning: GLO-30 includes the forest canopy, so slopes at forest edges are overestimated. - Tests use synthetic tiles (a plane of known slope, a gzip-ed HGT, a ZIP served by a local HTTP server); guide docs/guides/dem.md. Ports 02c_fetch_dem.py of lab15-reconstruction. Builds on the `osm` commit (same schema, runner and docs insertion points). Not exercised against the real tile servers (unreachable from the environment this was written in). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.