I want to write an algorithm that creates a polygon inside a hole made by a set of other polygons. It's something like a flood fill and it's like the "boundary" tool in Autocad.

The image shows an example: the algoritm should fill the enclosed white space in the center (after a click on it).

Any theory, pseudocode or examples would help a lot.

enter image description here

  • 2
    do you have a particular software in mind that you like to run the tool within (or any open source software)? – artwork21 Jul 20 '11 at 15:40
  • The idea is to create a Python plugin for Qgis. – Pablo Jul 20 '11 at 16:17

You can use the geoprocessing tools->symmetric difference from the QGIS 1.7 ftools plugin. Use as second layer a vector file with a polygon covering all the area you need.

| improve this answer | |

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.