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

Range is not applied to default colormap #66

Open henhuy opened 2 years ago

henhuy commented 2 years ago

Default colormap (if not setting up a legend) is not working properly (no range attribute set). This leads to color artefacts like this: grafik

This is related to code in https://github.com/geodesign/django-raster/blob/34fffe3d1f921b2850d3cad598a3c9b382e1fec7/raster/views.py#L82-L100 as range and entries are only added if colormap exists in the first place. After removing else and unindending range and entries part, raster layer looks as expected: grafik