GetVirtualHeightMapInBBox does not work when DEMFileRegistrationMode is Cell
Opened this issue · 1 comments
g0ro commented
Trying to get heightmap in bbox, using GeoTiff dataset with Cell file format, fails when bbox is partially covered.
RasterService.GetVirtualHeightMapInBBox(...) returns a hightmap half pixel shifted. This results in incorrect height map when merging tilesHeightMap in ElevationService.GetHeightMap(....)
When DEMFileRegistrationMode is Cell, we should add (metadata.pixelSizeY / 2d) to metadata.DataEndLat, and (metadata.pixelSizeX / 2d) to metadata.DataStartLon
(File:
Reference:
DEM.Net/DEM.Net.Core/IO/Raster/GeoTiff.cs
Line 440 in 168cd8e