Skip to content

Add configurable DEM sources and centerline file imports - #2

Open
johnhuebbe wants to merge 2 commits into
Iconem:mainfrom
johnhuebbe:feature/configurable-dem-sources
Open

Add configurable DEM sources and centerline file imports#2
johnhuebbe wants to merge 2 commits into
Iconem:mainfrom
johnhuebbe:feature/configurable-dem-sources

Conversation

@johnhuebbe

Copy link
Copy Markdown

Summary

This adds configurable elevation (DEM) and centerline sources to the RiverREM server workflow. I wanted a way to use local DEM files (either uploaded or via a local folder) and additional centerline GIS files (geopkg and shp). The 2 additional DEM options are not enabled by default; the thinking being if this is deployed online a server admin may not want to allow users to upload large files or configure a folder.

Note: this branch includes commit 3bed64c (my pending color-relief fix). This PR is stacked on my earlier color-relief PR. If that PR merges first, GitHub should automatically remove the already-merged commit from this PR’s changes.

DEM sources

  • Add streamed local GeoTIFF uploads.
  • Add an optional read-only server DEM library.
  • Retain support for Mapterhorn and remote COG URLs.
  • Hide upload/library options unless enabled by the server.
  • Automatically remove expired uploaded DEMs.
  • Limit custom DEM processing size to reduce memory failures.
  • Check custom DEM, viewport, and centerline overlap before processing.

Centerlines

  • Add GeoJSON, GeoPackage, and zipped Shapefile imports.
  • Assume GeoJSON uses EPSG:4326.
  • Detect and reproject CRS-aware GeoPackages and Shapefiles.
  • Prompt for a CRS when metadata is missing.
  • Support layer selection for multi-layer files.
  • Show filename, CRS, feature count, coordinate count, length, and import warnings.
  • Validate Shapefile components, geometry, coordinates, and complexity.
  • Ignore macOS ZIP metadata such as __MACOSX and AppleDouble files.

Documentation

  • Add setup and usage instructions to the main README.
  • Add detailed DEM-source and centerline-import documentation.
  • Document the new environment variables and Docker configuration.

Testing

  • Frontend production build passes.
  • All 10 backend tests pass.
  • Tested GeoJSON, GeoPackage, and macOS-created Shapefile ZIP imports.
  • Tested EPSG:6344 reprojection against a custom DEM.
  • Tested successful and non-overlapping custom DEM/centerline combinations.

This branch is currently stacked on the previously submitted color-relief display fix.

riverrem1 riverrem2 riverrem3 riverrem4 riverrem5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant