Opened 9 days ago

#5745 new defect

St_AsLatLonText Rounding Errors

Reported by: pjd130 Owned by: pramsey
Priority: medium Milestone: PostGIS 3.3.7
Component: postgis Version: 3.3.x
Keywords: St_AsLatLonText Cc:

Description

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.

Change History (0)

Note: See TracTickets for help on using tickets.