srs_is_same {gdalraster} | R Documentation |
Do these two spatial references describe the same system?
Description
srs_is_same()
returns TRUE
if these two spatial references describe
the same system. This is a wrapper for OSRIsSame()
in the GDAL Spatial
Reference System C API.
Usage
srs_is_same(
srs1,
srs2,
criterion = "",
ignore_axis_mapping = FALSE,
ignore_coord_epoch = FALSE
)
Arguments
srs1 |
Character string. OGC WKT for a spatial reference system. |
srs2 |
Character string. OGC WKT for a spatial reference system. |
criterion |
Character string. One of |
ignore_axis_mapping |
Logical scalar. If |
ignore_coord_epoch |
Logical scalar. If |
Value
Logical. TRUE
if these two spatial references describe the same
system, otherwise FALSE
.
See Also
srs_is_geographic()
, srs_is_projected()
Examples
elev_file <- system.file("extdata/storml_elev.tif", package="gdalraster")
ds <- new(GDALRaster, elev_file, TRUE)
srs_is_same(ds$getProjectionRef(), epsg_to_wkt(26912))
srs_is_same(ds$getProjectionRef(), epsg_to_wkt(5070))
ds$close()