SpatialUnionSingle

globalmapper.SpatialUnionSingle(GM_LayerHandle_t32 aLayer1, GM_SpatialOps_Params_t aParams) GM_Error_t32[source]

The Single Union operation creates a new layer containing features that represent both overlapping and non-overlapping regions from the input layer. For each region created by overlapping features, identical features are created for each feature that participated in the overlap. Attributes for features in the new layer are copied from their original feature.

Parameters:

aLayer (GM_LayerHandle_t32) – Layer in operation :param GM_SpatialOps_Params_t aParams: Parameters :returns: Error Code :rtype: GM_Error_t32


Note

If you perform a spatial union operation on a single layer with overlapping features, the overlapping area will result in two new features stacked directly on top of each other.

BEFORE

AFTER

../_images/UnionSingleBefore.png ../_images/UnionSingleAfter.png

Example

The following is an example of SpatialUnionSingle.

spatial_params = gm.GM_SpatialOps_Params_t()
spatial_params.mResultLayerName = "UnionSingle_Result"
err_SpatialUnionSingle = gm.SpatialUnionSingle(
    layers_list[0], spatial_params
)