Description
Identifies the relative postion of features.
-
Return Type
-
A Variant value.
Either a single feature index value or an array of feature index values, giving the ordered position of the selected features.
-
Syntax
-
object.GetOrderedPosition ([Ordering], [Selector])
The GetOrderedPosition Method syntax has these parts: |
| object | An expression evaluating to an object of type McRegions. | | Ordering | Optional. A mcPositionOrdering enumeration, as described in settings. What feature bounds should be used to determine the postion order: the left,top (mcpoByLeftTopBound) or the center (mcpoByBoundsMidPoint) of the bounding rectangle. If not given, mcpoByBoundsMidPoint is the default.
| | Selector | Optional. A Variant value. array. Index values greater or equal to the Count property are illegal.
| Settings The settings for Ordering are:
 | mcpoNone | 0 |
No ordering
|
 | mcpoByLeftTopBound | 1 |
Ordered from top to bottom, then left to right based on the Left,Top point of the feature bounding rectangle. This ordering is can be useful for algorithms related to region nesting, because a region will never be nested within one further down this position ordering.
|
 | mcpoByBoundsMidPoint | 2 |
Ordered from top to bottom, then left to right based on the mid-point of the feature bounding rectangle. This is the default Ordering argument value.
|
Remarks
This method returns an index or selector (an array of such indices) giving the ordered postion on all (the default) or selected features based on the feature bounding rectangle (see GetFeatureBoundingBox). The ordering is always from top to bottom, and then left to right. It may be based on either the Left, Top point of the bounding rectangle, or on the mid-point of the bounding rectangle (this is the default ordering).
Many other feature orderings may be of interest to you. For example, you might wish to sort McRegions features by size or by McLines by the position of the end of each line feature. These orderings can usually be accomplished easily by passing a measurement value (or a value computed from measurements) to the McOMGlobal.McSort method, which will return a sorted selector. The Samples illustrate several of these orderings.
|