discretizePolygon | R Documentation |
Discretize spatial polygons to points.
discretizePolygon(x, cellsize, id=NULL, value=NULL, showProgressBar=FALSE)
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. |
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. |
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.
discretizeRaster, ataKriging
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.