{"action":"created","issue":{"url":"https://api.github.com/repos/mapbox/mapbox-file-sniff/issues/35","repository_url":"https://api.github.com/repos/mapbox/mapbox-file-sniff","labels_url":"https://api.github.com/repos/mapbox/mapbox-file-sniff/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/mapbox/mapbox-file-sniff/issues/35/comments","events_url":"https://api.github.com/repos/mapbox/mapbox-file-sniff/issues/35/events","html_url":"https://github.com/mapbox/mapbox-file-sniff/issues/35","id":130547547,"number":35,"title":"mapbox-file-type reporting \"Unknown filetype\" on well-formed geojson","user":{"login":"jacquestardie","id":192642,"avatar_url":"https://avatars.githubusercontent.com/u/192642?v=3","gravatar_id":"","url":"https://api.github.com/users/jacquestardie","html_url":"https://github.com/jacquestardie","followers_url":"https://api.github.com/users/jacquestardie/followers","following_url":"https://api.github.com/users/jacquestardie/following{/other_user}","gists_url":"https://api.github.com/users/jacquestardie/gists{/gist_id}","starred_url":"https://api.github.com/users/jacquestardie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacquestardie/subscriptions","organizations_url":"https://api.github.com/users/jacquestardie/orgs","repos_url":"https://api.github.com/users/jacquestardie/repos","events_url":"https://api.github.com/users/jacquestardie/events{/privacy}","received_events_url":"https://api.github.com/users/jacquestardie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mapbox/mapbox-file-sniff/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-02-02T02:09:13Z","updated_at":"2016-09-01T13:26:45Z","closed_at":null,"body":"@jakepruitt helped me track down an issue with `mapbox-file-type`, which when installed locally, was outputting the following:\r\n\r\n```\r\n❯ mapbox-file-type file.geojson\r\nUnknown filetype\r\n```\r\n\r\nThis geojson was known to work with geojson.io — but would fail when attempting to upload to Mapbox Studio.\r\n\r\nAfter taking a look at the `geojson`, we noticed that `\"type\": \"FeatureCollection\"` had been appended to the bottom of the file. Usually that's seen first.\r\n\r\n```bash\r\n          ]\r\n        ],\r\n        \"type\": \"Polygon\"\r\n      },\r\n      \"properties\": {},\r\n      \"type\": \"Feature\"\r\n    }\r\n  ],\r\n  \"type\": \"FeatureCollection\"\r\n}\r\n```\r\n\r\nAfter rearranging `\"type\": \"FeatureCollection\"` to the top of the file, we get:\r\n\r\n```bash\r\n❯ mapbox-file-type dg_metro_pretty.geojson\r\ngeojson\r\n```\r\n\r\nAfter which, the upload to Mapbox Studio went through successfully.\r\n\r\nNot sure what the next actions here would be, but thought I'd report in case this was unexpected/unwanted behavior."},"comment":{"url":"https://api.github.com/repos/mapbox/mapbox-file-sniff/issues/comments/244077803","html_url":"https://github.com/mapbox/mapbox-file-sniff/issues/35#issuecomment-244077803","issue_url":"https://api.github.com/repos/mapbox/mapbox-file-sniff/issues/35","id":244077803,"user":{"login":"GretaCB","id":1209162,"avatar_url":"https://avatars.githubusercontent.com/u/1209162?v=3","gravatar_id":"","url":"https://api.github.com/users/GretaCB","html_url":"https://github.com/GretaCB","followers_url":"https://api.github.com/users/GretaCB/followers","following_url":"https://api.github.com/users/GretaCB/following{/other_user}","gists_url":"https://api.github.com/users/GretaCB/gists{/gist_id}","starred_url":"https://api.github.com/users/GretaCB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GretaCB/subscriptions","organizations_url":"https://api.github.com/users/GretaCB/orgs","repos_url":"https://api.github.com/users/GretaCB/repos","events_url":"https://api.github.com/users/GretaCB/events{/privacy}","received_events_url":"https://api.github.com/users/GretaCB/received_events","type":"User","site_admin":false},"created_at":"2016-09-01T13:26:45Z","updated_at":"2016-09-01T13:26:45Z","body":"Ooooo, this is a great post @sgillies. \r\n\r\nCurious what your thoughts are on [this user's geojson file](https://github.com/mapbox/mapbox-file-sniff/issues/44). Are you suggesting to disregard `crs` and `bbox` properties if they are the first properties in the object, and to continue searching for the other primary properties (features, geometry, coordinates), which perhaps hold more validation weight?"}}
{"actor":{"display_login":"GretaCB"}}