suppressPackageStartupMessages(library(rgdal))
getPROJ4VersionInfo()
getGDALVersionInfo()
d <- system.file("vectors", package="rgdal")
#shps <- ogrListLayers(d)
(o <- OGRSpatialRef(d, "trin_inca_pl03"))
if (new_proj_and_gdal()) comment(o)
(o <- OGRSpatialRef(d, "kiritimati_primary_roads"))
if (new_proj_and_gdal()) comment(o)
(o <- OGRSpatialRef(d, "cities"))
if (new_proj_and_gdal()) comment(o)
(o <- OGRSpatialRef(d, "scot_BNG"))
if (new_proj_and_gdal()) comment(o)
(o <- OGRSpatialRef(file.path(d, "airports.gml"), "airports"))
if (new_proj_and_gdal()) comment(o)
(o <- OGRSpatialRef(file.path(d, "ps_cant_31.MIF"), "ps_cant_31"))
if (new_proj_and_gdal()) comment(o)
(o <- OGRSpatialRef(file.path(d, "Up.tab"), "Up"))
if (new_proj_and_gdal()) comment(o)
(o <- OGRSpatialRef(file.path(d, "test_trk2.gpx"), "tracks"))
if (new_proj_and_gdal()) comment(o)
(o <- OGRSpatialRef(file.path(d, "PacoursIKA2.TAB"), "PacoursIKA2"))
if (new_proj_and_gdal()) comment(o)
d <- system.file("pictures", package="rgdal")
#f <- c("SP27GTIF.TIF", "cea.tif", "erdas_spnad83.tif", "scaleoffset.vrt",
# "test_envi_class.envi")
ds <- GDAL.open(file.path(d, "SP27GTIF.TIF"))
(o <- getProjectionRef(ds, OVERRIDE_PROJ_DATUM_WITH_TOWGS84=TRUE))
if (new_proj_and_gdal()) comment(o)
(o <- getProjectionRef(ds, OVERRIDE_PROJ_DATUM_WITH_TOWGS84=FALSE))
if (new_proj_and_gdal()) comment(o)
GDAL.close(ds)
ds <- GDAL.open(file.path(d, "cea.tif"))
(o <- getProjectionRef(ds, OVERRIDE_PROJ_DATUM_WITH_TOWGS84=TRUE))
if (new_proj_and_gdal()) comment(o)
(o <- getProjectionRef(ds, OVERRIDE_PROJ_DATUM_WITH_TOWGS84=FALSE))
if (new_proj_and_gdal()) comment(o)
GDAL.close(ds)
ds <- GDAL.open(file.path(d, "erdas_spnad83.tif"))
(o <- getProjectionRef(ds, OVERRIDE_PROJ_DATUM_WITH_TOWGS84=TRUE))
if (new_proj_and_gdal()) comment(o)
(o <- getProjectionRef(ds, OVERRIDE_PROJ_DATUM_WITH_TOWGS84=FALSE))
if (new_proj_and_gdal()) comment(o)
GDAL.close(ds)
ds <- GDAL.open(file.path(d, "scaleoffset.vrt"))
(o <- getProjectionRef(ds, OVERRIDE_PROJ_DATUM_WITH_TOWGS84=TRUE))
if (new_proj_and_gdal()) comment(o)
(o <- getProjectionRef(ds, OVERRIDE_PROJ_DATUM_WITH_TOWGS84=FALSE))
if (new_proj_and_gdal()) comment(o)
GDAL.close(ds)
ds <- GDAL.open(file.path(d, "test_envi_class.envi"))
(o <- getProjectionRef(ds, OVERRIDE_PROJ_DATUM_WITH_TOWGS84=TRUE))
if (new_proj_and_gdal()) comment(o)
(o <- getProjectionRef(ds, OVERRIDE_PROJ_DATUM_WITH_TOWGS84=FALSE))
if (new_proj_and_gdal()) comment(o)
GDAL.close(ds)

