[postgis-devel] ST_Intersection throws error on postgis Linux installation

Paul Ramsey pramsey at cleverelephant.ca
Wed Jun 18 02:34:17 PDT 2008


The code is identical, all that's different is the libraries it's
compiled against. You're seeing a robustness failure due to very small
differences in interpretation of floating point numbers. There will
exist other cases that fail in Windows and work in Linux, as well.
Just a roll of the dice.

Try using a ST_SnapToGrid with a very fine snapping value on your
geometry, probably things will work.  If you don't mind mucking with
your locations every so slightly (if the geometry is not supposed to
have co-linearity with a neighbor) ST_Translate it ever so slightly in
some direction.

P.

On Mon, Jun 16, 2008 at 10:50 PM, Michael Melvin <mike at intelliware.ca> wrote:
> I just opened an issue in the Google Code site for postgis.
>
> It basically comes down to the ERROR: GEOS Intersection() threw an error!
> when running against a postgis Linux installation, where the same query
> works in Windows.  The funny thing is that if I change the value of
> 5512321.5456 in the second argument to the function to 5512321.5457, the
> query succeeds!
>
>
> It can be found here: http://code.google.com/p/postgis/issues/detail?id=37
>
> How different is the Windows code for the ST_Intersection function vs. the
> Linux code?  Is there any workaround for this, or am I hosed?
>
> Thanks,
>
> -mike
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
>



More information about the postgis-devel mailing list