Closed danstrobridge-Weston closed 3 years ago
Nevermind on this issue. Although I was not able to figure it out, I conveniently received a new computer yesterday and was able to do a fresh install of R and Rstudio and a bunch of packages. Everything's working on the new computer so I'm good.
I recently upgraded to version 1.4-5 because i was several versions behind. Unfortunately, I'm no longer able to define projections using code like the first line below. I know I'm not the only one experiencing this issue because I found the workaround that is my 2nd line of code below from the answer provided in this link to a post made back in February. https://gis.stackexchange.com/questions/387072/r-spcrs-returns-na
txspsc<-sp::CRS("+init=epsg:2278") gives "Error in sp::CRS("+init=epsg:2278") : NA" txspsc2<-sp::CRS(sf::st_crs(2278)[[2]]) works
The sf workaround allows me to export sp files to shp (yielding a prj) for use in ESRI and other systems, but I'm finding that a lot of my tools (homegrown and from CRAN packages) that use sp objects are no working because they think the CRS is empty for some reason. For example, elevatr::get_elev_raster() yields "error in evaluating the argument 'CRSobj' in selecting a method for function 'spTransform': NA".
Are you able to replicate this behavior and, if so, would it be coming from sp, rgdal, or something else? I reinstalled rgdal and my session info is below. Thanks so much.
`R version 4.0.2 (2020-06-22) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 17134)
Matrix products: default
locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] raster_3.4-10 sp_1.4-5
loaded via a namespace (and not attached): [1] Rcpp_1.0.5 lubridate_1.7.10 lattice_0.20-41 deldir_0.2-10 listenv_0.8.0 class_7.3-17 zoo_1.8-9 assertthat_0.2.1
[9] digest_0.6.27 utf8_1.2.1 rkt_1.6 parallelly_1.25.0 R6_2.5.0 cellranger_1.1.0 plyr_1.8.6 e1071_1.7-6
[17] ggplot2_3.3.3 smoothr_0.1.2 pillar_1.6.0 tictoc_1.0.1 rlang_0.4.11 readxl_1.3.1 rstudioapi_0.13 furrr_0.2.2
[25] rgdal_1.5-23 readr_1.4.0 stringr_1.4.0 foreign_0.8-80 munsell_0.5.0 tinytex_0.31 proxy_0.4-25 compiler_4.0.2
[33] xfun_0.22 pkgconfig_2.0.3 fuzzyjoin_0.1.6 globals_0.14.0 rgeos_0.5-5 tidyselect_1.1.1 tibble_3.1.1 codetools_0.2-16
[41] fansi_0.4.1 future_1.21.0 crayon_1.4.1 dplyr_1.0.6 sf_0.9-8 grid_4.0.2 gtable_0.3.0 lifecycle_1.0.0
[49] DBI_1.1.1 magrittr_2.0.1 units_0.7-1 scales_1.1.1 KernSmooth_2.23-17 cli_2.5.0 stringi_1.6.1 ellipsis_0.3.1
[57] generics_0.1.0 vctrs_0.3.8 hablar_0.3.0 tools_4.0.2 glue_1.4.2 elevatr_0.3.4 purrr_0.3.4 hms_1.0.0
[65] parallel_4.0.2 colorspace_2.0-1 maptools_1.1-1 classInt_0.4-3 unpivotr_0.6.1 `