postgis/regress/core/in_encodedpolyline.sql
Raúl Marín 1343712277 Use the shortest representation when printing doubles
- Use the shortest representation (enough to guarantee roundtrip).
- Uses scientific notation for absolute numbers smaller than 1e-8. The previous behaviour was to output 0 for absolute values smaller than 1e-12 and fixed notation for anything bigger than that.
- Uses scientific notation for absolute numbers greater than 1e+15 (same behaviour).
- The precision parameter now also affects the scientific notation (before it was fixed [5-8]).
- All output functions now respect the requested precision (without any limits).
- The default precision is the same (9 for GeoJSON, 15 for everything else).

Many regress test changed mainly because of the fixes to the precision parameter, which is now respected as the amount of digits after the fixed point.

Closes https://github.com/postgis/postgis/pull/570
Closes #4660
2020-07-28 13:18:38 +02:00

3 lines
233 B
SQL

select 'linefromencodedpolyline_01',st_asewkt(st_linefromencodedpolyline('_p~iF~ps|U_ulLnnqC_mqNvxq`@'));
select 'linefromencodedpolyline_02',st_asewkt(ST_AsText(st_linefromencodedpolyline('_izlhAj}oidF{}jgCrotj@chtxCn`{nI', 6),3));