dividePolygon: TDivide field into sections

Description Usage Arguments Value Examples

View source: R/dividePolygon.R

Description

Takes a field object and divides it into rWidth square sections.

Usage

1
dividePolygon(shape, rWidth)

Arguments

shape

spatial polygons data frame

rWidth

integer, instead of using a polygon list divide the original bounding box into approximately equal sized squares with rWidth number squares along the x axis.

Value

spatial polygons data frame section into apprximately square sections

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
require(sp)
require(ar.matrix)

set.seed(123)
usSim <- simField(
    N = 300,
    shape = US.df,
    rangeE = 3,
    offset = c(1, 2),
    max.edge = c(.25, 1))

plot(dividePolygon(usSim$bound, 4))
plot(dividePolygon(usSim$bound, 10))
plot(dividePolygon(usSim$bound, 16))

nmmarquez/PointPolygon documentation built on Dec. 10, 2020, 1:15 a.m.