2

I have a single band raster layer, namely the USGS Global Mountain Explorer Home K3 dataset.

It is a 8 bit unsigned integer GeoTIFF of 200 Mb, with 4 grey values each corresponding to a mountain height.

example

What is the correct way to split this layer into 4 different layers so that I can vectorize them separately?

If I mess around with transparency and then I try to save the rendered images the results are huge, even with high compression.

2
  • Intresting question, I have had the same thoughts. Why dont you vectorize then split output vector by raster value? There are some raster values you dont need to vecotrize at all and which to save some time?
    – BERA
    Apr 24, 2020 at 16:01
  • If I vectorize the non-split image I have tons of individual polygons, and it becomes impossible to recreate the original form. If the starting raster is just one of the grey values this becomes a non-problem as I can join everything with no worries. Apr 24, 2020 at 17:37

1 Answer 1

1

You can use raster calculator to split the image in 4 different rasters each with 0 and 1 values and then vesctorize each one of them. Check the values of your original raster and use them in an expression, something like"image@1" = 0.5. After you vectorize the image you'll just have to remove the polygon that corresponds to 0 value.

But I would suggest using 'Vectorising grid classes' function and specify the class by the grey value. You would still need to execute this 4 times, but it's faster, since you don't need to clean up.

1
  • Both ways seem good, the 'vectorizing grid classes' fails if I try to do the whole image at once, I think I need a ginormic amount of ram. Apr 25, 2020 at 16:04

Your Answer

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

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