IMcPointsFeatureFromPoint Method
|
|
Finds the index of the feature under a given point
Namespace:
MediaCy.IQL.Features
Assembly:
MediaCy.IQL.Features (in MediaCy.IQL.Features.dll) Version: 10.0.6912.0
SyntaxFunction FeatureFromPoint (
x As Single,
y As Single
) As Integer
Parameters
- x
- Type: SystemSingle
Text X pixel coordinate - y
- Type: SystemSingle
Text Y pixel coordinate
Return Value
Type:
Int32The index of the feature under the given point, or -1 if there
is no such feature.
Implements
IMcFeaturesFeatureFromPoint(Single, Single)
RemarksThe index of the feature under the given test point is returned. If no
feature is under the given point, then -1 is returned. The PointClosestToPoint
method is a more general form of this test that can identify near misses as well
as direct hits on all or a selected subset of features.
For McRegions the feature is found if the test point is on or interior to the
boundary. For McRegions of Type other than mcftScanList, the computation assumes
that the boundary was given as a non-self intersecting polygon. If multiple
features enclose the test point (i.e., they are partially or completely
nested), then the one with the lowest feature index will be returned.
For McRegions of Type mcftScanList the test point is converted to the nearest
whole pixel coordinate and the feature is considered found if that pixel is
foreground in the scan list.
For McLines, the first feature, if any, where the test point falls exactly on a
feature line segment or vertex will be returned. For McPoints, the first point,
if any, that is exactly equal to the test point is returned.
See Also