Changes between Initial Version and Version 2 of Ticket #5882


Ignore:
Timestamp:
Mar 20, 2015, 1:52:32 AM (9 years ago)
Author:
emanueledigiacomo
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5882 – Description

    initial v2  
    11Some numeric values in GeoJSON file (e.g. 4.1e-8, 0.00000001) are truncated.
    22
    3 I think the problem is in the conversion from JSON double to JSON string (function json_object_double_to_json_string in ogr/ogrsf_frmts/geojson/libjson/json_object.c):
     3I think the problem is in the conversion from JSON double to JSON string (function json_object_double_to_json_string in ogr/ogrsf_frmts/geojson/libjson/json_object.c): the conversion is done with a `%f` format (by default, 6 digits after the decimal number):
     4
     5{{{
     6size = snprintf(buf, 128, "%f", jso->o.c_double);
     7}}}
    48
    59See attached file "data.json", where the properties are