IMcRegions2SplitRegion Method
|
|
Split one or more regions, either automatically or with a splitting line.
Namespace:
MediaCy.IQL.Features
Assembly:
MediaCy.IQL.Features (in MediaCy.IQL.Features.dll) Version: 10.0.6912.0
SyntaxFunction SplitRegion (
<OptionalAttribute> SplittingLines As Object,
<OptionalAttribute> SplitFeaturesSelector As Object,
<OptionalAttribute> SplittingOptions As Object
) As Integer
Parameters
- SplittingLines (Optional)
- Type: SystemObject
If given, a McLines or McBitMask object holding the line
feature(s) to be used to split selected region features. If missing, then
the selected region features are automatically split. - SplitFeaturesSelector (Optional)
- Type: SystemObject
An empty variant, a single negative value,
a single index value, or an array of zero or more index values
(negative index values are legal but will be ignored).
If the Selector argument is a non-negative scalar value, then
the indicated feature from the collection is the only one split.
If the Selector argument is missing or any negative value,
then all features are considered for splitting.
If Selector is an array, then zero or positive values are
treated as indices into the features collection, negative values
are legal but ignored. In this case, only the selected features
are considered for splitting.
If the argument is a McFeatures (i.e., McPoints, McLines or McRegions) or
a McBitMask, then features that intersersect the selector's bit mask are
selected as if an array of index values were supplied. If the OptionFlags
mcofFullCoverageIntersectionTest bit is set, then the test is more stringent
and a feature must be fully covered by the selector's bit mask in order to
be included in the selection. - SplittingOptions (Optional)
- Type: SystemObject
If given, optional control parameters for the split. None are
currently supported. These are always given as an array of Variant of length
nOptions+1. The first element is one or an array of nOptions mcRegionSplittingOptions
values. For each of these values, there must be a matching Variant holding the value
or values relating to the corresponding option in the first array element.
Return Value
Type:
Int32If the mcofKeepRegionsAsUnion bit is clear in the OptionFlags property,
the number of region features affected is returned. If the
mcofKeepRegionsAsUnion bit is clear, then 1 is returned if any splitting occurs
and zero otherwise. In either case, if any splitting occurs, the Count property
will reflect the new number of region features.
RemarksThe split is done on a bitmap of the selected region features, so if a
split occurs, the resolution of the resulting region features and their
boundaries will lose any sub-pixel coordinate information.
The behavior is somewhat different depending on whether the
mcofKeepRegionsAsUnion bit is set in the OptionFlags property. If this bit is
set, then after the split Identifiers are lost and all features are re-indexed;
holes will be preserved. If the mcofKeepRegionsAsUnion bit is clear, then the
Identifier of all existing features that are not removed by the split will be
preserved, but any hole information for the entire McRegions is lost.
Note that a "split" operation with a given SplittingLine might not actually break
apart any given region feature and could even remove some. Any small region
feature that is completely covered by the splitting line will be removed, and any
feature that is just grazed or only partially bisected by the splitting line will
be reduced in size but not split.
See Also