watergis / dem2terrainrgb

This module is to convert DEM to terrain RGB raster tiles.
MIT License
72 stars 17 forks source link

Error occurred over-altitude terrain RGB raster when to tileset in Mapbox GL JS #1

Open chingchai opened 2 years ago

chingchai commented 2 years ago

Hi, I would like to advice. 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

JinIgarashi commented 2 years ago

@chingchai Your DEM is DTM or DSM? Which one? If it’s DSM, it might be affected by height of objects like trees or buildings. Or could you try to change resampling method? Maybe it can improve appearance.

chingchai commented 2 years ago

@JinIgarashi I use DSM, I'll try the data from DTM and I send feedback to you again. Thank you.