[postgis-devel] GeoJSON Precision

Bruce Rindahl bruce.rindahl at gmail.com
Tue May 7 15:42:02 PDT 2019


Same issue in ST_asText, ST_asWKT, etc.  I don't find any other spatial
DB's (mySQL, SAP, etc) using ST_asText even allowing an option for
precision.  How is the value of a coordinate stored?  Is it different in
say a 64 bit vs a 32 bit windows system?

On Tue, May 7, 2019 at 3:16 PM Martin Davis <mtnclimb at gmail.com> wrote:

> 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
>
> _______________________________________________
> 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/01d83f96/attachment-0001.html>


More information about the postgis-devel mailing list