{"action":"created","issue":{"url":"https://api.github.com/repos/ropensci/geojsonio/issues/83","repository_url":"https://api.github.com/repos/ropensci/geojsonio","labels_url":"https://api.github.com/repos/ropensci/geojsonio/issues/83/labels{/name}","comments_url":"https://api.github.com/repos/ropensci/geojsonio/issues/83/comments","events_url":"https://api.github.com/repos/ropensci/geojsonio/issues/83/events","html_url":"https://github.com/ropensci/geojsonio/issues/83","id":148329699,"number":83,"title":"'file_to_geojson' - error when reading from 'special' url","user":{"login":"patperu","id":82020,"avatar_url":"https://avatars.githubusercontent.com/u/82020?v=3","gravatar_id":"","url":"https://api.github.com/users/patperu","html_url":"https://github.com/patperu","followers_url":"https://api.github.com/users/patperu/followers","following_url":"https://api.github.com/users/patperu/following{/other_user}","gists_url":"https://api.github.com/users/patperu/gists{/gist_id}","starred_url":"https://api.github.com/users/patperu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patperu/subscriptions","organizations_url":"https://api.github.com/users/patperu/orgs","repos_url":"https://api.github.com/users/patperu/repos","events_url":"https://api.github.com/users/patperu/events{/privacy}","received_events_url":"https://api.github.com/users/patperu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-04-14T11:22:12Z","updated_at":"2016-04-17T14:19:58Z","closed_at":null,"body":"Hello @sckott,\r\n\r\nI want to convert a shpfile (as zip) to geojson, the input comes from an url.\r\n\r\n```{r}\r\nlibrary('geojsonio')\r\nurl <- 'http://odn.comune.prato.it/geonetwork/srv/en/resources.get?uuid=f7077224-bf61-4b1e-904b-f3668ef80859&fname=WIFI_COPERTURA.zip&access=private'\r\nout <- file_to_geojson(input=url, method='web', output='wifi-free-web')\r\n## Success! File is at wifi-free-web.geojson\r\n```\r\n\r\nBut the generated geojson is not valid, it contains this:\r\n\r\n```{r}\r\nreadLines(\"wifi-free-web.geojson\", n = -1)\r\n## [1] \"{\\\"errors\\\":[\\\"invalid distance too far back\\\"]}\"\r\n```\r\n\r\nIf I use the same file from a different location, everything looks good (well, not really.. but this will be another issue :wink: )\r\n\r\n```{r}\r\nurl <- 'http://www.covimo.de/wifi/WIFI_COPERTURA.zip'\r\nout <- file_to_geojson(input=url, method='web', output='wifi-free-web-covimo')\r\nsubstring(readLines(\"wifi-free-web-covimo.geojson\", n = -1), 1, 150)\r\n#[1] \"{\\\"type\\\":\\\"FeatureCollection\\\",\\\"features\\\":[{\\\"type\\\":\\\"Feature\\\",\\\"properties\\\":{\\\"ID\\\":7},\\\"geometry\\\":{\\\"type\\\":\\\"Polygon\\\",\\\"coordinates\\\":[[[1668528.9793110648,48612\"\r\n```\r\n\r\nCiao\r\nPatrick\r\n"},"comment":{"url":"https://api.github.com/repos/ropensci/geojsonio/issues/comments/211027792","html_url":"https://github.com/ropensci/geojsonio/issues/83#issuecomment-211027792","issue_url":"https://api.github.com/repos/ropensci/geojsonio/issues/83","id":211027792,"user":{"login":"patperu","id":82020,"avatar_url":"https://avatars.githubusercontent.com/u/82020?v=3","gravatar_id":"","url":"https://api.github.com/users/patperu","html_url":"https://github.com/patperu","followers_url":"https://api.github.com/users/patperu/followers","following_url":"https://api.github.com/users/patperu/following{/other_user}","gists_url":"https://api.github.com/users/patperu/gists{/gist_id}","starred_url":"https://api.github.com/users/patperu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patperu/subscriptions","organizations_url":"https://api.github.com/users/patperu/orgs","repos_url":"https://api.github.com/users/patperu/repos","events_url":"https://api.github.com/users/patperu/events{/privacy}","received_events_url":"https://api.github.com/users/patperu/received_events","type":"User","site_admin":false},"created_at":"2016-04-17T14:19:58Z","updated_at":"2016-04-17T14:19:58Z","body":"Hello @sckott ,\r\ncouldn't try it on another windows machine, hopefully tomorrow. With Ubuntu it works without a problem for both methods `local` and `web`.\r\nCiao\r\nPatrick"}}