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

Jerry Carter jerry at jerrycarter.org
Wed Mar 17 08:54:53 PDT 2010


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().




More information about the postgis-users mailing list