{"action":"created","issue":{"url":"https://api.github.com/repos/mbostock/shapefile/issues/27","repository_url":"https://api.github.com/repos/mbostock/shapefile","labels_url":"https://api.github.com/repos/mbostock/shapefile/issues/27/labels{/name}","comments_url":"https://api.github.com/repos/mbostock/shapefile/issues/27/comments","events_url":"https://api.github.com/repos/mbostock/shapefile/issues/27/events","html_url":"https://github.com/mbostock/shapefile/issues/27","id":177659670,"number":27,"title":"Coordinate Reference System","user":{"login":"DenisCarriere","id":550895,"avatar_url":"https://avatars.githubusercontent.com/u/550895?v=3","gravatar_id":"","url":"https://api.github.com/users/DenisCarriere","html_url":"https://github.com/DenisCarriere","followers_url":"https://api.github.com/users/DenisCarriere/followers","following_url":"https://api.github.com/users/DenisCarriere/following{/other_user}","gists_url":"https://api.github.com/users/DenisCarriere/gists{/gist_id}","starred_url":"https://api.github.com/users/DenisCarriere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DenisCarriere/subscriptions","organizations_url":"https://api.github.com/users/DenisCarriere/orgs","repos_url":"https://api.github.com/users/DenisCarriere/repos","events_url":"https://api.github.com/users/DenisCarriere/events{/privacy}","received_events_url":"https://api.github.com/users/DenisCarriere/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-18T15:55:50Z","updated_at":"2016-09-19T17:51:35Z","closed_at":null,"body":"The coordinate reference systems should be included at least in the `read` GeoJSON.\r\n\r\nhttp://geojson.org/geojson-spec.html#coordinate-reference-system-objects\r\n\r\n```javascript\r\nshapefile.read('example.shp')\r\n    .then(data => {\r\n        data.type\r\n        data.bbox\r\n        data.features\r\n        data.crs //=> undefined\r\n    })\r\n```\r\n\r\nThere's going to be a `.prj` file associated with the shapefile files, might want to parse that and place that information into the GeoJSON `crs`. The projection file is a readable string.\r\n\r\n```\r\nGEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]]\r\n```\r\n\r\nProj4 does a good job at parsing these CRS codes:\r\n\r\nhttps://github.com/proj4js/proj4js/blob/master/lib/parseCode.js"},"comment":{"url":"https://api.github.com/repos/mbostock/shapefile/issues/comments/248068050","html_url":"https://github.com/mbostock/shapefile/issues/27#issuecomment-248068050","issue_url":"https://api.github.com/repos/mbostock/shapefile/issues/27","id":248068050,"user":{"login":"DenisCarriere","id":550895,"avatar_url":"https://avatars.githubusercontent.com/u/550895?v=3","gravatar_id":"","url":"https://api.github.com/users/DenisCarriere","html_url":"https://github.com/DenisCarriere","followers_url":"https://api.github.com/users/DenisCarriere/followers","following_url":"https://api.github.com/users/DenisCarriere/following{/other_user}","gists_url":"https://api.github.com/users/DenisCarriere/gists{/gist_id}","starred_url":"https://api.github.com/users/DenisCarriere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DenisCarriere/subscriptions","organizations_url":"https://api.github.com/users/DenisCarriere/orgs","repos_url":"https://api.github.com/users/DenisCarriere/repos","events_url":"https://api.github.com/users/DenisCarriere/events{/privacy}","received_events_url":"https://api.github.com/users/DenisCarriere/received_events","type":"User","site_admin":false},"created_at":"2016-09-19T17:51:35Z","updated_at":"2016-09-19T17:51:35Z","body":"I agree this would be quite a challenge, maybe it's best to place it in the documentation that states the data must be in WGS84. if no projection is found in the GeoJSON then it defaults to EPGS:4326, this would create incorrect coordinates if the shapefile is using a different projection."}}
{"actor":{"display_login":"DenisCarriere"}}