
mapPlot(longitude, latitude, longitudelim, latitudelim, grid=TRUE,
bg, fill=NULL, type='l', axes=TRUE, drawBox=TRUE,
polarCircle=0,
projection="mollweide", parameters=NULL, orientation=NULL,
debug=getOption("oceDebug"),
...)
data
that contains items named longitude
and
latitude
(e.g. of class coastline
; see
NULL
to avoid
filling. For some map projections (particularly if the view includes
the dateline), the filled region may not line up with coastlines,
making it sensible to setpar("plot")
.mapproject
.mapproject
.mapproject
.mapproject
,
along with the important choices of the arguments named projection
and parameters
. Since map projection is a large and subtle field,
this documentation is necessarily limited; those seeking to learn the
details should consult the exhaustive treatment provided by Snyder (1987),
which includes not just helpful illustrations but also an overview of the
long history of the topic, and the strengths and weaknesses of the various
formulations. See especially page 34, which provides recommendations.Jenny, B., 2012. Adaptive composite map projections. IEEE Transactions on Visualization and Computer Graphics (Proceedings Scientific Visualization / Information Visualization 2012), 18-22, p 2575-2582.
XKCD guide to map projections (
mapPoints
, lines may
be added with mapLines
, and text with mapText
.
Points on a map may be found with mapLocator
.library(oce)
data(coastlineWorld)
## Orthographic projections resemble a globe, making them
## attractive for non-technical use, but they are neither conformal
## nor equal-area, so they are somewhat limited for serious
## use on large scales. There is no distortion at the centre.
## See Snyder (1987 section 20).
mapPlot(coastlineWorld, latitudelim=c(0,120), longitudelim=c(-80,10),
projection="orthographic", orientation=c(45,-100,0))
## The Lambert conformal conic projection is an equal-area
## projection recommended by Snyder for regions of large
## east-west extent away from the equator, here illustrated
## for the USA and Canada. Readers should compare the results
## with those with a polygonic projection, which is also popular.
mapPlot(coastlineWorld, latitudelim=c(35,60), longitudelim=c(-130,-55),
proj="lambert", parameters=c(lat0=40,lat1=60), orientation=c(90,-100,0))
## Arctic view with a stereographic projection.
par(mar=rep(1, 4))
mapPlot(coastlineWorld, latitudelim=c(60,120), longitudelim=c(-130,-50),
proj="stereographic", orientation=c(90, -90, 0),
axes=FALSE, fill='lightgray')
Run the code above in your browser using DataLab