[postgis-users] TopologyException and ST_Intersection

Nicolas Ribot nicolas.ribot at gmail.com
Mon Jun 25 07:46:48 PDT 2012


> Hi Nicolas,
> This is great.  However, we are running POSTGIS="1.5.3"  Is this possible in
> this version?  If not, is there a workaround as I don't think we will be
> able to upgrade that quickely?
>
>

Hi Derek

Yes indeed, there is a trick on postgis < 2.0 to clean polygons: try
using st_buffer(geom, 0.0). This method is often able to rebuild a
valid polygon from an invalid one. I also saw on the list (and tested
myself) that st_buffer(st_buffer(geom, -1), 1) could clean some
polygons that are not cleaned with only a 0 unit buffer.

Nicolas



More information about the postgis-users mailing list