Method Locate
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
Locate(GeoCircle2, GeoPoint2)
Classifies the spatial location of a point relative to a circle using default tolerance.
public static PointLocation Locate(GeoCircle2 circle, GeoPoint2 point)
Parameters
circleGeoCircle2The circle.
pointGeoPoint2The target point.
Returns
- PointLocation
PointLocation.Inside, PointLocation.OnSide, or PointLocation.OutSide.
Locate(GeoCircle2, GeoPoint2, Tolerance)
Classifies the spatial location of a point relative to a circle within tolerance.
public static PointLocation Locate(GeoCircle2 circle, GeoPoint2 point, Tolerance tolerance)
Parameters
circleGeoCircle2The circle.
pointGeoPoint2The target point.
toleranceToleranceThe tolerance.
Returns
- PointLocation
PointLocation.Inside, PointLocation.OnSide, or PointLocation.OutSide.
Locate(GeoRectangle2, GeoPoint2)
Classifies the spatial location of a point relative to a rotated rectangle (GeoRectangle2 OBB) using default tolerance.
public static PointLocation Locate(GeoRectangle2 rect, GeoPoint2 point)
Parameters
rectGeoRectangle2The rectangle.
pointGeoPoint2The target point.
Returns
- PointLocation
PointLocation.Inside, PointLocation.OnSide, or PointLocation.OutSide.
Locate(GeoRectangle2, GeoPoint2, Tolerance)
Classifies the spatial location of a point relative to a rotated rectangle (GeoRectangle2 OBB) within tolerance.
public static PointLocation Locate(GeoRectangle2 rect, GeoPoint2 point, Tolerance tolerance)
Parameters
rectGeoRectangle2The rectangle.
pointGeoPoint2The target point.
toleranceToleranceThe tolerance.
Returns
- PointLocation
PointLocation.Inside, PointLocation.OnSide, or PointLocation.OutSide.
Locate(GeoPolygon2, GeoPoint2)
Classifies the spatial location of a point relative to a polygon using default tolerance.
public static PointLocation Locate(GeoPolygon2 poly, GeoPoint2 point)
Parameters
polyGeoPolygon2The polygon.
pointGeoPoint2The target point.
Returns
- PointLocation
PointLocation.Inside, PointLocation.OnSide, or PointLocation.OutSide.
Locate(GeoPolygon2, GeoPoint2, Tolerance)
Classifies the spatial location of a point relative to a polygon within tolerance.
public static PointLocation Locate(GeoPolygon2 poly, GeoPoint2 point, Tolerance tolerance)
Parameters
polyGeoPolygon2The polygon.
pointGeoPoint2The target point.
toleranceToleranceThe tolerance.
Returns
- PointLocation
PointLocation.Inside, PointLocation.OnSide, or PointLocation.OutSide.
Locate(GeoPolyline2, GeoPoint2)
Classifies the spatial location of a point relative to a polyline using default tolerance. A polyline has no interior, so the result is either OnSide or OutSide.
public static PointLocation Locate(GeoPolyline2 polyline, GeoPoint2 point)
Parameters
polylineGeoPolyline2The polyline.
pointGeoPoint2The target point.
Returns
- PointLocation
PointLocation.Inside, PointLocation.OnSide, or PointLocation.OutSide.
Locate(GeoPolyline2, GeoPoint2, Tolerance)
Classifies the spatial location of a point relative to a polyline within tolerance. A polyline has no interior, so the result is either OnSide or OutSide; convert it with ToPolygon() to classify against an enclosed area.
public static PointLocation Locate(GeoPolyline2 polyline, GeoPoint2 point, Tolerance tolerance)
Parameters
polylineGeoPolyline2The polyline.
pointGeoPoint2The target point.
toleranceToleranceThe tolerance.
Returns
- PointLocation
PointLocation.Inside, PointLocation.OnSide, or PointLocation.OutSide.
Locate(GeoLine2, GeoPoint2)
Classifies the spatial location of a point relative to a line segment using default tolerance.
public static PointLocation Locate(GeoLine2 line, GeoPoint2 point)
Parameters
Returns
- PointLocation
PointLocation.OnSide if on the line segment; otherwise PointLocation.OutSide.
Locate(GeoLine2, GeoPoint2, Tolerance)
Classifies the spatial location of a point relative to a line segment within tolerance.
public static PointLocation Locate(GeoLine2 line, GeoPoint2 point, Tolerance tolerance)
Parameters
lineGeoLine2The line segment.
pointGeoPoint2The target point.
toleranceToleranceThe tolerance.
Returns
- PointLocation
PointLocation.OnSide if on the line segment; otherwise PointLocation.OutSide.
Locate(GeoRay2, GeoPoint2)
Classifies the spatial location of a point relative to a ray using default tolerance.
public static PointLocation Locate(GeoRay2 ray, GeoPoint2 point)
Parameters
Returns
- PointLocation
PointLocation.OnSide if on the ray; otherwise PointLocation.OutSide.
Locate(GeoRay2, GeoPoint2, Tolerance)
Classifies the spatial location of a point relative to a ray within tolerance.
public static PointLocation Locate(GeoRay2 ray, GeoPoint2 point, Tolerance tolerance)
Parameters
Returns
- PointLocation
PointLocation.OnSide if on the ray; otherwise PointLocation.OutSide.
Remarks
A ray encloses nothing, so the answer is never Inside.
Locate(GeoFace2, GeoPoint2)
Classifies the spatial location of a point relative to a face with holes using default tolerance.
public static PointLocation Locate(GeoFace2 face, GeoPoint2 point)
Parameters
Returns
- PointLocation
PointLocation.Inside, PointLocation.OnSide, or PointLocation.OutSide.
Locate(GeoFace2, GeoPoint2, Tolerance)
Classifies the spatial location of a point relative to a face with holes within tolerance.
public static PointLocation Locate(GeoFace2 face, GeoPoint2 point, Tolerance tolerance)
Parameters
Returns
- PointLocation
PointLocation.Inside, PointLocation.OnSide, or PointLocation.OutSide.
Remarks
A point inside a hole is outside the face, and a point on the rim of a hole is on its boundary, since the rim is as much an edge of the material as the outer loop is.
Locate(GeoTriangle2, GeoPoint2)
Classifies the location of a point relative to a triangle using default tolerance.
public static PointLocation Locate(GeoTriangle2 triangle, GeoPoint2 point)
Parameters
triangleGeoTriangle2The triangle.
pointGeoPoint2The target point.
Returns
- PointLocation
PointLocation.Inside, PointLocation.OnSide, or PointLocation.OutSide.
Locate(GeoTriangle2, GeoPoint2, Tolerance)
Classifies the location of a point relative to a triangle within tolerance.
public static PointLocation Locate(GeoTriangle2 triangle, GeoPoint2 point, Tolerance tolerance)
Parameters
triangleGeoTriangle2The triangle.
pointGeoPoint2The target point.
toleranceToleranceThe tolerance.
Returns
- PointLocation
PointLocation.Inside, PointLocation.OnSide, or PointLocation.OutSide.
Remarks
A point within the point tolerance of an edge is on it. Any other point is inside when it lies on the same side of all three edges, so a triangle has the same inside whichever way it runs. A triangle of no area has no inside at all: a point is on its edges or outside it.
Locate(GeoPolylineArc2, GeoPoint2)
Says where a point lies against a chain that may curve.
public static PointLocation Locate(GeoPolylineArc2 chain, GeoPoint2 point)
Parameters
chainGeoPolylineArc2pointGeoPoint2
Returns
Remarks
A chain is a curve, so it encloses nothing: a point is either on it or outside it, exactly as with Locate(GeoPolyline2, GeoPoint2).
Exceptions
- ArgumentNullException
Thrown when the chain is null.
Locate(GeoPolylineArc2, GeoPoint2, Tolerance)
Says where a point lies against a chain that may curve, within a tolerance.
public static PointLocation Locate(GeoPolylineArc2 chain, GeoPoint2 point, Tolerance tolerance)
Parameters
chainGeoPolylineArc2pointGeoPoint2toleranceTolerance
Returns
Exceptions
- ArgumentNullException
Thrown when the chain is null.
Locate(GeoPolygonArc2, GeoPoint2)
Says where a point lies against a loop that may curve.
public static PointLocation Locate(GeoPolygonArc2 loop, GeoPoint2 point)
Parameters
loopGeoPolygonArc2pointGeoPoint2
Returns
Exceptions
- ArgumentNullException
Thrown when the loop is null.
Locate(GeoPolygonArc2, GeoPoint2, Tolerance)
Says where a point lies against a loop that may curve, within a tolerance.
public static PointLocation Locate(GeoPolygonArc2 loop, GeoPoint2 point, Tolerance tolerance)
Parameters
loopGeoPolygonArc2pointGeoPoint2toleranceTolerance
Returns
Remarks
The answer is exact, with no arc cut into pieces anywhere in it: it is the straight loop through the vertices, turned inside out once for every piece an arc cuts off its own chord that the point happens to lie in. Only the true boundary, arcs and all, is read with the tolerance: a point within it of the boundary is on the side, and every other point is in or out exactly, however near a chord it lies. The square from the origin to (100, 100) with its top bowed 20 inwards (bulge -0.4) has the point (50, 99.95), 0.05 under the chord, outside at a tolerance of 0.1: it is 19.95 above the arc. A point exactly on a chord that is not the boundary is read as lying a hair towards +X of it, or towards +Y of a chord running along X.
Exceptions
- ArgumentNullException
Thrown when the loop is null.