-
Notifications
You must be signed in to change notification settings - Fork 300
Closed
Description
What's the best option to compare crs's ? For instance:
epsg <- "+proj=tmerc +lat_0=0 +lon_0=0 +k=0.9999 +x_0=304800 +y_0=0 +datum=NAD83 +units=m +no_defs"
st_crs(epsg)$proj4string; epsg
# [1] "+proj=tmerc +lat_0=0 +lon_0=0 +k=0.9999 +x_0=304800 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"
# [1] "+proj=tmerc +lat_0=0 +lon_0=0 +k=0.9999 +x_0=304800 +y_0=0 +datum=NAD83 +units=m +no_defs"
Using ==
like it's currently the case seems too strict.
epsg <- "+proj=tmerc +lat_0=0 +lon_0=0 +k=0.9999 +x_0=304800 +y_0=0 +datum=NAD83 +units=m +no_defs"
y <- x <- st_crs(epsg)
y$proj4string <- epsg # this is cheating, but it's for illustration; it happened in a "natural" way via st_read
x == y
# FALSE
I see sp::identicalCRS()
, sf
doesn't seem to have an equivalent, yet. Any thoughts?
Nowosad and kendonB
Metadata
Metadata
Assignees
Labels
No labels