[postgis-tickets] [PostGIS] #5425: ST_SnapToGrid returns not correct data

PostGIS trac at osgeo.org
Mon Jul 3 00:36:26 PDT 2023


#5425: ST_SnapToGrid returns not correct data
---------------------------+---------------------------
 Reporter:  tmazuga        |      Owner:  pramsey
     Type:  defect         |     Status:  new
 Priority:  medium         |  Milestone:  PostGIS 3.3.4
Component:  postgis        |    Version:  3.3.x
 Keywords:  ST_SnapToGrid  |
---------------------------+---------------------------
 Function ST_SnapToGrid returns not correct data (PostGIS >= 3.2.3)

 Query
 {{{
 SELECT
 ST_AsText(ST_SnapToGrid(st_setsrid(ST_GeomFromText('LINESTRING(674169.89
 198051.38,674197.7 198065.55,674200.36 198052.38)'),2180), 0.001));
 }}}

 Return with 3.3.3 and 3.2.3

 {{{LINESTRING(674169.89 198051.38,674197.7000000001
 198065.55000000002,674200.36 198052.38)}}}

 With PostGIS 3.0.1

 {{{LINESTRING(674169.89 198051.38,674197.7 198065.55,674200.36
 198052.38)}}}



 POSTGIS="3.3.3 3.3.3" [EXTENSION] PGSQL="150" GEOS="3.11.2-CAPI-1.17.2"
 PROJ="8.2.1" LIBXML="2.9.14" LIBJSON="0.16" LIBPROTOBUF="1.2.1"
 WAGYU="0.5.0 (Internal)" (core procs from "3.3.2 3.3.2" need upgrade)
 PostgreSQL 15.3, compiled by Visual C++ build 1914, 64-bit


 Several versions of PostgreSQL (14, 15) on Windows and Ubuntu were also
 checked.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5425>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.


More information about the postgis-tickets mailing list