[postgis-users] PostGIS Geometry Clean function

Obe, Regina robe.dnd at cityofboston.gov
Thu Apr 24 06:03:12 PDT 2008


Horst,
 
Would be good if you also posted this to the PostGIS wiki.
 
Thanks,
Regina

________________________________

From: postgis-users-bounces at postgis.refractions.net [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Düster Horst
Sent: Thursday, April 24, 2008 8:49 AM
To: postgis-users
Subject: [postgis-users] PostGIS Geometry Clean function


In the last few days I developed a plpgsql function to clean not valid polygon and linestring geometries. This function cleans all ring-self- and self-intersections in PostGIS layers. 

The input is a valid or non valid geometry with one or more self-intersections. The result is a clean Multi geometry where all intersections are correct noded and divided into multiparts. I tested it with polygon layers with more than 800000 objects and it works fine for me. You can use the function with PostGIS >= 1.3.2. If you want to use it with PostGIS 1.1.6 you have to modify the source and remove all ST_ from the specific funktion names. 

I hope the function could be helpful for you, for me it is.

Looking forward for your comments.

Best regards

Horst

------------------------------------------------

Dr. Horst Düster
GIS-Koordinator, Stv. Amtschef

Kanton Solothurn
Bau- und Justizdepartement
Amt für Geoinformation
SO!GIS Koordination
Rötistrasse 4
CH-4501 Solothurn

Telefon ++41(0)32 627 25 32
Telefax ++41(0)32 627 22 14

mailto:horst.duester at bd.so.ch
http://www.agi.so.ch



-----------------------------------------
The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure
pursuant to Massachusetts law. It is intended
solely for the addressee. If you received this in error, please
contact the sender and delete the material from any computer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080424/05fc015a/attachment.html>


More information about the postgis-users mailing list