Repository navigation
fix(analysis): take a projected DEM's cells in feet as metres in Viewshed, Measure volume and the mosaic (#3346) - #3369
Conversation
…shed, Measure volume and the mosaic (opengeos#3346) Raster::cell_size_ground_m() gives the cell with a projected system's unit turned into metres. Viewshed (radius, curvature, default diagonal), Measure volume (cubic metres) and the longitude/latitude mosaic's finest pixel use it; cell_size_m keeps the coordinates' unit for the terrain functions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Code reviewScope: 5 files, one behavioural change. Bugs
Security
Performance
Quality
AGENTS.md
Checked, no change needed
Change sizeCompared with main (merge base f943424 to PR head a19b687).
|
📖 Docs preview
GitHub Pages takes a minute or two to publish a new commit. Newer commits from the fork aren't published until a maintainer adds the |
What
Raster::cell_size_mreturns a projected raster's cell in its system's own unit, which slope, aspect, hillshade and the shadows rely on. Three callers mixed that cell with values in metres. This addsRaster::cell_size_ground_m()beside it (the cell with a projected system's unit turned into metres) and uses it there only:rasterops::viewshed), and the workflow's default radius, the raster's diagonal (workflows.rs).cubicMetresAbove/cubicMetresBelow(imagery.rs).imagery.rs). On main an image in feet got a pixel 3.28 times coarser than its own (10 ft taken as 10 m), so about 10.8 times fewer cells, not more as the issue guessed.cell_size_mitself doesn't change.Tests (written first, failing on main)
a_viewshed_on_a_dem_in_feet_takes_its_radius_in_metres: the issue's table. On main EPSG:2263 sees 2,821 cells against 30,453 in EPSG:32618 on the same ground; now both see 30,453.a_volume_on_a_dem_in_feet_is_in_cubic_metres: a box 10 high on 10 × 10 cells of 10 ft. On main 100,000 (ft² × height); now 9,290.34 m³, as in UTM.a_mosaic_in_degrees_of_an_image_in_feet_keeps_its_pixel: on main 0.0001185° against the image's own 0.0000361°.Closes #3346
🤖 Generated with Claude Code
Summary by CodeRabbit