createAoi: Create aoi polygon from topleft and bottomright coordinates

View source: R/water_netRadiation.G.R

createAoiR Documentation

Create aoi polygon from topleft and bottomright coordinates

Description

An AOI (Area of Interest) is created based on two points (topleft and bottomright) using a coordinate reference system.

Usage

createAoi(topleft, bottomright, EPSG)

Arguments

topleft

a vector with topleft x,y coordinates

bottomright

a vector with bottomright x,y coordinates

EPSG

EPSG code of the coordinate reference system of the coordinates (e.g. 32619 for WGS 84 / UTM zone 19N). Optional: if missing, the CRS is not set

Value

An sf data frame with a single POLYGON geometry (the rectangle defined by topleft and bottomright). Its CRS is set only when EPSG is supplied.

Author(s)

Guillermo Federico Olmedo

David Fonseca-Luengo

See Also

Other support functions: checkSRTMgrids(), getDEM(), prepareSRTMdata(), waterOptions()

Examples

tl <- c(493300, -3592700)
br <- c(557200, -3700000) 
aoi <- createAoi(topleft = tl, bottomright=br, EPSG=32619)
plot(aoi)

water documentation built on Nov. 25, 2026, 5:08 p.m.