Table of Contents

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

poly GeoPolygon2

The polygon.

point GeoPoint2

The 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

poly GeoPolygon2

The polygon.

point GeoPoint2

The target point.

tolerance Tolerance

The tolerance.

Returns

GeoPoint2

The closest point on the polygon boundary.