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

Chris Hermansen chris.hermansen at timberline.ca
Wed Mar 17 08:59:42 PDT 2010


Hey Jerry;

Next you'll be wanting the error detection process to tell you which features are involved, and the coordinates of the error

:-) :-) :-)
------Original Message------
From: Jerry Carter
Sender: postgis-users-bounces at postgis.refractions.net
To: Mike Toews
Cc: PostGIS Users Discussion
ReplyTo: PostGIS Users Discussion
Subject: Re: [postgis-users] GEOS intersects() threw an error!
Sent: Mar 17, 2010 08:54

Thanks.  I've already started down that path.

The real issue in my mind is the error text.  If GEOS throws an error, couldn't PostGIS internally run the equivalent of ST_IsValidReason() on the geometry before writing a message?  Seeing 'GEOS intersects() threw an error due do an invalid geometry (self-intersection)' seems much more helpful than the current message.

-=- Jerry


On Mar 17, 2010, at 11:51 AM, Mike Toews wrote:

> Typically, this type of geometry error is fixed using
> ST_Buffer(the_geom,0). So just wrap your geometry in that zero buffer,
> and you should get a valid geometry (in ST_IsValid) and a correct
> ST_Intersects result.
> 
> -Mike
> 
> On 17 March 2010 08:23, Jerry Carter <jerry at jerrycarter.org> wrote:
>> I am aware that this geometry reports a Self-intersection according to ST_IsValidReason().

_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Chris Hermansen        chris.hermansen at timberline.ca
tel+1.604.714.2878 · fax+1.604.733.0631 · mob+1.778.840.4625
Timberline Natural Resource Group · www.timberline.ca
401 · 958 West 8th Avenue  · Vancouver BC · Canada · V5Z 1E5


More information about the postgis-users mailing list