[postgis-tickets] [PostGIS] #4660: Sensible number output semantics (was: Raise the max number of digits for double printing to 17)

PostGIS trac at osgeo.org
Mon Jul 20 09:14:25 PDT 2020


#4660: Sensible number output semantics
--------------------------+---------------------------
  Reporter:  Algunenano   |      Owner:  Algunenano
      Type:  enhancement  |     Status:  new
  Priority:  medium       |  Milestone:  PostGIS 3.1.0
 Component:  postgis      |    Version:  master
Resolution:               |   Keywords:
--------------------------+---------------------------
Changes (by Algunenano):

 * status:  assigned => new


Old description:

> In #4543 I enforced a limit on the number of digits output by
> lwprint_double. This limit was already in place but not always effective,
> which could lead to issues in other functions not calculating the
> necessary buffer correctly, so they would overestimate to be safe.
>
> I set it to 15 digits, but it has come to my attention that some double
> numbers need up to 17 digits to be able to do the correct round trip, so
> I'm thinking on raising it from 15 to 17.
>
> It should be available for both ST_AsText and ST_AsGeoJSON, but the user
> setting (or default) is still in place (so if they request 8 digits they
> should get 8 and no more).

New description:

 ~~In #4543 I enforced a limit on the number of digits output by
 lwprint_double. This limit was already in place but not always effective,
 which could lead to issues in other functions not calculating the
 necessary buffer correctly, so they would overestimate to be safe.~~

 ~~I set it to 15 digits, but it has come to my attention that some double
 numbers need up to 17 digits to be able to do the correct round trip, so
 I'm thinking on raising it from 15 to 17.~~

 ~~It should be available for both ST_AsText and ST_AsGeoJSON, but the user
 setting (or default) is still in place (so if they request 8 digits they
 should get 8 and no more).~~

 Comes from 2 different mail threads:
 * https://lists.osgeo.org/pipermail/postgis-devel/2020-April/028510.html
 * https://lists.osgeo.org/pipermail/postgis-devel/2020-April/028528.html

--

-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/4660#comment:1>
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