[postgis-users] GEOS pointonsurface() threw an error!

Mike Toews mwtoews at gmail.com
Tue Aug 17 22:15:12 PDT 2010


On 17 August 2010 22:02, Ricardo Bayley <ricardo.bayley at gmail.com> wrote:
> I have other 96 invalid geometries in a table of 22k records.
> From those 96, only 1 has the Self-intersection invalid reason.
> The rest of them have a Ring Self-intersection. These last dont through an
> error exception, only the one with the "Self-intersection" error does.
> I guess I should do propper geometry validation first.

One tip I would recommend is after you clean up your geometries is to
add a check constraint to ensure the geometries will always be  valid:

ALTER TABLE mytable ADD CONSTRAINT enforce_valid_geometry CHECK
(ST_IsValid(geometry));

-Mike



More information about the postgis-users mailing list