I have the following map in .png-format that I would like to replicate, but I cannot obtain the original data.

The map shows the current water supply vulnerability for local municipalities in South Africa. I took a screenshot of the map and georeferenced with a local municipality shapefile. Here is the original .png-map:


And here is the Local Municipality shapefile on top of the georeferenced raster:


I would now like to extra each municipality value/colour (there are 10) to the shapefile. I tried using the SAGA-GIS Module 'Add raster values to features' tool, but the result classifies all features as 255:


Where am I going wrong, or is it not possible to do this? This question is similar but the answer exceeds my capabilities.

  • 1
    Why not using a native colour picker in QGIS or another tool similar to it since you do not have that many colours? Have you tried r.colors.out or r.colors? – Taras Apr 11 '19 at 8:31
  • 1
    I hope this question gets a decent answer. This is a common real-world task that can be rather tricky in practice because the individual colours in an image file often turn out to not be very uniform at all. If you only have one map, I suspect it might be better to just accept that you will need to take a couple of hours to do it manually. – Alexander Apr 12 '19 at 8:58
  • @Taras would something like that be able to assign a unique value (out of 10 possible option/colours) to each feature in the shapefille attribute table? – JohnGIS Apr 12 '19 at 12:06
  • @Alexander I hope so too. I already had to do this manually and it took forever. I have two more maps left to make so it would be great if I could figure out a solution to streamline this. – JohnGIS Apr 12 '19 at 12:07
  • okay, clear. I thought it only involves one raster layer. – Taras Apr 12 '19 at 12:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.