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 use Continuous Color Schemes #39

Closed xxqhh closed 4 years ago

xxqhh commented 4 years ago

Hi,I want to use admin to build legend,I failed. image Looking forward to your reply. Thank you.

yellowcap commented 4 years ago

You can't specify a continuous legend like this. The JSON field is not meant to be edited manually. Use the "LegendEntry" field below, specifying breaks of values. Something like this: image

xxqhh commented 4 years ago

Thank you.I have another problem.Can this parse sentinel-2, please?

yellowcap commented 4 years ago

Yes, but you have to parse each band separately. There is an RGB rendering mode to render the RGB data https://django-raster.readthedocs.io/en/stable/algebra.html#rgb-endpoint and you can use the Algebra endpoint to render indices as raster algebra expressions such as NDVI etc.