globalmapper.SpatialConvexHull

globalmapper.SpatialConvexHull(GM_LayerHandle_t32 aLayer, GM_SpatialOps_Params_t aParams, GM_FeatureGrouping_t8 aGrouping, str aStr) GM_Error_t32[source]

The Convex Hull operation creates a new layer with a polygon that encloses a set of points, lines, and/or areas. The polygon will be the smallest possible convex polygon that contains the features in the input layer; the shape of a convex hull is analogous to wrapping the features with a rubber band.

The aGrouping parameter controls how many polygons are created: with GM_GroupingNone, a polygon is created for each individual feature; with GM_GroupingPartition, one polygon will be created for each attribute group; and with GM_GroupingAll, all the features on the layer will be enclosed by one polygon.

For an even tighter fit hull, see SpatialConcaveHull.

Parameters:
  • aLayer (GM_LayerHandle_t32) – Input layer

  • aParams (GM_SpatialOps_Params_t) – Parameters

  • aGrouping (GM_FeatureGrouping_t8) – Grouping type

  • aStr (str) – The attribute list string; may be an empty string

Returns:

Error Code

Return type:

GM_Error_t32