{"action":"created","issue":{"url":"https://api.github.com/repos/SymbolixAU/geojsonsf/issues/50","repository_url":"https://api.github.com/repos/SymbolixAU/geojsonsf","labels_url":"https://api.github.com/repos/SymbolixAU/geojsonsf/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/SymbolixAU/geojsonsf/issues/50/comments","events_url":"https://api.github.com/repos/SymbolixAU/geojsonsf/issues/50/events","html_url":"https://github.com/SymbolixAU/geojsonsf/issues/50","id":374691304,"node_id":"MDU6SXNzdWUzNzQ2OTEzMDQ=","number":50,"title":"down-cast structures","user":{"login":"SymbolixAU","id":18344164,"node_id":"MDQ6VXNlcjE4MzQ0MTY0","avatar_url":"https://avatars2.githubusercontent.com/u/18344164?v=4","gravatar_id":"","url":"https://api.github.com/users/SymbolixAU","html_url":"https://github.com/SymbolixAU","followers_url":"https://api.github.com/users/SymbolixAU/followers","following_url":"https://api.github.com/users/SymbolixAU/following{/other_user}","gists_url":"https://api.github.com/users/SymbolixAU/gists{/gist_id}","starred_url":"https://api.github.com/users/SymbolixAU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SymbolixAU/subscriptions","organizations_url":"https://api.github.com/users/SymbolixAU/orgs","repos_url":"https://api.github.com/users/SymbolixAU/repos","events_url":"https://api.github.com/users/SymbolixAU/events{/privacy}","received_events_url":"https://api.github.com/users/SymbolixAU/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"SymbolixAU","id":18344164,"node_id":"MDQ6VXNlcjE4MzQ0MTY0","avatar_url":"https://avatars2.githubusercontent.com/u/18344164?v=4","gravatar_id":"","url":"https://api.github.com/users/SymbolixAU","html_url":"https://github.com/SymbolixAU","followers_url":"https://api.github.com/users/SymbolixAU/followers","following_url":"https://api.github.com/users/SymbolixAU/following{/other_user}","gists_url":"https://api.github.com/users/SymbolixAU/gists{/gist_id}","starred_url":"https://api.github.com/users/SymbolixAU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SymbolixAU/subscriptions","organizations_url":"https://api.github.com/users/SymbolixAU/orgs","repos_url":"https://api.github.com/users/SymbolixAU/repos","events_url":"https://api.github.com/users/SymbolixAU/events{/privacy}","received_events_url":"https://api.github.com/users/SymbolixAU/received_events","type":"User","site_admin":false},"assignees":[{"login":"SymbolixAU","id":18344164,"node_id":"MDQ6VXNlcjE4MzQ0MTY0","avatar_url":"https://avatars2.githubusercontent.com/u/18344164?v=4","gravatar_id":"","url":"https://api.github.com/users/SymbolixAU","html_url":"https://github.com/SymbolixAU","followers_url":"https://api.github.com/users/SymbolixAU/followers","following_url":"https://api.github.com/users/SymbolixAU/following{/other_user}","gists_url":"https://api.github.com/users/SymbolixAU/gists{/gist_id}","starred_url":"https://api.github.com/users/SymbolixAU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SymbolixAU/subscriptions","organizations_url":"https://api.github.com/users/SymbolixAU/orgs","repos_url":"https://api.github.com/users/SymbolixAU/repos","events_url":"https://api.github.com/users/SymbolixAU/events{/privacy}","received_events_url":"https://api.github.com/users/SymbolixAU/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/SymbolixAU/geojsonsf/milestones/2","html_url":"https://github.com/SymbolixAU/geojsonsf/milestone/2","labels_url":"https://api.github.com/repos/SymbolixAU/geojsonsf/milestones/2/labels","id":3736540,"node_id":"MDk6TWlsZXN0b25lMzczNjU0MA==","number":2,"title":"v.1.3","description":"","creator":{"login":"SymbolixAU","id":18344164,"node_id":"MDQ6VXNlcjE4MzQ0MTY0","avatar_url":"https://avatars2.githubusercontent.com/u/18344164?v=4","gravatar_id":"","url":"https://api.github.com/users/SymbolixAU","html_url":"https://github.com/SymbolixAU","followers_url":"https://api.github.com/users/SymbolixAU/followers","following_url":"https://api.github.com/users/SymbolixAU/following{/other_user}","gists_url":"https://api.github.com/users/SymbolixAU/gists{/gist_id}","starred_url":"https://api.github.com/users/SymbolixAU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SymbolixAU/subscriptions","organizations_url":"https://api.github.com/users/SymbolixAU/orgs","repos_url":"https://api.github.com/users/SymbolixAU/repos","events_url":"https://api.github.com/users/SymbolixAU/events{/privacy}","received_events_url":"https://api.github.com/users/SymbolixAU/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":1,"state":"open","created_at":"2018-10-14T03:27:21Z","updated_at":"2018-10-27T21:36:03Z","due_on":"2018-11-30T08:00:00Z","closed_at":null},"comments":0,"created_at":"2018-10-27T21:35:57Z","updated_at":"2018-11-11T08:58:53Z","closed_at":null,"author_association":"OWNER","body":"Similar to `expand_geometries`, have a `simplify_multi` argument to simplify geometries? \r\n\r\nTODO\r\n- [ ] MULTIPOINT to POINT\r\n- [ ] MULTILINESTRING to LINESTRING\r\n- [ ] MULTIPOLYGON to POLYGON"},"comment":{"url":"https://api.github.com/repos/SymbolixAU/geojsonsf/issues/comments/437653773","html_url":"https://github.com/SymbolixAU/geojsonsf/issues/50#issuecomment-437653773","issue_url":"https://api.github.com/repos/SymbolixAU/geojsonsf/issues/50","id":437653773,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzY1Mzc3Mw==","user":{"login":"SymbolixAU","id":18344164,"node_id":"MDQ6VXNlcjE4MzQ0MTY0","avatar_url":"https://avatars2.githubusercontent.com/u/18344164?v=4","gravatar_id":"","url":"https://api.github.com/users/SymbolixAU","html_url":"https://github.com/SymbolixAU","followers_url":"https://api.github.com/users/SymbolixAU/followers","following_url":"https://api.github.com/users/SymbolixAU/following{/other_user}","gists_url":"https://api.github.com/users/SymbolixAU/gists{/gist_id}","starred_url":"https://api.github.com/users/SymbolixAU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SymbolixAU/subscriptions","organizations_url":"https://api.github.com/users/SymbolixAU/orgs","repos_url":"https://api.github.com/users/SymbolixAU/repos","events_url":"https://api.github.com/users/SymbolixAU/events{/privacy}","received_events_url":"https://api.github.com/users/SymbolixAU/received_events","type":"User","site_admin":false},"created_at":"2018-11-11T08:58:53Z","updated_at":"2018-11-11T08:58:53Z","author_association":"OWNER","body":"```r\r\nnc <- sf::st_read(system.file(\"shape/nc.shp\", package=\"sf\"))\r\n\r\nlibrary(microbenchmark)\r\n\r\nmicrobenchmark(\r\n\tsf = {\r\n\t\tnc_poly <- sf::st_cast( nc, to = \"POLYGON\")\r\n\t\tgeo_poly <- geojsonsf::sf_geojson( nc_poly )\r\n\t},\r\n\tgeojsonsf = {\r\n\t\tgeo_sf <- geojsonsf:::rcpp_sf_to_geojson_downcast( nc )\r\n\t},\r\n\ttimes = 5\r\n)\r\n\r\n# Unit: milliseconds\r\n#      expr       min        lq      mean    median        uq       max neval\r\n#        sf 16.019968 16.952798 20.264359 17.283295 19.396397 31.669338     5\r\n# geojsonsf  2.348934  2.597222  3.203101  2.847933  3.017071  5.204344     5\r\n```\r\n\r\neven using `geojsonsf` to to down-cast to GeoJOSN, then back to `sf` is performant.\r\n\r\n```r\r\nmicrobenchmark(\r\n\tsf = {\r\n\t\tnc_poly <- sf::st_cast( nc, to = \"POLYGON\")\r\n\t\tgeo_poly <- geojsonsf::sf_geojson( nc_poly )\r\n\t},\r\n\tgeojsonsf = {\r\n\t\tgeo_sf <- geojsonsf:::rcpp_sf_to_geojson_downcast( nc )\r\n\t\tnc2 <- geojsonsf::geojson_sf( geo_sf )\r\n\t},\r\n\ttimes = 5\r\n)\r\n\r\n# Unit: milliseconds\r\n#      expr      min       lq     mean   median       uq      max neval\r\n#        sf 13.75293 14.42003 16.96273 14.93394 15.38814 26.31861     5\r\n# geojsonsf 10.78687 11.34112 11.60321 11.63283 11.75583 12.49937     5\r\n```"}}
{"actor":{"display_login":"SymbolixAU"}}