You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I currently use the library to serialize and deserialize GPX for analysis.
Some files contain elevation values greater than 1000m.
For these files the elevation is serialized with a comma as "thousand separator".
When the serialized GPX data is deserialized, Double.parseDouble is used,
which does not support the given Syntax.
Steps to reproduce the issue
Generate a GPX object with at least one waypoint which has an elevation greater 1000m
Serialze the object with the GPX.Writer#write method
Deserialize the object with the GPX.Reader#read method
What's the expected result?
No exception is thrown
The deserialized object contains exactly the same data
What's the actual result?
A java.io.InvalidObjectException Exception is thrown
java.io.InvalidObjectException: Invalid GPX: Invalid value for 'ele': For input string: "1,234.5"
at io.jenetics.jpx.GPX$Reader.read(GPX.java:1183)
at io.jenetics.jpx.GPX$Reader.read(GPX.java:1209)
at io.jenetics.jpx.GPX$Reader.fromString(GPX.java:1271)
The text was updated successfully, but these errors were encountered:
raynigon
changed the title
Elevation serialization for values > 1000m generates incompatible values
Elevation serialization for values > 1000m is incompatible with deseriallization
Apr 7, 2022
raynigon
changed the title
Elevation serialization for values > 1000m is incompatible with deseriallization
Elevation serialization for values > 1000m is incompatible with deserialization
Apr 7, 2022
Issue description
I currently use the library to serialize and deserialize GPX for analysis.
Some files contain elevation values greater than 1000m.
For these files the elevation is serialized with a comma as "thousand separator".
When the serialized GPX data is deserialized,
Double.parseDouble
is used,which does not support the given Syntax.
Steps to reproduce the issue
GPX.Writer#write
methodGPX.Reader#read
methodWhat's the expected result?
What's the actual result?
java.io.InvalidObjectException
Exception is thrownAdditional details
Code
Stacktrace
The text was updated successfully, but these errors were encountered: