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?

1

Comments

5 comments

  • Comment author
    Rachel
    • Official comment

    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. 

  • Comment author
    jerry.ellsworth

    Yep. Will do.

    Thanks,
    Jerry

    0
  • Comment author
    CalTopo

    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

    0
  • Comment author
    Peter O'Connor
    • Edited

    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/ 

    2
  • Comment author
    jerry.ellsworth

    This is excellent, Peter. Thanks!

    0

Please sign in to leave a comment.