File: DMS-class.Rd

package info (click to toggle)
r-cran-sp 1:0.9-66-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,696 kB
  • ctags: 123
  • sloc: ansic: 1,475; sh: 6; makefile: 5
file content (45 lines) | stat: -rw-r--r-- 1,535 bytes parent folder | download | duplicates (6)
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
\name{DMS-class}
\docType{class}
\alias{DMS-class}
\alias{print.DMS}
\alias{show,DMS-method}
\alias{coerce,DMS-method}
\alias{as.double.DMS}
\alias{as.numeric.DMS}
\title{Class "DMS" for degree, minute, decimal second values}
\description{The class provides a container for coordinates stored as degree, minute, decimal second values.}
\section{Objects from the Class}{
Objects can be created by calls of the form \code{new("DMS", ...)}, converted from decimal degrees using \code{dd2dms()}, or converted from character strings using \code{char2dms()}. 
}
\section{Slots}{
  \describe{
    \item{\code{WS}:}{Object of class \code{"logical"} TRUE if input value negative}
    \item{\code{deg}:}{Object of class \code{"numeric"} degrees}
    \item{\code{min}:}{Object of class \code{"numeric"} minutes}
    \item{\code{sec}:}{Object of class \code{"numeric"} decimal seconds}
    \item{\code{NS}:}{Object of class \code{"logical"} TRUE if input value is a Northing}
  }
}

\section{Methods}{
  \describe{
    \item{coerce}{\code{signature(from = "DMS", to = "numeric")}: convert to decimal degrees }
    \item{show}{\code{signature(object = "DMS")}: print data values }
  }
}
\author{Roger Bivand \email{Roger.Bivand@nhh.no} }

\seealso{\code{\link{char2dms}}, \code{\link{dd2dms}}}


\examples{
data(state)
dd2dms(state.center$x)
dd2dms(state.center$y, NS=TRUE)
as.numeric(dd2dms(state.center$y))
as(dd2dms(state.center$y, NS=TRUE), "numeric")
as.numeric.DMS(dd2dms(state.center$y))
state.center$y
}
\keyword{classes}
\keyword{spatial}