[postgis-users] strange behavior in ST_SnaptoGrid
Sajjad Hassany Pazoky
ijustloveit13 at gmail.com
Sun Sep 3 05:04:25 PDT 2023
I observed a strange behavior when using ST_SnaptoGrid.
I don't know whether I am making a mistake or if there is a bug.
The following code:
SELECT ST_AsText(ST_SnapToGrid(
ST_GeomFromText('LINESTRING(334729.13 4103548.88,334729.12
4103548.53)'),
0.001)
);
produces:
LINESTRING(334729.13 4103548.88,334729.12 4103548.5300000003)
I tested this on:
PostgreSQL 13.4, compiled by Visual C++ build 1914, 64-bit
POSTGIS="3.1.4 3.1.4" [EXTENSION] PGSQL="130" GEOS="3.9.1-CAPI-1.14.1"
PROJ="7.1.1" LIBXML="2.9.9" LIBJSON="0.12" LIBPROTOBUF="1.2.1" WAGYU="0.5.0
(Internal)"
and
PostgreSQL 14.5, compiled by Visual C++ build 1914, 64-bit
POSTGIS="3.2.3 3.2.3" [EXTENSION] PGSQL="140" GEOS="3.10.3-CAPI-1.16.1"
PROJ="7.2.1" LIBXML="2.9.9" LIBJSON="0.12" LIBPROTOBUF="1.2.1" WAGYU="0.5.0
(Internal)"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20230903/7b066073/attachment.htm>
More information about the postgis-users
mailing list