[geos-devel] geometry validation and simplfiy problem

zhangjing jingzhang at cbigroup.com
Fri Jul 14 05:33:21 EDT 2006


hi, all

im developing a vector map editor using geos library as spatial engine, and the user's input may not comform to normalized geometry, ie the shell may cross holes. The input are always multiple LineRing. and i wonder if there is any method in geos to make these multiple LineRing a normalized geometry (Multipolygon, or Polygon with correct shell/hole relations). 

In ArcObjects, ITopologicalOperator->Simplify can do the job, here is a description of the function.

Simplify permanently alters the input geometry so that the geometry becomes topologically consistent.  For Point Collections, this means that all duplicate Points (Points with the same X and Y coordinates) are removed (unless they are attribute aware and have different attributes).  For Segment Collections, this means that all duplicate Segments are removed, all Crossing Segments are split into non-crossing segments (The crossing point becomes a vertex for all of the connected segments), all overlapping segments are broken into non-overlapping segments (the overlap becomes a new Segment), and all non-connected Paths are connected.  For Polygons, this means that all overlapping Rings are split into non-overlapping Rings, all Exterior and Interior Rings have the proper orientation, and all non-closed Rings are closed. 

so, is there any way to do this in geos?

TIA
Jing Zhang.






More information about the geos-devel mailing list