[postgis-users] strange behaviour in PostGIS strictly below operator?

Thijs van den Berg thijs at sitmo.com
Fri Aug 11 06:57:49 PDT 2017

Hi All,

I'm getting some strange results that I can’t explain. Maybe some of you know whats going on?

I want to use PostGIS for spatial queries on scientific data (2d point sets). In the following query I want to select points to the left of some other point but it looks like there is some rounding going on? AFAIK the coordinates are stored as 64bit doubles and so this should be no problem?

This query gives TRUE as expected:
SELECT ST_PointFromText('POINT(88605254 0)') << ST_PointFromText('POINT(88605300 0)’);

This query gives FALSE,the only difference is two leading 2’s in the X coordinate.
SELECT ST_PointFromText('POINT(2288605254 0)') << ST_PointFromText('POINT(2288605300 0)');

Below is my version info:
SELECT PostGIS_full_version();
POSTGIS="2.3.2 r15302" GEOS="3.5.1-CAPI-1.9.1 r4246" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.1.3, released 2017/20/01" LIBXML="2.9.4" LIBJSON="0.12.1” RASTER

Kind regards,

More information about the postgis-users mailing list