In trunk version (2.0.0) of postgis there is a new function
ST_MakeValid(..) that try to resolve invalidity.
It work pretty well.
ps:
Because its goal is not lost no-one vertex, sometimes return a
GeometryCollection.
so is necessary extract from the output the polygon part of collection.
sometimes like:
...
(
CASE
WHEN
ST_GeometryType("geom")='ST_GeometryCollection'
THEN
ST_CollectionExtract("geom", 2)
ELSE
"geom"
) as geom
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
_______________________________________________
postgis-users mailing list
[email protected]
http://postgis.refractions.net/mailman/listinfo/postgis-users