{"action":"created","issue":{"url":"https://api.github.com/repos/edzer/sfr/issues/342","repository_url":"https://api.github.com/repos/edzer/sfr","labels_url":"https://api.github.com/repos/edzer/sfr/issues/342/labels{/name}","comments_url":"https://api.github.com/repos/edzer/sfr/issues/342/comments","events_url":"https://api.github.com/repos/edzer/sfr/issues/342/events","html_url":"https://github.com/edzer/sfr/issues/342","id":229057514,"number":342,"title":"st_transform hangs on NAs in geometry column","user":{"login":"petrbouchal","id":1666657,"avatar_url":"https://avatars3.githubusercontent.com/u/1666657?v=3","gravatar_id":"","url":"https://api.github.com/users/petrbouchal","html_url":"https://github.com/petrbouchal","followers_url":"https://api.github.com/users/petrbouchal/followers","following_url":"https://api.github.com/users/petrbouchal/following{/other_user}","gists_url":"https://api.github.com/users/petrbouchal/gists{/gist_id}","starred_url":"https://api.github.com/users/petrbouchal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petrbouchal/subscriptions","organizations_url":"https://api.github.com/users/petrbouchal/orgs","repos_url":"https://api.github.com/users/petrbouchal/repos","events_url":"https://api.github.com/users/petrbouchal/events{/privacy}","received_events_url":"https://api.github.com/users/petrbouchal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-05-16T14:39:12Z","updated_at":"2017-05-18T09:28:23Z","closed_at":null,"body":"``` r\r\nlibrary(sf)\r\n#> Linking to GEOS 3.5.0, GDAL 2.1.1, proj.4 4.9.3\r\nlibrary(tibble)\r\n#> Warning: package 'tibble' was built under R version 3.3.3\r\n\r\ndf0 <- tribble(~id, ~lon, ~lat,\r\n               \"a\",    1,    1,\r\n               \"b\",    2,    1)\r\ndf1 <- tribble(~id, ~lon, ~lat,\r\n               \"a\",    1,    1,\r\n               \"b\",   NA,    1)\r\n\r\ndf0_geo <- st_as_sf(df0, coords = c(\"lon\", \"lat\"), crs = 5514)\r\nst_transform(df0_geo, 4326)\r\n#> Simple feature collection with 2 features and 1 field\r\n#> geometry type:  POINT\r\n#> dimension:      XY\r\n#> bbox:           xmin: 24.83017 ymin: 59.7559 xmax: 24.83019 ymax: 59.7559\r\n#> epsg (SRID):    4326\r\n#> proj4string:    +proj=longlat +datum=WGS84 +no_defs\r\n#> # A tibble: 2 Ă— 2\r\n#>      id          geometry\r\n#>   <chr>  <simple_feature>\r\n#> 1     a <POINT(24.830...>\r\n#> 2     b <POINT(24.830...>\r\n\r\ndf1_geo <- st_as_sf(df1, coords = c(\"lon\", \"lat\"), crs = 5514)\r\nst_transform(df1_geo, 4326) # hangs\r\n\r\nsessionInfo()\r\n#> R version 3.3.2 (2016-10-31)\r\n#> Platform: i386-w64-mingw32/i386 (32-bit)\r\n#> Running under: Windows 7 (build 7601) Service Pack 1\r\n#> \r\n#> locale:\r\n#> [1] LC_COLLATE=Czech_Czech Republic.1250 \r\n#> [2] LC_CTYPE=Czech_Czech Republic.1250   \r\n#> [3] LC_MONETARY=Czech_Czech Republic.1250\r\n#> [4] LC_NUMERIC=C                         \r\n#> [5] LC_TIME=Czech_Czech Republic.1250    \r\n#> \r\n#> attached base packages:\r\n#> [1] stats     graphics  grDevices utils     datasets  methods   base     \r\n#> \r\n#> other attached packages:\r\n#> [1] tibble_1.3.0 sf_0.4-3    \r\n#> \r\n#> loaded via a namespace (and not attached):\r\n#>  [1] Rcpp_0.12.10    digest_0.6.12   rprojroot_1.1   grid_3.3.2     \r\n#>  [5] DBI_0.6-1       backports_1.0.4 magrittr_1.5    evaluate_0.10  \r\n#>  [9] units_0.4-3     stringi_1.1.5   rmarkdown_1.3   tools_3.3.2    \r\n#> [13] stringr_1.1.0   udunits2_0.13   yaml_2.1.13     htmltools_0.3.5\r\n#> [17] knitr_1.15.1\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/edzer/sfr/issues/comments/302351582","html_url":"https://github.com/edzer/sfr/issues/342#issuecomment-302351582","issue_url":"https://api.github.com/repos/edzer/sfr/issues/342","id":302351582,"user":{"login":"edzer","id":520851,"avatar_url":"https://avatars2.githubusercontent.com/u/520851?v=3","gravatar_id":"","url":"https://api.github.com/users/edzer","html_url":"https://github.com/edzer","followers_url":"https://api.github.com/users/edzer/followers","following_url":"https://api.github.com/users/edzer/following{/other_user}","gists_url":"https://api.github.com/users/edzer/gists{/gist_id}","starred_url":"https://api.github.com/users/edzer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edzer/subscriptions","organizations_url":"https://api.github.com/users/edzer/orgs","repos_url":"https://api.github.com/users/edzer/repos","events_url":"https://api.github.com/users/edzer/events{/privacy}","received_events_url":"https://api.github.com/users/edzer/received_events","type":"User","site_admin":false},"created_at":"2017-05-18T09:28:23Z","updated_at":"2017-05-18T09:28:23Z","body":"If you say `reading coordinates from a flat file`, do you mean sth like\r\n```r\r\ndata(meuse, package = \"sp\")\r\nmeuse_sf = st_as_sf(meuse, coords = c(\"x\", \"y\"), crs = 28992, agr = \"constant\")\r\n```\r\nit might be a good idea to catch `NA` values right there."}}
{"actor":{"display_login":"edzer"}}