{"action":"created","issue":{"url":"https://api.github.com/repos/r-spatial/mapedit/issues/44","repository_url":"https://api.github.com/repos/r-spatial/mapedit","labels_url":"https://api.github.com/repos/r-spatial/mapedit/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/r-spatial/mapedit/issues/44/comments","events_url":"https://api.github.com/repos/r-spatial/mapedit/issues/44/events","html_url":"https://github.com/r-spatial/mapedit/pull/44","id":239248197,"number":44,"title":"feature/geometry naming consistent with st_read","user":{"login":"pschmied","id":1065905,"avatar_url":"https://avatars1.githubusercontent.com/u/1065905?v=3","gravatar_id":"","url":"https://api.github.com/users/pschmied","html_url":"https://github.com/pschmied","followers_url":"https://api.github.com/users/pschmied/followers","following_url":"https://api.github.com/users/pschmied/following{/other_user}","gists_url":"https://api.github.com/users/pschmied/gists{/gist_id}","starred_url":"https://api.github.com/users/pschmied/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pschmied/subscriptions","organizations_url":"https://api.github.com/users/pschmied/orgs","repos_url":"https://api.github.com/users/pschmied/repos","events_url":"https://api.github.com/users/pschmied/events{/privacy}","received_events_url":"https://api.github.com/users/pschmied/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-28T18:06:52Z","updated_at":"2017-06-28T18:38:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/r-spatial/mapedit/pulls/44","html_url":"https://github.com/r-spatial/mapedit/pull/44","diff_url":"https://github.com/r-spatial/mapedit/pull/44.diff","patch_url":"https://github.com/r-spatial/mapedit/pull/44.patch"},"body":"When reading / writing geometries with st_read and st_write, I end up with feature collections with the feature geometry named \"geometry\".\r\n\r\nBy contrast, when I create a feature collection created with editMap(), I end up with a feature collection where the feature geometry is named \"feature\". It's a minor annoyance, but this naming inconsistency results in an extra step when I want to rbind() two such simple feature collections. (BTW, is there a reason this is editMap as opposed to mapEdit like mapView?)\r\n\r\nExample of the issue this resolves:\r\n```\r\nfoo <- editMap()\r\nnames(foo)            # [1] \"X_leaflet_id\" \"feature_type\" \"geometry\"\r\ntmp <- tempfile(fileext = \".geojson\")\r\nst_write(foo, tmp)\r\nbar <- st_read(tmp)\r\nnames(bar)           # [1] \"X_leaflet_id\" \"feature_type\" \"feature\"\r\nrbind(foo, bar)       # Error in match.names(clabs, names(xi)) : \r\n                      # names do not match previous names\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/r-spatial/mapedit/issues/comments/311749573","html_url":"https://github.com/r-spatial/mapedit/pull/44#issuecomment-311749573","issue_url":"https://api.github.com/repos/r-spatial/mapedit/issues/44","id":311749573,"user":{"login":"tim-salabim","id":2826432,"avatar_url":"https://avatars1.githubusercontent.com/u/2826432?v=3","gravatar_id":"","url":"https://api.github.com/users/tim-salabim","html_url":"https://github.com/tim-salabim","followers_url":"https://api.github.com/users/tim-salabim/followers","following_url":"https://api.github.com/users/tim-salabim/following{/other_user}","gists_url":"https://api.github.com/users/tim-salabim/gists{/gist_id}","starred_url":"https://api.github.com/users/tim-salabim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tim-salabim/subscriptions","organizations_url":"https://api.github.com/users/tim-salabim/orgs","repos_url":"https://api.github.com/users/tim-salabim/repos","events_url":"https://api.github.com/users/tim-salabim/events{/privacy}","received_events_url":"https://api.github.com/users/tim-salabim/received_events","type":"User","site_admin":false},"created_at":"2017-06-28T18:38:45Z","updated_at":"2017-06-28T18:38:45Z","body":"I think your example has the naming mixed up (`names(foo)` should have \"feature\"). Nonetheless, I agree that \"geometry\" is a better name for the simple feature column. Yet this is not bulletproof as the sf column can have any arbitrary name so `rbind`ing without error cannot be guaranteed. \r\n\r\n@timelyportfolio will this change break anything?"}}
{"actor":{"display_login":"tim-salabim"}}