[postgis-users] ERROR: distance returned negative!

Christophe Pettus xof at thebuild.com
Fri May 1 13:19:58 PDT 2020

> On May 1, 2020, at 12:09, Christophe Pettus <xof at thebuild.com> wrote:
>> On Apr 30, 2020, at 18:43, Paul Ramsey <pramsey at cleverelephant.ca> wrote:
>> Yes, there's some magic geometry in there... if you can get it down to the offending pair, that would be amazing amazing
> I'll see if I can!  Is that error caught by an EXCEPTION block in PL/pgSQL?  There are a *lot* of geometries, and I'll have to iterate through them.

And before I go spelunking here, is it known that an ST_Distance that includes a self-intersecting LINESTRING in either or both parameters could case this?

-- Christophe Pettus
   xof at thebuild.com

More information about the postgis-users mailing list