SpatialIntersection =================== .. currentmodule:: globalmapper .. py:function:: SpatialIntersection (GM_LayerHandle_t32 aLayer1, GM_LayerHandle_t32 aLayer2, GM_SpatialOps_Params_t aParams) -> GM_Error_t32 The **Intersection** operation creates a new layer consisting of just the overlapping regions (parts of the original features) in the two input layers, layer 1 and layer 2. New features receive attributes from both layers. :param GM_LayerHandle_t32 aLayer1: First layer in operation :param GM_LayerHandle_t32 aLayer2: Second layer in operation :param GM_SpatialOps_Params_t aParams: Parameters :returns: Error Code :rtype: GM_Error_t32 | .. list-table:: :width: 100% :class: borderless :header-rows: 1 * - BEFORE - AFTER * - .. image:: ../images/SpatialAnalysis_Images/Red_Blue_Circles.png :width: 230px :height: 150px :align: center - .. image:: ../images/SpatialAnalysis_Images/IntersectionAfter.png :width: 207px :height: 150px :align: center | Example ------- The following is an example of SpatialIntersection. .. literalinclude:: ../../sample_tests/sample_code/SpatialIntersection_sample.py :language: python