SpatialCircle¶
- globalmapper.SpatialCircle(GM_LayerHandle_t32 aLayer, GM_SpatialOps_Params_t aParams, GM_Distance_t aDistance, GM_FeatureGrouping_t8 aGrouping, str aStr) GM_Error_t32 [source]¶
The Circle spatial transform creates a new layer with a circle around the center point of each feature or collection of features. The aDistance parameter is the radius in the given units. If aDistance is 0, then it creates a minimum enclosing circle for the entire feature.
- Parameters:
aLayer (GM_LayerHandle_t32) – Input layer
aParams (GM_SpatialOps_Params_t) – Parameters
aDistance (GM_Distance_t) – Circle radius
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
BEFORE |
AFTER |
---|---|
![]() |
![]() |
Example¶
The following is an example of SpatialCircle.
spatial_params = gm.GM_SpatialOps_Params_t()
spatial_params.mResultLayerName = "Circle_Result"
dist = gm.GM_Distance_t()
dist.mDistance = 0.0
dist.mUnits = gm.GM_DistUnit_Kilometers
err_SpatialCircle = gm.SpatialCircle(
layers_list[0], spatial_params, dist, gm.GM_GroupingNone, ""
)