quadrant: Split a spatial object into quadrants

View source: R/quadrants.R

quadrantR Documentation

Split a spatial object into quadrants

Description

Returns a character vector of NE, SE, SW, NW corresponding to north-east, south-east quadrants respectively. If number_out is TRUE, returns numbers from 1:4, respectively.

Usage

quadrant(x, cent = NULL, number_out = FALSE)

Arguments

x

Object of class sf

cent

The centrepoint of the region of interest. Quadrants will be defined based on this point. By default this will be the geographic centroid of the zones.

number_out

Should the result be returned as a number?

See Also

Other geo: bbox_scale(), bind_sf(), geo_bb_matrix(), geo_bb(), geo_buffer(), geo_length(), geo_projected(), geo_select_aeq()

Examples

x = zones_sf
(quads <- quadrant(x))
plot(x$geometry, col = factor(quads))

stplanr documentation built on Sept. 15, 2023, 9:07 a.m.