Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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