set_projection
sets the projection of a shape file. It is
a convenient wrapper of spTransform
and
projectRaster
with shortcuts for commonly
used projections. The projection can also be set directly in the plot call
with tm_shape
. This function is also used to set the current
projection information if this is missing. The function get_projection
is used to get the projection information.
set_projection(shp, projection = NULL, current.projection = NULL, overwrite.current.projection = FALSE)
get_projection(shp)
PROJ.4
character string or a shortcut. See get_proj4
for a list of shortcut values. This argument is
only used to transform the shp
. Use current.projection
to
specify the current projection of shp
.shp
. Only use this
if the current projection is missing or wrong.set_projection
returns a (transformed) shape object with
updated projection information. get_projection
returns the
PROJ.4
character string of shp
.
projectRaster
for details.