ThinkGeo.com    |     Documentation    |     Premium Support

Deleting holes in the editor

We have many polygons that contain small interior rings.    In our polygon editor, we want people to be able to select and delete those rings.   Do you have a suggestion for this?


My thought is that when I load my polygons into the editor, I will load a single polygon with two holes into the editor as three polygons.   In that manner, the user can click on one of the "hole" polygons and delete it, move it, reshape it, etc.   Then, when unloading the geometry from the editor, I would perform spatial operations to detect polygons that are contained within another one, and subtract them back out, creating a single polygon with holes again.  


Do you have a more automated way to do all of this?



Ted, 
  
 We don’t have a more automated way and I think your workaround is very good. Thanks very much for raising it up and we will think more to see if we can make it easier for users.   
  
 Thanks! 
  
 Ben

Hello,

this question is quite old, but I do have a similar problem.
Is there any new way to delete a “hole” in a polygon using the editor?

Thanks in preface!

Regards,
Peter

Hi Peter, so what is “the editor”? An editor you created yourself? if yes, can you follow the way Ted mentioned above? If you mean ThinkGeo’s GIS editor, no, it’s not supported(it’s open source now so you can modify it).

This feature (removing the internal hole) is supported from the SDK, as long as you can find a proper way to identify the inner hole in an editor, this feature can be implemented. But inner ring (hole) as part of a polygon, it cannot be selected by itself unless “upgrading” it to a polygon, that’s where Ted’s workaround came from.

Thanks,
Ben