spatial.tools (version 1.6.0)

spatial_sync_vector: Matches a vector's projection to another vector or raster object's projection.

Description

Matches a vector's projection to another vector or raster object's projection.

Usage

spatial_sync_vector(unsynced, reference, verbose = TRUE)

Arguments

unsynced

The vector to be projected.

reference

A raster or vector object who's projection the unsynced will be matched to.

verbose

Logical. Verbose logging?

Examples

Run this code
# NOT RUN {
library("rgdal")
library("raster")
tahoe_highrez_training_points_utm <- readOGR(
	dsn=system.file("external", package="spatial.tools"),
	layer="tahoe_highrez_training_points_utm")
print(projection(tahoe_highrez_training_points_utm))
tahoe_lidar_bareearth <- 
	raster(system.file("external/tahoe_lidar_bareearth.tif", package="spatial.tools"))
print(projection(tahoe_lidar_bareearth))
tahoe_highrez_training_points_utm_synced <- 
	spatial_sync_vector(tahoe_highrez_training_points_utm,tahoe_lidar_bareearth)
print(projection(tahoe_highrez_training_points_utm_synced))
# }

Run the code above in your browser using DataCamp Workspace