generPoly: Generate a regular grid of polygons

View source: R/generPoly.R

generPolyR Documentation

Generate a regular grid of polygons

Description

Generate a regular grid of polygons and optionally write them on a file for input to califlopp

Usage

generPoly(step = 5, np = 10, file = "data", plot = TRUE)

Arguments

step

Step of grid, in meter.

np

Number of polygons on each axis.

file

Pathname of the polygons file to be created. If NULL, no file created.

plot

If TRUE, plot of the polygons.

Details

When file is not NULL, a polygons file is created. It is in the format 2 of califlopp and the values separator is tabulate.

Value

An object of class "listpoly"

Note

The polygons are numbered from 1, from the left to the right, then from bottom to top.

See Also

"listpoly-class", plot.listpoly

Examples

a <- generPoly(np=3, file=NULL)

RCALI documentation built on Jan. 13, 2023, 5:12 p.m.