geodesign / django-raster

Django-raster allows you to create tiled map services (TMS) and raster map algebra end points for web maps. It is Python-based, and requires GeoDjango with a PostGIS backend.
BSD 3-Clause "New" or "Revised" License
96 stars 39 forks source link

How to show DSM using 1 band raster? #51

Closed orkunasa closed 4 years ago

orkunasa commented 4 years ago

Hello,

I'm trying to show digital surface model on Mapbox, but I couldn't apply the continuous colour scheme on the raster

The raster include only 1 band.

Screenshot from 2020-08-06 01-43-22

I tried below URL but didn't work very well. I see the colourized pixels but they are not related with elevation information.

'http://127.0.0.1:8080/raster/algebra/{z}/{x}/{y}.png?layers=r:0=1&formula=r&scale=1964,6490&colormap={"continuous":true,"range":[0,255],"from":[165,0,38],"to":[0,104,55]}'

Thank you

yellowcap commented 4 years ago

Hi Orkunasa, the range of the values in the metadata roughly 143 to 222. Maybe the range you applied is too large so you don't see the details of the data very well. Could you try to "narrow" the range to range=[143, 222]?

This is not related to your problem, but as a comment, I think you could skip the "scale" parameter, its only used in RGB mode for 3 band rasters.

orkunasa commented 4 years ago

It works. Thank you @yellowcap