[PostGIS] #5745: St_AsLatLonText Rounding Errors

PostGIS trac at osgeo.org
Mon Jun 17 08:03:38 PDT 2024


#5745: St_AsLatLonText Rounding Errors
-----------------------------+---------------------------
 Reporter:  pjd130           |      Owner:  pramsey
     Type:  defect           |     Status:  new
 Priority:  medium           |  Milestone:  PostGIS 3.3.7
Component:  postgis          |    Version:  3.3.x
 Keywords:  St_AsLatLonText  |
-----------------------------+---------------------------
 titan=# select ST_AsLatLonText('POINT(21.9999999 1)', 'D-M-SC');
  st_aslatlontext
 ------------------
  1-0-0N 21-59-60E
 (1 row)


 titan=# select ST_AsLatLonText('POINT(21.99999999999 1)', 'D-M-SC');
  st_aslatlontext
 -----------------
  1-0-0N 21-60-0E
 (1 row)

 Expected results are:
 1-0-0N 22-0-0E  for both queries.  60 minutes or seconds should not be
 displayed and is not expected.  PostGIS team agreed in the past with
 ticket 3688.

 Similar ticket/changeset in the past:
 https://trac.osgeo.org/postgis/ticket/3688
 https://trac.osgeo.org/postgis/changeset/15296

 NOTE: I don't have 3.3.7 to test on but do have recent 3.3.3 version.
 This will take 5 seconds to validate on other versions.  This also exists
 in 2.5.5 which has the fix for ticket 3688 in it.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5745>
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