Table of Contents

Method ProjectToRectangle

Namespace
GeometryHelper.Core
Assembly
GeometryHelper.dll

ProjectToRectangle(GeoRectangle2, GeoPoint2)

Projects a point onto the boundary of a rotated rectangle (GeoRectangle2 OBB). The result always lies on one of the four edges, including for points inside the rectangle.

public static GeoPoint2 ProjectToRectangle(GeoRectangle2 rect, GeoPoint2 point)

Parameters

rect GeoRectangle2

The rectangle.

point GeoPoint2

The target point.

Returns

GeoPoint2

The closest point on the rectangle boundary.