omerc {mapmisc} | R Documentation |
Defines an appropriate Oblique Mercator, Oblique Cylindrical Equal Area, and Mollweide projections for a supplied Spatial object
omerc(x, angle, post=c('none', 'north', 'wide','tall'), preserve=NULL) ocea(x, angle, flip=FALSE) moll(x=0, angle=NULL, flip=FALSE)
x |
A SpatialP* object or a vector of length 2 giving the centroid of the projection. |
angle |
angle of rotation or vector of angles |
post |
post-projection angle rotation |
flip |
post-projection flipping of coordinates |
preserve |
A |
With omerc
, an Oblique Mercator map projection is produced which warps the world onto a cylinder, with the north-south axis
rotated by the specified angle. If angle
is a vector, the optimal
angle for reducing the size
of the bounding box is returned.
If post = 'north'
, an inverse rotation will preserve the north direction at the origin.
If post = 'wide'
, an inverse rotation
makes the smallest possible bounding box which is wider than tall.
If post = 'tall'
, the bounding box is taller than it is wide
If post
is numeric, it specifies an angle for inverse rotation.
ocea
produces an Oblique Cylindrical Equal Area projection and moll
a Mollweide projections
An object of class CRS
.
https://en.wikipedia.org/wiki/Space-oblique_Mercator_projection/
omerc(c(10,50), angle=c(0,45,80)) data('netherlands') if(require('rgdal', quietly=TRUE)){ nldUtm = spTransform(nldCities, omerc(nldCities, angle=0)) projection(nldUtm) map.new(nldUtm) text(nldUtm,labels=nldUtm$name) scaleBar(nldUtm, 'topright') nldRot = spTransform(nldCities, omerc(nldCities, angle=seq(25,45,by=5)) ) projection(nldRot) map.new(nldRot) text(nldRot,labels=nldRot$name) scaleBar(nldRot, 'topright') insetMap(nldRot, 'bottomright',map=world) } ## Not run: nldOceaCrs = ocea(nldCities) nldOcea = spTransform(nldCities, nldOceaCrs) map.new(nldOcea, buffer=2000) text(nldOcea,labels=nldOcea$name) scaleBar(nldOcea, 'topright') map.new(nldCities) plot(nldTiles,add=TRUE) text(nldCities,labels=nldCities$name) tilesRot = openmap(nldRot) map.new(nldRot) plot(tilesRot,add=TRUE) text(nldRot,labels=nldRot$name) tilesUtm = openmap(nldUtm) map.new(nldUtm) plot(tilesUtm,add=TRUE) text(nldUtm,labels=nldUtm$name) ## End(Not run)