Last chance! 50% off unlimited learning
Sale ends in
set or replace retrieve coordinate reference system from object
st_crs(x, ...)
"st_crs"(x, ...)
"st_crs"(x, ...)
st_crs(x) <- value
"st_crs"(x) <- value
"st_crs"(x) <- value
+init=epsg:...
or set to 4326 in case the proj4string contains +proj=longlat
and +datum=WGS84, literallyIf both epsg and proj4string are provided, they are assumed to be consistent. In processing them, the epsg code, if not missing valued, is used and the proj4string is derived from it by a call to GDAL (which in turn will call PROJ.4). Warnings are raised when epsg is not consistent with a proj4string that is already present.
sfc = st_sfc(st_point(c(0,0)), st_point(c(1,1)))
sf = st_sf(a = 1:2, geom = sfc)
st_crs(sf) = 4326
st_geometry(sf)
sfc = st_sfc(st_point(c(0,0)), st_point(c(1,1)))
st_crs(sfc) = 4326
sfc
Run the code above in your browser using DataLab