basicbox: Produce a basic square or rectangular mapping polygon

Description Usage Arguments Value Examples

View source: R/polygonprocessing.R

Description

Function to produce a basic square or rectangular box (e.g. for polygon clipping or plot borders)

Usage

1
basicbox(ll, ur, ul = c(ll[1], ur[2]), lr = c(ur[1], ll[2]), proj4string = NA)

Arguments

ll

coordinates of the lower left corner

ur

coordinates of the upper right corner

ul

coordinates of the upper left corner (by default set automatically)

lr

coordinates of the lower right corner (by default set automatically)

proj4string

projection string of class CRS.

Value

An object of class SpatialPolygonsDataFrame

Examples

1
2
3
utm34n <- CRS("+init=epsg:32634") # Greek UTM (west)
b <- basicbox(c(681900,4010900), c(682500,4011400), proj4string=utm34n)
plot(b, axes=TRUE)

ahb108/sparch documentation built on Feb. 3, 2021, 1:21 a.m.