elide-methods.Rd
Methods for function elide
to translate and disguise coordinate placing in the real world.
elide(obj, ...) <!-- % (obj, bb=NULL, shift=c(0, 0), reflect=c(FALSE, FALSE), scale=NULL, flip=FALSE) -->
obj | object to be elided |
---|---|
... | other arguments:
|
elides object
elides object
elides object
elides object
elides object
elides object
The methods return objects of the input class object with elided coordinates; the coordinate reference system is not set. Note that if the input coordinates or centroids are in the data slot data.frame of the input object, they should be removed before the use of these methods, otherwise they will betray the input positions.
Rotation code kindly contributed by Don MacQueen
#> Warning: Discarded datum Amersfoort in Proj4 definitiondata(meuse.riv) river_polygon <- Polygons(list(Polygon(meuse.riv)), ID="meuse") rivers <- SpatialPolygons(list(river_polygon)) proj4string(rivers) <- CRS("+init=epsg:28992") rivers1 <- elide(rivers, reflect=c(TRUE, TRUE), scale=TRUE) meuse1 <- elide(meuse, bb=bbox(rivers), reflect=c(TRUE, TRUE), scale=TRUE) opar <- par(mfrow=c(1,2)) plot(rivers, axes=TRUE) plot(meuse, add=TRUE) plot(rivers1, axes=TRUE)#> min max #> x 178605 181390 #> y 329714 333611bbox(meuse1)#> min max #> x 188605 191390 #> y 319714 323611#> min max #> x 178304.0 182331.5 #> y 325698.5 337684.8bbox(rivers1)#> min max #> x 188304.0 192331.5 #> y 315698.5 327684.8#> min max #> x 178605 181390 #> y 329714 333611bbox(meuse1)#> min max #> x 179419.8 181278.9 #> y 329462.8 333890.2