[postgis-devel] GeoJSON Precision

Martin Davis mtnclimb at gmail.com
Tue May 7 15:17:57 PDT 2019


Something to consider is that simply truncating digits can cause
topological invalidity.  So at a minimum there should be a warning about
this possibility in the doc.

Ideally this would be part of a wider review of how PostGIS handles
precision.  A more general approach might provide metadata about coordinate
precision (somewhere), in which case the output functions would just Do The
Right Thing.

On Tue, May 7, 2019 at 1:17 PM Paul Ramsey <pramsey at cleverelephant.ca>
wrote:

> 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?
>
> 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/20190507/03727a6a/attachment.html>


More information about the postgis-devel mailing list