leppott / MBSStools

Suite of tools for data manipulation and calculations for Maryland DNR MBSS program.
https://leppott.github.io/MBSStools/
GNU General Public License v3.0
3 stars 3 forks source link

Replace spatial packages to be deprecated by end of 2023 #44

Open leppott opened 2 years ago

leppott commented 2 years ago

Describe the bug The sp, rgdal, and maptools packages are to be deprecated at the end of 2023.

To Reproduce Replace packages with some combination of functions from sf, GEOS, GDAL, or PROJ.

image

Expected behavior NA

Additional context https://www.r-bloggers.com/2022/04/r-spatial-evolution-retirement-of-rgdal-rgeos-and-maptools/

leppott commented 2 years ago

Will need to fix before can submit to CRAN.

leppott commented 6 months ago

Can grab the last version of rgdal (1.6.7) from the CRAN archive.

https://cran.r-project.org/src/contrib/Archive/rgdal/

leppott commented 6 months ago

'strata' function is broken.

data_strata<- strata(data[1:5, ], col_lat, col_lon) Error in UseMethod("as_s2_geography") : no applicable method for 'as_s2_geography' applied to an object of class "c('SpatialPolygonsDataFrame', 'SpatialPolygons', 'Spatial')"

Assume it is related to the move away from the rgdal package. But MazamaSpatialUtils rather than rgdal is used in the code.