Closed winsento closed 4 years ago
Thanks @winsento that looks really interesting! I have been thinking about doing such a demo project for a while, but never found time to do it.
Are you planning to continue improving the project?
I can help working on it so that once we are happy with its status we can transfer it and refer to it as the "official" demo or so.
@yellowcap Yes, I plan to make celery work and write a compose file so that postgres, django-raster-demo, redis, etc., start right away. If you want to help, welcome.
At any time, I'm ready to transfer the repository.
@winsento @yellowcap A docker demo would be so great!!!
@yellowcap Hi, i try put color in my maps but fail each try, i find example but don't see any example, i install QGis and import raster is easy put color this is example
but in my web project only see grayscale i try put the colors but impossible see:
where I can see an example that put color to the map?? with leaflet!! this is my javascript:
and this backend raster file saved
Any help I would appreciate it, I am a rookie on maps and I still don't understand many things
@CARocha you are almost there! To add color to the map, you can assign a Legend to your RasterLayer model. Go to the http://localhost:8000/admin/raster/legend list and click on "add legend". There you can specify a legend, specifying the different "entries" with colors. Each "legend entry" has a "Semantic" (aka name), an "expression" (a value or value range for this name, in your case a single value because your raster is discrete), and a "color". The "code" column you can ignore, it can be used to tag or order the legend entries.
Here is an example from one of my legends:
After creating the legend, you have to assign it to the RasterLayer. Go to the admin of your raster layer, and select the legend you created. After that, the raster should render in the colors you selected. Note that any value not found in the Legend will simply be transparent in the rendering. So make sure you add one legend entry for each of your 1-9 values.
by the way: in the furture, please open an new issue if you have any trouble using this package. This here is an issue concerning docker files.
@yellowcap thank works fine, by the way, i sorry for written in this issues!!
@CARocha glad this worked!
Im wrote simple demo project for django-raster based on docker. If this is of interest to you, I can transfer the repository.
https://github.com/winsento/django-raster-demo
I want to warn in the project there are parts that need improvement.