terrain-rgb icon indicating copy to clipboard operation
terrain-rgb copied to clipboard

How to fix bug occurred over-altitude terrain RGB raster tileset in Mapbox GL JS

Open chingchai opened this issue 3 years ago • 4 comments

Hi, I use my DEM generate from Drone using OpenDroneMap. After that, I use gdal_warp to re-project my DSM to EPSG:3857 and transform the greyscale data into the RGB data using rio-rgbify and last step i use gdal2tiles.py to generate xyz tiles. But i got error when add tiles layer to Mapbox GL JS as the picture shown below.

        this.map.addSource("mydem", {
          type: "raster-dem",
          tiles: [
            "https://url/tiles/dem-rgb-v2/{z}/{x}/{y}.png",
          ],
          tileSize: 512,
          maxzoom: 18
        });
        this.map.setTerrain({ source: "mydem", exaggeration: 0.7 });

image

image

chingchai avatar Nov 19 '21 08:11 chingchai

Hi here,

Same issue on my side. Did you fix it?

NasH5169 avatar Oct 18 '22 17:10 NasH5169

me too

luo-geng avatar Feb 01 '23 08:02 luo-geng

I have a very similar problem. I followed this tutorial here step by step. Only difference was that my dataset was a 5m resolution dataset. Did you solve your problem? @ThomasHalwax do you have an idea? Would be super happy about some help :)

Bildschirmfoto 2024-02-22 um 16 46 19

georgbachmann avatar Feb 22 '24 16:02 georgbachmann

TBH I'm not sure what causes these spikes but my guess is the resampling method used by gdalwrap. The tutorial uses lanczos. Maybe someone could try some other methods and post the results?

ThomasHalwax avatar Feb 26 '24 08:02 ThomasHalwax