-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathmapLongitudeLatitudeXY.Rd
68 lines (65 loc) · 1.95 KB
/
mapLongitudeLatitudeXY.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/map.R
\name{mapLongitudeLatitudeXY}
\alias{mapLongitudeLatitudeXY}
\title{Convert From Longitude and Latitude to X and Y}
\usage{
mapLongitudeLatitudeXY(longitude, latitude)
}
\arguments{
\item{longitude}{numeric vector of the longitudes of points, or an
object from which both latitude and longitude can be inferred (e.g.
a coastline file, or the return value from \code{\link[=mapLocator]{mapLocator()}}), in
which case the following two arguments are ignored.}
\item{latitude}{numeric vector of latitudes of points, needed only
if they cannot be inferred from the first argument.}
}
\value{
A list containing \code{x} and \code{y}.
}
\description{
Find (x, y) values corresponding to (longitude, latitude) values, using the
present projection. This is mainly a wrapper around \code{\link[=lonlat2map]{lonlat2map()}}.
}
\examples{
\donttest{
library(oce)
data(coastlineWorld)
par(mfrow = c(2, 1), mar = rep(2, 4))
mapPlot(coastlineWorld, projection = "+proj=moll") # sets a projection
xy <- mapLongitudeLatitudeXY(coastlineWorld)
plot(xy, type = "l", asp = 1)
}
}
\seealso{
A map must first have been created with \code{\link[=mapPlot]{mapPlot()}}.
Other functions related to maps:
\code{\link{formatPosition}()},
\code{\link{lonlat2map}()},
\code{\link{lonlat2utm}()},
\code{\link{map2lonlat}()},
\code{\link{mapArrows}()},
\code{\link{mapAxis}()},
\code{\link{mapContour}()},
\code{\link{mapCoordinateSystem}()},
\code{\link{mapDirectionField}()},
\code{\link{mapGrid}()},
\code{\link{mapImage}()},
\code{\link{mapLines}()},
\code{\link{mapLocator}()},
\code{\link{mapPlot}()},
\code{\link{mapPoints}()},
\code{\link{mapPolygon}()},
\code{\link{mapScalebar}()},
\code{\link{mapText}()},
\code{\link{mapTissot}()},
\code{\link{oceCRS}()},
\code{\link{oceProject}()},
\code{\link{shiftLongitude}()},
\code{\link{usrLonLat}()},
\code{\link{utm2lonlat}()}
}
\author{
Dan Kelley
}
\concept{functions related to maps}