\HeaderA{project}{Projection of coordinate matrices}{project}
\keyword{spatial}{project}
\begin{Description}\relax
Interface to the PROJ.4 library of projection functions for geographical position data, no datum transformation possible. Use \code{transform()} for extended support.
\end{Description}
\begin{Usage}
\begin{verbatim}
project(xy, proj, inv = FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{xy}] 2-column matrix of coordinates 
\item[\code{proj}] character string of projection arguments; the arguments must be entered exactly as in the PROJ.4 documentation, in particular there cannot be any white space in +<arg>=<value> strings, and successive such strings can only be separated by blanks. 
\item[\code{inv}] default FALSE, if TRUE inverse projection to geographical coordinates 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
Full details of projection arguments available from website below, and examples in file "epsg" in the data directory installed with PROJ.4.
\end{Details}
\begin{Value}
A two column matrix with projected coordinates.
\end{Value}
\begin{Note}\relax
The locations of Hawaii and Alaska in the data source are (putting it mildly) arbitrary, please avoid airlines using these positions.
\end{Note}
\begin{Author}\relax
Barry Rowlingson, Roger Bivand \email{Roger.Bivand@nhh.no}
\end{Author}
\begin{References}\relax
\url{http://www.remotesensing.org/proj/}
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{CRS-class}{CRS.Rdash.class}}, \code{\LinkA{spTransform-methods}{spTransform.Rdash.methods}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
data(state)
res <- project(cbind(state.center$x, state.center$y), "+proj=lcc +lat_1=48 +lat_2=33 +lon_0=-100")
res1 <- project(res, "+proj=lcc +lat_1=48 +lat_2=33 +lon_0=-100", inv=TRUE)
summary(res1 - cbind(state.center$x, state.center$y))
plot(cbind(state.center$x, state.center$y), asp=1, type="n")
text(cbind(state.center$x, state.center$y), state.abb)
plot(res, asp=1, type="n")
text(res, state.abb)
\end{ExampleCode}
\end{Examples}

