tpOBB2D: Oriented bounding box (2D)

tpOBB2DR Documentation

Oriented bounding box (2D)

Description

Returns the oriented bounding box of the trace position of the survey.

Usage

## S4 method for signature 'GPR'
tpOBB2D(x)

## S4 method for signature 'GPRsurvey'
tpOBB2D(x)

Details

The algorithm you are looking for is known in polygon generalisation as "smallest surrounding rectangle". Compute the convex hull of the cloud. For each edge of the convex hull: compute the edge orientation (with arctan), rotate the convex hull using this orientation in order to compute easily the bounding rectangle area with min/max of x/y of the rotated convex hull, Store the orientation corresponding to the minimum area found, Return the rectangle corresponding to the minimum area found. In 3D, the same applies, except: The convex hull will be a volume, The orientations tested will be the orientations (in 3D) of the convex hull faces.

Source

source "whuber" from stackexchange.com, https://gis.stackexchange.com/questions/22895/finding-minimum-area-rectangle-for-given-points/181883#181883


emanuelhuber/RGPR documentation built on May 13, 2024, 9:31 p.m.