returns the index of the shape containing Point pt

Namespace:  EGIS.ShapeFileLib
Assembly:  EGIS.ShapeFileLib (in EGIS.ShapeFileLib.dll)

Syntax

Visual Basic
Public Function GetShapeIndexContainingPoint ( _
	pt As PointD, _
	minDistance As Double, _
	sourceCRS As ICRS _
) As Integer
C#
public int GetShapeIndexContainingPoint(
	PointD pt,
	double minDistance,
	ICRS sourceCRS
)
Visual C++
public:
int GetShapeIndexContainingPoint(
	PointD pt, 
	double minDistance, 
	ICRS^ sourceCRS
)
JavaScript
function getShapeIndexContainingPoint(pt, minDistance, sourceCRS);

Parameters

pt
Type: EGIS.ShapeFileLib..::..PointD
The location of the point. (in sourceCRS coordinate units or in the shapefile's coordinate units if sourceCRS is null)
minDistance
Type: System..::..Double
the min distance (in sourceCRS coordinate units or in the shapefile's coordinate units if sourceCRS is null) between pt and a shape when searching point or line shapes that will return a "hit".
sourceCRS
Type: EGIS.Projections..::..ICRS
The source CRS that pt and minDistance is defined in. If this parameter is null then the shapefile's coordinate units will be used, which was the default behaviour prior to version 4.6.x. To support backwards compatibility the default value of sourceCRS is set to null

Return Value

zero based index of the shape containing pt or -1 if no shape contains the point

Remarks

When searching in a Point ShapeFile a point will be defined as contining pt if the distance between the found point and pt is less than or equal to minDistance

When searching in a PolyLine ShapeFile a Line will be defined as containing the point if the distance between a line segment in the found shape and pt is less than or equal to minDistance

See Also