0
votes

I wanted to use osmtogeojson in order to upload osm data to mapbox. However Mapbox tells me "Unknown filetype" and when I analyse any result from osmtogeojson with geojsonhint, I always get :

1:1 error Parse error on line 1: " t y p e " ^ Expecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'INVALID'

Here is an example of data I obtained this way :

"type": "FeatureCollection",
"features": [
{
  "type": "Feature",
  "id": "node/1853272897",
  "properties": {
    "timestamp": "2017-03-11T12:50:59Z",
    "version": "4",
    "changeset": "46761722",
    "user": "sbiribizio",
    "uid": "354284",
    "name": "Capo Linaro",
    "natural": "cape",
    "wikidata": "Q3657144",
    "wikipedia": "it:Capo Linaro",
    "id": "node/1853272897"
  },
  "geometry": {
    "type": "Point",
    "coordinates": [
      11.8357546,
      42.028944
    ]
  }
}
]
}

So I don't know where the problem comes from (I thought of different encodings maybe).

1
The initial { is missing.melpomene
is the file in UTF-16? then save it as UTF-8phuclv

1 Answers

0
votes

So, yes I just had to save it in UFT-8. However it still doesn't work in mapbox, but the question was for geojsonhint verification, so this is the correct answer!