new-generics             package:gpclib             R Documentation

_G_e_n_e_r_i_c_s/_M_e_t_h_o_d_s _f_o_r _p_o_l_y_g_o_n _o_b_j_e_c_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     Some generic functions and methods for polygon objects

_U_s_a_g_e:

     append.poly(x, y)
     area.poly(object, ...)
     get.pts(object)
     get.bbox(x)
     scale.poly(x, ...)

_A_r_g_u_m_e_n_t_s:

x,object: A polygon object

       y: A polygon object

     ...: Other arguments passed to methods

_D_e_t_a_i_l_s:

_M_e_t_h_o_d_s:

     _a_p_p_e_n_d._p_o_l_y 'signature(x = "gpc.poly", y = "gpc.poly")':  Combine
          all contours of two '"gpc.poly"' objects and return the
          combined polygon as a '"gpc.poly"' object.

     _a_r_e_a._p_o_l_y 'signature(object = "gpc.poly")':  Compute and return
          the sum of the areas of all contours in a '"gpc.poly"'
          object.

     _s_c_a_l_e._p_o_l_y 'signature(x = "gpc.poly")':  Scale (divide) the x and
          y coordinates of a '"gpc.poly"' object by the amount 'xscale'
          and 'yscale', respectively.  Return a scaled '"gpc.poly"'
          object.

     _g_e_t._p_t_s 'signature(object = "gpc.poly")':  Return the list of x
          and y coordinates of the vertices of a '"gpc.poly"' object.

     _g_e_t._b_b_o_x 'signature(x = "gpc.poly")':  Return the bounding box for
          a '"gpc.poly"' object.

_A_u_t_h_o_r(_s):

     Roger D. Peng; GPC Library by Alan Murta

_S_e_e _A_l_s_o:

     '"gpc.poly"' class documentation.

_E_x_a_m_p_l_e_s:

     holepoly <- read.polyfile(system.file("poly-ex/hole-poly.txt", package =
     "gpclib"), nohole = FALSE)
     area.poly(holepoly)
     stopifnot(area.poly(holepoly) == 8)

