omerc | 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 |
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/
crs
,
project
omerc(c(10,50), angle=c(0,45,80))
data('netherlands')
nldCities = terra::unwrap(nldCities)
nldTiles = terra::unwrap(nldTiles)
nldUtm = project(nldCities, omerc(nldCities, angle=0))
crs(nldUtm)
nldTiles2 = project(nldTiles, crs(nldUtm), method='near')
map.new(nldTiles2)
plot(nldTiles2, add=TRUE)
points(nldUtm)
text(nldUtm,labels=nldUtm$name, pos=4)
scaleBar(nldUtm, 'topright')
insetMap(nldUtm, 'bottomright', cropInset = 20*1000*c(2,2,1,3), zoom=7,
inset=c(0.01, 0.1), width=0.25)
insetMap(nldUtm, 'right', cropInset = 500*1000, zoom=4, width=0.25, inset = 0)
nldRot = project(nldCities, omerc(nldCities, angle=seq(25,45,by=5)))
crs(nldRot)
map.new(nldRot)
text(nldRot,labels=nldRot$name)
scaleBar(nldRot, 'topright')
insetMap(nldRot, 'bottomright')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.