ol-mapbox-style icon indicating copy to clipboard operation
ol-mapbox-style copied to clipboard

Hillshade uses incorrect resolution when determining slope angles

Open mike-000 opened this issue 1 year ago • 3 comments

The resolution in projection units is used to calculate slopes, while DEM sources provide elevations in true meters. Therefore if Kilimanjaro was moved to Norway is would appear to be only half as steep. Mapbox appears to compensate for that (as it does when extruding buildings). When using ol/source/Raster I think the best that could be provided would be the point resolution of the view center in true meters (adjusted for pixel ratio) which could be included in the beforeoperations RasterSourceEvent (or it could simply include the entire frameState and leave the detail to the application). A WebGL implementation could potentially make an adjustment specific to each tile.

mike-000 avatar Apr 08 '23 18:04 mike-000