Opened 5 years ago

Last modified 4 years ago

#4660 closed enhancement

Sensible number output semantics — at Version 1

Reported by: Algunenano Owned by: Algunenano
Priority: medium Milestone: PostGIS 3.1.0
Component: postgis Version: master
Keywords: Cc:

Description (last modified by Algunenano)

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:

Change History (1)

comment:1 by Algunenano, 4 years ago

Description: modified (diff)
Status: assignednew
Summary: Raise the max number of digits for double printing to 17Sensible number output semantics
Note: See TracTickets for help on using tickets.