<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Excellent! </div><div class="">Thanks for helping me understand, very clear. </div><div class=""><br class=""></div><div class="">That makes me think there is no way around this, considering I want/need to use GIST indices to speedup these type of queries? If I did the following type of query (which *does* give the intended result) then it looks like it’s doing a full table scan instead of using the GIST.</div><div class=""><br class=""></div><div class="">SELECT ST_X(ST_PointFromText('POINT(2288605254 0)')) < ST_X(ST_PointFromText('POINT(2288605300 0)'));</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On 11 Aug 2017, at 16:03, Darafei Komяpa Praliaskouski <<a href="mailto:me@komzpa.net" class="">me@komzpa.net</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi! <br class=""><br class="">These are bbox operations, and IIRC they operate on float (32bit) bbox of geometry. I think conversion of point to bbox adds some epsilon around a point. </div><br class=""><div class="gmail_quote"><div dir="ltr" class="">пт, 11 авг. 2017 г. в 16:57, Thijs van den Berg <<a href="mailto:thijs@sitmo.com" target="_blank" class="">thijs@sitmo.com</a>>:<br class=""></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi All,<br class="">
<br class="">
I'm getting some strange results that I can’t explain. Maybe some of you know whats going on?<br class="">
<br class="">
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?<br class="">
<br class="">
This query gives TRUE as expected:<br class="">
SELECT ST_PointFromText('POINT(88605254 0)') << ST_PointFromText('POINT(88605300 0)’);<br class="">
<br class="">
This query gives FALSE,the only difference is two leading 2’s in the X coordinate.<br class="">
SELECT ST_PointFromText('POINT(2288605254 0)') << ST_PointFromText('POINT(2288605300 0)');<br class="">
<br class="">
<br class="">
Below is my version info:<br class="">
SELECT PostGIS_full_version();<br class="">
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<br class="">
<br class="">
Kind regards,<br class="">
Thijs<br class="">
_______________________________________________<br class="">
postgis-users mailing list<br class="">
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank" class="">postgis-users@lists.osgeo.org</a><br class="">
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank" class="">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></blockquote></div>
_______________________________________________<br class="">postgis-users mailing list<br class=""><a href="mailto:postgis-users@lists.osgeo.org" class="">postgis-users@lists.osgeo.org</a><br class="">https://lists.osgeo.org/mailman/listinfo/postgis-users</div></blockquote></div><br class=""></div></body></html>