sortPointsRectangle.old {utilitiesR}R Documentation

DEPRECATED version of sortPointsRectangle.

Description

This old version is still here for the sake of storage, but SHOULD NOT BE USED. It used an algorithm to determine the labels for the points ('bottom-left', 'top-right', etc) that was sometimes faulty and would yield the wrong results.

Usage

  sortPointsRectangle.old(pts, anticlockwise = TRUE,
    verbose = FALSE, shift = FALSE, preserveStart = FALSE,
    index.return = FALSE)

Arguments

verbose

whether to print some output to the screen (deprecated in new version)

pts

the input points, nx2, colnames 'X' and 'Y'

anticlockwise

boolean, whether to return points in anticlockwise or clockwise fashion (default TRUE)

shift

default FALSE, whether to return results relative to origin

preserveStart

default FALSE, whether to start at the first input coordinate and proceed anticlockwise/ clockwise from there, or to start from the lower-left corner ('origin')

index.return

default FALSE, whether to return the indices into the original "pts" that reorder as specified.

Details

The wrong results typically happened when the input rectangle was on a diagonal slant such that one pair of the diagonally-opposite corners had roughly equal Y values.

The new version determines the radial coordinates of the vertices relative to their centroid and uses the arguments to order the points appropriately.

See Also

sortPointsRectangle


[Package utilitiesR version 2.0 Index]