4

Is it possible to split up the individual values of a raster to make each value become a different layer?

I am aiming to create an animated map with TimeManager. However, the data I need for each layer of the animated map is within one raster.

The raster is split into 16 values from 2000-2016. Is there a way to take out each value to create a new layer?

Here is a picture of the raster for more clarity.

Here is a picture of the raster for more clarity.

2
  • Those this raster have several bands or has each pixel a value which corresponds to the year?
    – LaughU
    Commented Jan 17, 2018 at 15:11
  • @LaughU Does my picture help your question? Sorry quite new to this and not entirely sure what you mean.
    – amd
    Commented Jan 17, 2018 at 15:32

1 Answer 1

4

For TimeManager, you need a vector, i think :

Solution 1 : vectorisation

If your raster is in integer format :

  • use the polygonize tool
  • animate on your value field.

polygonize

To answer your title question :

Solution 2 : raster reclassification

  • Use a Raster Calculator expression ("MyRaster@1 = 1", then "MyRaster@1 = 2",...)to get a reclassified raster for each year (every pixel that answer the logicial condition is equal to 1 and the others are equal to 0 or are null)
  • Create 16 new raster with that.
  • put it in display and color it with a 1 = color style

value = 1

Solution 3 : duplicate and style

  • just duplicate your raster 16 times (right click/duplicate)
  • on the first layer (set all colors to transparent (0% opacity) except the year color
  • copy paste style and just change color 2 to full opacity and 1 to 0%.
  • do the same for all layers

styling

1
  • @amd I added another solution if you need vector to animate :)
    – gisnside
    Commented Jan 17, 2018 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.