You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm looking for the GEOS equivalent of sf::st_transform, because I want to change the CRS of a GEOS geometry in the package (from 2154 to 4326). I looked carefully in the list of functions but couldn't find it. Am I missing or misunderstanding something?
Thanks for developing this very useful package, it really helped me in my current project (along with wk and ggspatial)!
The text was updated successfully, but these errors were encountered:
GEOS doesn't do coordinate transformations...you will need sf to do that for you because it contains a copy of GDAL and PROJ which provide the infrastructure for that. I had some early experiments to provide that infrastructure in a lighter way; however, none of them made it to CRAN. sf::st_transform() is your best bet for now! See also sf::sf_project() which is a lighter version that works better for points.
do we have a generalized round-trip, though? sfheaders had the beginning of something like
df <- sf_to_df(x)
df <- <do something here, like sf::project(df[c("x", "y")], to = <target>, from = wk::wk_crs(x))>
x <- df_restore_what_x_was(df)
that would be so sweet, and enable a whole lot of workflows now that wk handles so many types. This is just a OTOH thought, I'll actually have a look into it (it's not too hard, and could have a syntax like wk_coords(x) <- do_stuff(wk_coords(x), args...).
Hi, I'm looking for the GEOS equivalent of
sf::st_transform
, because I want to change the CRS of a GEOS geometry in the package (from 2154 to 4326). I looked carefully in the list of functions but couldn't find it. Am I missing or misunderstanding something?Thanks for developing this very useful package, it really helped me in my current project (along with
wk
andggspatial
)!The text was updated successfully, but these errors were encountered: