SpatialIntersection¶
- globalmapper.SpatialIntersection(GM_LayerHandle_t32 aLayer1, GM_LayerHandle_t32 aLayer2, GM_SpatialOps_Params_t aParams) GM_Error_t32[source]¶
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.
- Parameters:
aLayer1 (GM_LayerHandle_t32) – First layer in operation
aLayer2 (GM_LayerHandle_t32) – Second layer in operation
aParams (GM_SpatialOps_Params_t) – Parameters
- Returns:
Error Code
- Return type:
GM_Error_t32
BEFORE |
AFTER |
|---|---|
|
|
Example¶
The following is an example of SpatialIntersection.
spatial_params = gm.GM_SpatialOps_Params_t()
spatial_params.mResultLayerName = "Intersection_Result"
err_SpatialIntersection = gm.SpatialIntersection(
layers_list[0], layers_list[1], spatial_params
)