aRTlayer-getSetOperation         package:aRT         R Documentation

_S_e_t _O_p_e_r_a_t_i_o_n_s

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

     Return the result of an operation involving sets (union,
     intersection, difference and xor). The result has "" as ID.

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

     ## S4 method for signature 'aRTlayer':
     getSetOperation(object, operation= c("union", "intersection", "difference", "xor"), ID = NULL, as.sp = TRUE)

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

  object: Object of class 'aRTlayer'.

operation: One of:

             *  union

             *  intersection

             *  difference

             *  xor (does not work yet)

      ID: The ids which to be used in the operation. 'difference' and
          'xor' use only two ids. 'union' and 'intersection' have as
          default all objects of the layer.

   as.sp: Return Spatial data or an object of class 'aRTgeometry'

_N_o_t_e:

     If one polygon has two consecultive and equal points, these
     algorithms may not work, therefore you need to remove this
     unwanted data before.

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

     Pedro Ribeiro de Andrade

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

     See 'aRTlayer-class' to the description of this class.

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

     ## Not run: 
     ## difference between two geometries
     getSetMetric(layer, "difference", ids=c("1", "2"))

     ## union of all geometries of the layer
     getSetMetric(layer, "union")
     ## End(Not run)

