Closed Yermo closed 7 years ago
Converting the following GPX file to geojson:
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <metadata> <link href="http://www.garmin.com"> <text>Garmin International</text> </link> <time>2013-05-27T17:23:57Z</time> </metadata> <wpt lat="35.466436" lon="-83.920083"> <ele>573.07</ele> <name>Deals Gap</name> <sym>Waypoint</sym> </wpt> </gpx>
becomes:
{ "properties" : { "link" : [ { "text" : "Garmin International", "href" : "http://www.garmin.com" } ], "time" : "2013-05-27T17:23:57Z" }, "type" : "FeatureCollection", "features" : [ { "properties" : { "name" : "Deals Gap", "sym" : "Waypoint", "elevation" : "573.07" }, "geometry" : { "coordinates" : [ -83.920083, 35.466436, 573.07, { "elevation" : "573.07" } ], "type" : "Point" }, "type" : "Feature" } ] }
Converting it back to GPX yields:
<?xml version="1.0"?> <metadata> <time>2013-05-27T17:23:57Z</time> </metadata> <wpt lat="35.466436" lon="-83.920083"> <time>2013-05-27T17:23:57Z</time> </wpt> </gpx>
The elevation metadata tag in the geojson should not be present.
fixed.
Converting the following GPX file to geojson:
becomes:
Converting it back to GPX yields: