DMS-class                 package:sp                 R Documentation

_C_l_a_s_s "_D_M_S" _f_o_r _d_e_g_r_e_e, _m_i_n_u_t_e, _d_e_c_i_m_a_l _s_e_c_o_n_d _v_a_l_u_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     The class provides a container for coordinates stored as degree,
     minute, decimal second values.

_O_b_j_e_c_t_s _f_r_o_m _t_h_e _C_l_a_s_s:

     Objects can be created by calls of the form 'new("DMS", ...)',
     converted from decimal degrees using 'dd2dms()', or converted from
     character strings using 'char2dms()'.

_S_l_o_t_s:

     '_W_S': Object of class '"logical"' TRUE if input value negative

     '_d_e_g': Object of class '"numeric"' degrees

     '_m_i_n': Object of class '"numeric"' minutes

     '_s_e_c': Object of class '"numeric"' decimal seconds

_M_e_t_h_o_d_s:

     _c_o_e_r_c_e 'signature(from = "DMS", to = "numeric")': convert to
          decimal degrees 

     _s_h_o_w 'signature(object = "DMS")': print data values 

_A_u_t_h_o_r(_s):

     Roger Bivand Roger.Bivand@nhh.no

_S_e_e _A_l_s_o:

     'char2dms', 'dd2dms'

_E_x_a_m_p_l_e_s:

     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

