discretizePolygon {atakrig}R Documentation

Discretize spatial polygons to points.

Description

Discretize spatial polygons to points.

Usage

discretizePolygon(x, cellsize, id=NULL, value=NULL, showProgressBar=FALSE)

Arguments

x

a SpatialPolygonsDataFrame object.

cellsize

cell size of discretized grid.

id

unique polygon id. if not given, polygons will be numbered from 1 to n accroding the record order.

value

polygon value. if not given, NA value will be assigned.

showProgressBar

whether show progress.

Value

a discreteArea object: list(areaValues, discretePoints).

areaValues

values of areas: data.frame(areaId,centx,centy,value), where areaId is polygon id; centx, centy are centroids of polygons.

discretePoints

discretized points of areas: data.frame(areaId,ptx,pty,weight), where ptx, pty are discretized points; by default, weight is equal for all points.

Note

Point weight is normalized for each polygon. Weight need not to be the same for all points of a polygon. They can be assigned according to specific variables, such as population distribution.

See Also

discretizeRaster, ataKriging


[Package atakrig version 0.9.8 Index]