get_utm_rectangle: Get UTM Rectangle (WGS coords)

Description Usage Arguments Value Examples

View source: R/anem_geoprocessing.R

Description

Transform quadrangle (in WGS coordinates) to UTM coordinates, then convert to a rectangle, then transform back to WGS.

Usage

1
get_utm_rectangle(edges_user)

Arguments

edges_user

A data.frame with 4 rows and columns x1, y1, x2, y2, and bID

Value

Returns a data.frame with 4 rows representing a rectangle. Each row is a segment of the rectangle, and the segments are ordered so that the rectangle is specified as segment 1: p1 –> p2, segment 2: p2 –> p3, etc.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
edges_user <- data.frame(
  x1=c(-87.3802501022322,-86.2150051217412,-85.8522401749846,-87.1823783130922),
  y1=c(41.4427263776721,41.8327350621526,41.1455697310095,40.8512155742825),
  bID=c(5,6,7,8),
  x2=c(-86.2150051217412,-85.8522401749846,-87.1823783130922,-87.3802501022322),
  y2=c(41.8327350621526,41.1455697310095,40.8512155742825,41.4427263776721))
edges_rect <- get_utm_rectangle(edges_user)

## End(Not run)

gopalpenny/anem documentation built on Dec. 20, 2020, 5:27 a.m.