melowntech / vts-mapproxy

VTS Mapproxy
BSD 2-Clause "Simplified" License
30 stars 5 forks source link

Filling in tiles for missing raster info #12

Open suur opened 3 years ago

suur commented 3 years ago

Hello,

I have set up a global DEM from 1 arc sec SRTM data, following the Backend tutorials on vts-geospatial.org. The resulting surface, when viewed with vts-browser-js, has gaps for the sea, similar to the original SRTM raster. Is it possible to fill the sea-level gaps, so that a raster (with full coverage) can be draped over the entire sphere?

ladislavhorky commented 3 years ago

Hello suur,

this very much depends on how the input data look like.

If you have nodata just at sea (not inland) and you basically want to replace all with 0, this is the way (all ways somehow include customizing source vrt dataset).

Are you dealing with global SRTM or just one tile (while you want rest of the globe to be at least flat 0)?

Note the mapproxy-setup-resource's parameters --background to reduce size of overviews and --bottomLod (discussed here) in case you will be draping fine texture.over the surface.

suur commented 3 years ago

The input is the global SRTM dataset as a VRT of HGTs.

Thanks for the tip about changing the nodata value! And the point about nodata values inland is valid. I guess I need to generate the overviews again.

The SRTM dataset naturally results in a max LOD of 15, and the Bing Aerial Maps go to 21, so generating and transmitting 4^6 more tiles than I have the input data for seems like an incredible waste of compute and network resources.

ladislavhorky commented 3 years ago

Hi, sorry I missed that one.

As for the last point, this is true only for visited tiles. The great point in VTS is that it wastes nearly nothing as tiles are generated only when needed. Traffic heatmaps of spatial services are usually pretty localized (everyone looks at city, noone at open sea) so with reasonable caching down the line this usually works very nice. The pre-generated data (tiling) are thin and only need time.

The final solution to this (texture LOD15 SRTM with LOD21 Bing) will be possible once we have wider support for some features in WebGL.

I describe one more trick to deal with missing data in global datasets here.