|
|
|
|
|
Geometry CleanerSelf-Intersections in simple feature geometries usually lead to problems in further processing of PostGIS data. Thus, a shape, as it is shown below in the image indeed saved in PostGIS, but geometric analysis can be carried out erroneous geometries.
The solution to the problem provides the Postgres function cleangeometry (geometry) which can be downloaded here. This feature has been adjusted for self-intersecting polygons such that separated after correcting all overlapping objects and converted them into a multi-objects. In the figure below are for illustrative purposes, the two sub-polygons of the new multi-polygon pulled apart. ![]() To clean up self-intersecting polygons and lines the Postgres function cleangeometry() have to be created in the postgres database with: psql-d mydb-f cleanGeometry.sql To clean up the tables with incorrect geometries, an update of the geometry-objects can be made with: update myTable set the_geom = cleangeometry(the_geom)
|
|