GeoJSON Point export format
When I export a number of markers to GeoJSON, it is including four values for the point coordinates ,e.g.,
"coordinates":[-82.99907825054694,35.01239634421593,0,0]
This is giving me errors trying to import into Mapbox, which says only 2 or 3 values are allowed. Does anybody know what the 4th value is supposed to represent, and more importantly how to suppress it on export?
Comments
5 comments
Hello,
Can you send us an email at help@caltopo.com and include the map you are exporting from? We'd like to take a look at the data.
Yep. Will do.
Thanks,
Jerry
Hi Jerry -
Sorry about the delay, as we had an in-person meeting last week that pushed a lot of things back.
We're using the fourth value for timestamp, but it looks like unintended behavior on our end that we're including 0 values for elevation and timestamp when they don't exist, rather than limiting the array to only two elements. We'll look into it, but in the short term, unfortunately I don't have any recommendations for suppressing it other than bulk text-editing tools to replace ",0]" with "]" and hope it doesn't break anything else in the file.
- Matt
I made a web-tool to quickly fix this. It just strips the 4th "timestamp" element off the geometry of point objects.
https://eagleeyessearch.com/caltopo-geojson-fixer/
This is excellent, Peter. Thanks!
Please sign in to leave a comment.