Last data update: 2014.03.03

R: Oblique Mercator, Cylindrical, and Mollweide projections
omercR Documentation

Oblique Mercator, Cylindrical, and Mollweide projections

Description

Defines an appropriate Oblique Mercator, Oblique Cylindrical Equal Area, and Mollweide projections for a supplied Spatial object

Usage

	omerc(x, angle,  
	post=c('none', 'north', 'wide','tall'),
    preserve=NULL) 
    ocea(x, angle, flip=FALSE)
    moll(x=0, angle=NULL, flip=FALSE)

Arguments

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 SpatialPoints object, the resulting projection is scaled so as to preserve the distances between these points as best as possible.

Details

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

Value

An object of class CRS.

References

http://www.remotesensing.org/geotiff/proj_list/oblique_mercator.html, http://en.wikipedia.org/wiki/Space-oblique_Mercator_projection

See Also

CRS,spTransform

Examples


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=1))
)
projection(nldRot)

map.new(nldRot)
text(nldRot,labels=nldRot$name)
scaleBar(nldRot, 'topright')
insetMap(nldRot, 'bottomright',map=world)

if(require('rgeos', quietly=TRUE) & require('geosphere', quietly=TRUE)){
	nldMollCrs = moll(nldCities)
	nldMoll = spTransform(nldCities, nldMollCrs)
	map.new(nldMoll, buffer=2000)
	text(nldMoll,labels=nldMoll$name)
	scaleBar(nldMoll, 'topright')
	
	
}
}
## 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)

Results