# Types for Spatial Operations¶

The following types are used for spatial operation functions within GlobalMapper. These types use fixed, numeric constants, which are defined here.

- globalmapper.GM_PredicateResultTargets_t8¶
Result targets for predicate results

- Values
**GM_PredicateResult_CreateNewSelection**= 0Create new selection from matched features

**GM_PredicateResult_AddToSelection**= 1Add matched features to current selection

**GM_PredicateResult_RemoveFromSelection**= 2Remove matched features from current selection

**GM_PredicateResult_CreateNewLayer**= 3Clone matched features into a new layer

**GM_PredicateResult_ReturnFeatures**= 4Return matched via GM_FoundFeatureResults_t*

- globalmapper.GM_SpatialOperations_t8¶
Spatial operation types

- Values
**GM_SpatialOps_Intersection**= 0Returns the spatial intersection of two layers

**GM_SpatialOps_Union**= 1Returns the the spatial union of two layers, or among features of a single layer

**GM_SpatialOps_Difference**= 2Returns the the spatial difference between two layers

**GM_SpatialOps_SymmetricDifference**= 3Returns the the spatial symmetric difference between two layers

- globalmapper.GM_SpatialOps_Errorhandling_t8¶
Flags specifying how to handle invalid input geometries

- Values
**GM_SpatialOps_OnErrorHalt**= 0Halt further processing

**GM_SpatialOps_OnErrorSkip**= 1Skip invalid geometries

**GM_SpatialOps_OnErrorIgnore**= 2Use invalid geometries anyway

- globalmapper.GM_SpatialPredicates_t16¶
Spatial predicate types

- Values
**GM_SpatialPredicates_Intersects**= 1Calculates the set of features that intersect features in another layer

**GM_SpatialPredicates_Overlaps**= 2Calculates the set of features that overlap features in another layer

**GM_SpatialPredicates_Touches**= 4Calculates the set of features that touch features in another layer

**GM_SpatialPredicates_Contains**= 8Calculates the set of features that wholly contain features in another layer

**GM_SpatialPredicates_IsEqual**= 16Calculates the set of features that have have an exact match with the geometry of a feature in another layer

**GM_SpatialPredicates_IsWithin**= 32Calculates the set of features that are wholly contained by a feature in another layer

**GM_SpatialPredicates_IsDisjoint**= 64Calculates the set of features that do not intersect features in another layer

- globalmapper.GM_SpatialThinAlg_t8¶
Spatial thinning algorithm - Specify which point to select from each bin grid when thinning

- Values
**GM_ThinAlg_Min**= 0Use point with minimum elevation in bin

**GM_ThinAlg_Max**= 1Use point with maximum elevation in bin

**GM_ThinAlg_Med**= 2Use point with median elevation in bin

**GM_ThinAlg_3D**= 3Keep median point in each 3D cube of bin size

**GM_ThinAlg_KeepNth**= 4Keep every Nth point (i.e. every 4th return)

**GM_ThinAlg_SkipNth**= 5Skip every Nth point (i.e. skip every 4th return - thin by 25%)

**GM_ThinAlg_NumTypes**= 6