Method ProjectToPolygon
- Namespace
- GeometryHelper.Core
- Assembly
- GeometryHelper.dll
ProjectToPolygon(GeoPolygon2, GeoPoint2)
Projects a point onto the boundary of a polygon using default tolerance.
public static GeoPoint2 ProjectToPolygon(GeoPolygon2 poly, GeoPoint2 point)
Parameters
polyGeoPolygon2The polygon.
pointGeoPoint2The target point.
Returns
- GeoPoint2
The closest point on the polygon boundary.
ProjectToPolygon(GeoPolygon2, GeoPoint2, Tolerance)
Projects a point onto the boundary of a polygon within tolerance (finds the closest point on any edge). The result always lies on the boundary, including for points inside the polygon.
public static GeoPoint2 ProjectToPolygon(GeoPolygon2 poly, GeoPoint2 point, Tolerance tolerance)
Parameters
polyGeoPolygon2The polygon.
pointGeoPoint2The target point.
toleranceToleranceThe tolerance.
Returns
- GeoPoint2
The closest point on the polygon boundary.