# NOT RUN {
# }
# NOT RUN {
if(requireNamespace("curl") &
curl::has_internet()) {
# required packages
library(sp)
library(raster)
library(rgdal)
# specify a soil series name
s <- 'magnor'
# return as SpatialPolygonsDataFrame
x <- seriesExtent(s, type = 'vector')
# return as raster
y <- seriesExtent(s, type = 'raster')
# note that CRS are different
proj4string(x)
projection(y)
# transform vector representation to CRS of raster
x <- spTransform(x, CRS(projection(y)))
# graphical comparison
par(mar = c(1, 1 , 1, 3))
plot(y, axes = FALSE)
plot(x, add = TRUE)
}
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab