Provides access to members that find the 2D distance between two geometries.
Description
Proximity operators are used to find the distance between two geometries or the distance from a given point to the nearest point on another geometry.
Members
Name | Description | |
---|---|---|
QueryNearestPoint | Copies into 'nearest' a point on this geometry nearest to the input point. | |
ReturnDistance | Returns the minimum distance between two geometries. | |
ReturnNearestPoint | Creates and returns a point on this geometry nearest to the input point. |
IProximityOperator.QueryNearestPoint Method
Copies into 'nearest' a point on this geometry nearest to the input point.
Public Sub QueryNearestPoint ( _
ByVal p As IPoint, _
ByVal extension As esriSegmentExtension, _
ByVal nearest As IPoint _
)
public void QueryNearestPoint (
IPoint p,
esriSegmentExtension extension,
IPoint nearest
);
Description
Queries the nearest point on a geometry to the input point. Depending on the method of segment extension, the nearest point can also be found on an extension of the geometry.
Remarks
IProximityOperator.ReturnDistance Method
Returns the minimum distance between two geometries.
Public Function ReturnDistance ( _
ByVal other As IGeometry _
) As Double
public double ReturnDistance (
IGeometry other
);
Description
Returns the minimum distance between two geometries. If the geometries intersect, the minimum distance is 0. Only returns the distance, and not the nearest points.
Remarks
The geometry combinations which can be used with ReturnDistance are:
Point: Point, MultiPoint, Envelope, Polyline, Polygon, Line, CircularArc, EllipticArc, BezierCurve.Multipoint: Point, MultiPoint, Envelope, Polyline, Polygon.Envelope: Point, MultiPoint, Envelope, Line, CircularArc, EllipticArc, BezierCurve, PolyLine, Polygon.PolyLine: Point, Multipoint, Envelope, PolyLine, Polygon.Polygon: Point, Multipoint, Envelope, PolyLine, Polygon.Line: Point, Envelope, Line, CircularArc, EllipticArc, BezierCurve.CircularArc: Point, Envelope, Line, CircularArc, EllipticArc (not implemented yet), BezierCurve.EllipticArc: Point, Envelope, Line, CircularArc (not implemented yet), EllipticArc (not implemented yet), BezierCurve (not implemented yet).BezierCurve: Point, Envelope, Line, CircularArc, EllipticArc (not implemented yet), BezierCurve.
Note: To get the distance between a segment (Line, CircularArc, EllipticArc, BezierCurve) and a MultiPoint, PolyLine or Polygon, add that segment to a PolyLine.
IProximityOperator.ReturnNearestPoint Method
Creates and returns a point on this geometry nearest to the input point.
Public Function ReturnNearestPoint ( _
ByVal p As IPoint, _
ByVal extension As esriSegmentExtension _
) As IPoint
public IPoint ReturnNearestPoint (
IPoint p,
esriSegmentExtension extension
);
Description
Finds and returns the nearest point on a geometry to the input point. Depending on the method of segment extension, the nearest point can also be found on an extension of the geometry.
Remarks
Classes that implement IProximityOperator
Classes | Description |
---|---|
BezierCurve | A cubic Bezier curve defined between two points; optionally has measure, height and ID attributes at each endpoint. |
CircularArc | A portion of a circle that connects two points optionally has measure, height and ID attributes at each endpoint. |
EllipticArc | A portion of the boundary of a 2D ellipse that connects two points; optionally has measure, height and ID attributes at each endpoint. |
Envelope | A rectangle with sides parallel to a coordinate system defining the extent of another geometry; optionally has min and max measure, height and ID attributes. |
Line | A 2D straight line between a pair of 2D endpoints; can optionally have height, measure and ID attributes at each endpoint. |
MultiPatch | A collection of surface patches. |
Multipoint | An ordered collection of points; optionally has measure, height and ID attributes. |
Point | A two dimensional point, optionally with measure, height, and ID attributes. |
Polygon | A collection of rings ordered by their containment relationship; optionally has measure, height and ID attributes. |
Polyline | An ordered collection of paths; optionally has measure, height and ID attributes. |