Method GetDistanceAtPoint
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
GetDistanceAtPoint(GeoLine3, GeoPoint3)
Gets the arc length from the start of a line segment to the point on it closest to the supplied point.
public static double GetDistanceAtPoint(GeoLine3 line, GeoPoint3 point)
Parameters
Returns
GetDistanceAtPoint(GeoRay3, GeoPoint3)
Gets the arc length from the origin of a ray to the point on its carrier line closest to the supplied point. The result is negative when that point falls behind the origin.
public static double GetDistanceAtPoint(GeoRay3 ray, GeoPoint3 point)
Parameters
Returns
GetDistanceAtPoint(GeoPolyline3, GeoPoint3)
Gets the arc length from the start of a polyline to the point on it closest to the supplied point.
public static double GetDistanceAtPoint(GeoPolyline3 polyline, GeoPoint3 point)
Parameters
polylineGeoPolyline3pointGeoPoint3
Returns
GetDistanceAtPoint(GeoPolyline3, GeoPoint3, Tolerance)
Gets the arc length from the start of a polyline to the point on it closest to the supplied point, within a tolerance.
public static double GetDistanceAtPoint(GeoPolyline3 polyline, GeoPoint3 point, Tolerance tolerance)
Parameters
polylineGeoPolyline3The polyline.
pointGeoPoint3The point.
toleranceToleranceThe tolerance; every leg is measured as it is, so it changes nothing here.
Returns
- double
How far along the polyline its point nearest
pointlies.
Remarks
A polyline can pass near the same point more than once, so the closest edge is found first and the arc length is measured to that. Walking the chain and stopping at the first edge within tolerance would give a different answer depending on which end the chain was built from.
A leg is the leg it is however short, as ProjectToPolyline(GeoPolyline3, GeoPoint3, Tolerance) reads it: at a hundredth, the polyline (0, 0, 0), (10, 0, 0), (10, 0.006, 0), (0, 0.006, 0) puts (10.03, 0.003, 0) 10.003 along, 0.003 along its leg 0.006 long, where it put it 10 along, at the start of that leg.
Exceptions
- ArgumentNullException
Thrown when the polyline is null.
GetDistanceAtPoint(GeoPolygon3, GeoPoint3)
Gets the arc length from the first vertex of a polygon to the point on its boundary closest to the supplied point.
public static double GetDistanceAtPoint(GeoPolygon3 polygon, GeoPoint3 point)
Parameters
polygonGeoPolygon3pointGeoPoint3
Returns
GetDistanceAtPoint(GeoPolygon3, GeoPoint3, Tolerance)
Gets the arc length from the first vertex of a polygon to the point on its boundary closest to the supplied point, within a tolerance.
public static double GetDistanceAtPoint(GeoPolygon3 polygon, GeoPoint3 point, Tolerance tolerance)
Parameters
polygonGeoPolygon3The polygon.
pointGeoPoint3The point.
toleranceToleranceThe tolerance; every side is measured as it is, so it changes nothing here.
Returns
- double
How far round the outline from the first vertex its point nearest
pointlies.
Remarks
This measures around the boundary, not across the interior: a point in the middle of a polygon still reports the position of the nearest place on its outline.
A side is the side it is however short, as ProjectToPolygonBoundary(GeoPolygon3, GeoPoint3, Tolerance) reads it: at a hundredth, the polygon (0, 0, 0), (10, 0, 0), (10, 0.006, 0), (0, 10, 0) puts (10.03, 0.003, 0) 10.003 round, 0.003 along its side 0.006 long, where it put it 10 round, at the start of that side.
Exceptions
- ArgumentNullException
Thrown when the polygon is null.
GetDistanceAtPoint(GeoCircle3, GeoPoint3)
Gets the arc length from the zero parameter of a circle to the point on its circumference closest to the supplied point.
public static double GetDistanceAtPoint(GeoCircle3 circle, GeoPoint3 point)
Parameters
circleGeoCircle3pointGeoPoint3
Returns
GetDistanceAtPoint(GeoCircle3, GeoPoint3, Tolerance)
Gets the arc length from the zero parameter of a circle to the point on its circumference closest to the supplied point, within a tolerance.
public static double GetDistanceAtPoint(GeoCircle3 circle, GeoPoint3 point, Tolerance tolerance)
Parameters
circleGeoCircle3pointGeoPoint3toleranceTolerance