[postgis-devel] GeoJSON Precision
Darafei "Komяpa" Praliaskouski
me at komzpa.net
Wed May 8 06:50:30 PDT 2019
аў, 7 мая 2019, 4:17 PM карыстальнік Paul Ramsey <pramsey at cleverelephant.ca>
напісаў:
> This blog post reminded me:
>
>
> https://rapidlasso.com/2019/05/06/how-many-decimal-digits-for-storing-longitude-latitude/
>
> GeoJSON generation uses DBL_DIG as the number of decimal places, which is…
> a lot? 15 or 16 depending on your platform. I wonder if maybe we should
> crank that down to 8 as the default and let people crank it *up* as desired
> rather than emitting nanometer precision and expecting people to crank it
> *down* (they don’t).
>
> Thoughts?
>
There are number serialization libraries that choose number of digits
adaptively.
We had issues with 6 decimal digits serialization - vector roads visibly
don't match their rendered versions, so at least 7 would be my vote. I
believe 8 is safe, as it aligns with something called SQLMM_EPSILON of 1e-8
in the code.
> P
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20190508/00594478/attachment.html>
More information about the postgis-devel
mailing list