edzer / sp

Classes and methods for spatial data
http://edzer.github.io/sp/
127 stars 27 forks source link

changing projection issue #110

Closed taleac closed 2 years ago

taleac commented 3 years ago

I am trying to implement st_transform with no success. The first error is below:

> cnty <- st_transform(boroughs, 102008) Error in CPL_transform(x, crs, aoi, pipeline, reverse, desired_accuracy, : crs not found: is it missing? In addition: Warning message: In CPL_crs_from_input(x) : GDAL Error 1: PROJ: proj_create_from_database: crs not found

I then found this solution: https://stackoverflow.com/questions/61286108/error-in-cpl-transformx-crs-aoi-pipeline-reverse-ogrcreatecoordinatetrans However, it does not work in my data:

sf::st_crs(boroughs) <- 9802 Warning message: In CPL_crs_from_input(x) : GDAL Error 1: PROJ: proj_create_from_database: crs not found

Any help is greatly appreciated.

edzer commented 2 years ago

st_transform is a function in package sf, not sp.