[Mapguide-trac] [mapguide-trac] #2832: Rounding issue in raw geojson
MapGuide Open Source
trac_mapguide at osgeo.org
Mon Nov 23 22:29:03 PST 2020
#2832: Rounding issue in raw geojson
-------------------------------+--------------------
Reporter: gBecker | Owner: (none)
Type: defect | Status: new
Priority: medium | Milestone: 4.0
Component: Feature Service | Version:
Severity: minor | Keywords:
External ID: |
-------------------------------+--------------------
There is a rounding issue with the geojson format MapGuide 4 is
producing. When you have a number like for example 476706.999999999 in
your coordinates (request with a precision set to 7) then this leads to a
number with a decimal point at the end
476707.
instead of just
476706
You can see the original data I requested with SELECTFEATURES in the
screenshot from developer tools. Although it is shown in web developer
console there is an error message when requesting in the browser:
SyntaxError: JSON.parse: unterminated fractional number at line 1 column
317 of the JSON data
So, OpenLayers doesn't show this geojson. Of course, I can choose a higher
precision to solve the issue with this specific coordinate but I have
plenty of other coordinates that have the same problem even with a higher
precision.
By the way, with MapGuide Rest the geojson output is correct.
--
Ticket URL: <https://trac.osgeo.org/mapguide/ticket/2832>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list