0

I've tried polygonizing this monochrome bitmap as this:

enter image description here

and this:

enter image description here

and either way it ends up looking like this when (zoomed in) after gdal's polygonize operation:

enter image description here

Is there any way I can tell it which binary component I want to be the shape and which I want to be the void?

1 Answer 1

2

This is a one-band raster (not RGB) having pixels with values of 0 and 255, yes? Perhaps the raster would benefit from a little pre-processing, you might like to try Raster | Analysis | Sieve before using the raster polygoniser. You might also have to experiment with the sieve settings. The polygoniser doesn't know anything about colours, only about pixel values, by the way.

4
  • What does the polygonizer use to interpret polygons? Its looking like a combination of the alpha layer with something else Mar 12, 2014 at 23:21
  • It uses pixel values, the raster polygonizer makes polygons that enclose groups of pixels of the same value. This is why it is sometimes important to sieve out small clumps of pixels before running the polygonizer or you can end up with huge number of tiny polygons. Which I think is what you have.
    – nhopton
    Mar 13, 2014 at 11:54
  • sieve helps a lot. another tool I used was gimp's Threshold Alpha in the Layers menu Mar 13, 2014 at 16:11
  • I think this question unfocused however, having solved this problem I think this question, at best, is a duplicate of gis.stackexchange.com/questions/84002/… -- flagging for removal Mar 13, 2014 at 16:41

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.