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

Demo in docker. #25

Closed winsento closed 4 years ago

winsento commented 6 years ago

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.

yellowcap commented 6 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.

winsento commented 6 years ago

@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.

EverWinter23 commented 5 years ago

@winsento @yellowcap A docker demo would be so great!!!

CARocha commented 5 years ago

@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

Captura de pantalla 2019-09-05 a la(s) 22 55 18

but in my web project only see grayscale i try put the colors but impossible see:

Captura de pantalla 2019-09-05 a la(s) 22 57 34

where I can see an example that put color to the map?? with leaflet!! this is my javascript:

and this backend raster file saved

Captura de pantalla 2019-09-05 a la(s) 23 04 49

Any help I would appreciate it, I am a rookie on maps and I still don't understand many things

yellowcap commented 5 years ago

@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: image

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.

CARocha commented 5 years ago

@yellowcap thank works fine, by the way, i sorry for written in this issues!!

yellowcap commented 4 years ago

@CARocha glad this worked!