Closed dpprdan closed 6 years ago
This should be fixed in sf v0.7.0 (which I believe should be on CRAN shortly) via this PR. If you install from github with devtools::install_github("r-spatial/sf")
it should work...
It sure is! And I should have searched not only the open issues before opening this... 🤦♂️ Thanks a lot and sorry for the noise. BTW v0.7-0 is on CRAN now.
st_read()
reads a text column with allnull
values as an empty geometry column (sfc_GEOMETRYCOLLECTION
) whendsn
is a {RPostgreSQL} connection.This problem apparently does not appear with a {RPostgres} connection.
Session info
``` r devtools::session_info() #> - Session info ---------------------------------------------------------- #> setting value #> version R version 3.5.1 (2018-07-02) #> os Windows 10 x64 #> system x86_64, mingw32 #> ui RTerm #> language en #> collate German_Germany.1252 #> ctype German_Germany.1252 #> tz Europe/Berlin #> date 2018-10-17 #> #> - Packages -------------------------------------------------------------- #> package * version date lib #> assertthat 0.2.0 2017-04-11 [1] #> backports 1.1.2 2017-12-13 [1] #> base64enc 0.1-3 2015-07-28 [1] #> bindr 0.1.1 2018-03-13 [1] #> bindrcpp 0.2.2 2018-03-29 [1] #> bit 1.1-14 2018-05-29 [1] #> bit64 0.9-7 2017-05-08 [1] #> blob 1.1.1 2018-03-25 [1] #> callr 3.0.0 2018-08-24 [1] #> class 7.3-14 2015-08-30 [2] #> classInt 0.2-3 2018-04-16 [1] #> cli 1.0.1 2018-09-25 [1] #> crayon 1.3.4 2017-09-16 [1] #> DBI * 1.0.0 2018-05-02 [1] #> debugme 1.1.0 2017-10-22 [1] #> desc 1.2.0 2018-05-01 [1] #> devtools 1.13.6.9000 2018-10-09 [1] #> digest 0.6.18 2018-10-10 [1] #> dplyr * 0.7.6 2018-06-29 [1] #> e1071 1.7-0 2018-07-28 [1] #> evaluate 0.12 2018-10-09 [1] #> fs 1.2.6 2018-08-23 [1] #> glue 1.3.0 2018-07-17 [1] #> hms 0.4.2.9001 2018-08-16 [1] #> htmldeps 0.1.1 2018-07-30 [1] #> htmltools 0.3.6 2017-04-28 [1] #> knitr 1.20 2018-02-20 [1] #> magrittr 1.5 2014-11-22 [1] #> memoise 1.1.0 2017-04-21 [1] #> pillar 1.3.0.9000 2018-08-16 [1] #> pkgbuild 1.0.2 2018-10-16 [1] #> pkgconfig 2.0.2 2018-08-16 [1] #> pkgload 1.0.1 2018-10-11 [1] #> prettyunits 1.0.2 2015-07-13 [1] #> processx 3.2.0 2018-08-16 [1] #> ps 1.2.0 2018-10-16 [1] #> purrr 0.2.5 2018-05-29 [1] #> R6 2.3.0 2018-10-04 [1] #> Rcpp 0.12.19 2018-10-01 [1] #> remotes 2.0.0 2018-10-11 [1] #> rlang 0.2.2 2018-08-16 [1] #> rmarkdown 1.10.13 2018-09-04 [1] #> RPostgres * 1.1.1 2018-05-06 [1] #> RPostgreSQL * 0.6-3 2018-08-20 [1] #> rprojroot 1.3-2 2018-01-03 [1] #> sessioninfo 1.1.0 2018-09-25 [1] #> sf * 0.6-4 2018-09-05 [1] #> spData 0.2.9.4 2018-09-15 [1] #> stringi 1.2.4 2018-07-20 [1] #> stringr 1.3.1 2018-05-10 [1] #> testthat 2.0.1 2018-10-13 [1] #> tibble 1.4.2 2018-01-22 [1] #> tidyselect 0.2.5 2018-10-11 [1] #> units 0.6-1 2018-09-21 [1] #> usethis 1.4.0 2018-08-14 [1] #> withr 2.1.2 2018-03-15 [1] #> yaml 2.2.0 2018-07-25 [1] #> source #> CRAN (R 3.5.1) #> CRAN (R 3.5.0) #> CRAN (R 3.5.0) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.0) #> CRAN (R 3.5.0) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> Github (r-lib/devtools@c24b146) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> Github (tidyverse/hms@979286f) #> Github (rstudio/htmldeps@c1023e0) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> Github (hadley/colformat@3fabb4e) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> Github (rstudio/rmarkdown@19008bf) #> CRAN (R 3.5.1) #> Github (tomoakin/RPostgreSQL@ac45baf) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> Github (r-spatial/sf@9a49d03) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> CRAN (R 3.5.1) #> #> [1] C:/Users/daniel/Documents/.R/win-library #> [2] C:/Program Files/R/R-3.5.1/library ```