mapbox / mapbox/rio-rgbify

Custom terrain RGB/hillshade

Open
#40 4 comments 3 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
125
Forks
46
PR merge metrics
No merged PRs in 30d

Description

Hi,

We are trying to display our custom terrain / hillshade using RGB tiles. To do so, we went through the following procedure:

gdalwarp -t_srs EPSG:3857 -dstnodata None -novshiftgrid -co TILED=YES -co COMPRESS=LZW -co BIGTIFF=IF_NEEDED -ts 18000 18000 -r lanczos -wo SOURCE_EXTRA=1000 SRTM.tif SRTM.3857.tif

rio rgbify -b -10000 -i 0.1 SRTM.3857.tif SRTM.3857.RGB.tif

gdal2tiles.py --zoom=0-12 --processes=8 --srcnodata=-32768 -x SRTM.3857.RGB.tif tiles/

mb-util --image_format=png --scheme=tms tiles/ terrain_rgb.mbtiles

So, we ended up with a working MBTiles filled with RGB PNG files, though below the result is not satisfying as you can see different weird spots usually located at around 3000 meters height.

We tried the procedure with two different sources (SRTM and EUDEM) the result is the same.

Do you have any idea?

Thanks.

![terrain_rgb_hillshade_holes](https://user-images.githubusercontent.com/6979479/197010230-37762498-9211-46be-8f09-042c6314c10c.png)

Contributor guide

Open the contributing guide

Research direction

Reproduce the reported workflow with the SRTM or EUDEM source, starting with gdalwarp and following the rio rgbify, gdal2tiles.py, and mb-util steps. Compare the generated RGB tiles with the attached terrain_rgb_hillshade_holes result and isolate which stage introduces the spots. Done means identifying the cause and documenting or correcting the RGB terrain output.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.