Learn R Programming

rtop (version 0.6-9)

rtopDisc: Discretize areas

Description

rtopDisc will discretize an area for regularization or calculation of Ghosh-distance

Usage

# S3 method for rtop
rtopDisc(object, params = list(),...) 
# S3 method for SpatialPolygonsDataFrame
rtopDisc(object, params = list(), bb = bbox(object), ...) 
# S3 method for SpatialPolygons
rtopDisc(object, params = list(), bb = bbox(object),  ...) 
# S3 method for rtopVariogram
rtopDisc(object, params = list(), ...)

Value

The function returns a list of discretized areas, or if called with an rtop-object as argument, the object with lists of discretizations of the observations and prediction locations (if part of the object). If the function is called with an rtopVariogram (usually this is an internal call), the list contains discretized pairs of hypothetical objects from each bin of the semivariogram with a centre-to-centre distance equal to the average distance between the objects in a certain bin.

Arguments

object

object of class SpatialPolygons or SpatialPolygonsDataFrame or rtopVariogram, or an object with class rtop that includes one of the above

bb

boundary box, usually modified to be the common boundary box for two spatial object

params

possibility to pass parameters to modify the default parameters for the rtop package, set in getRtopParams. Typical parameters to modify for this function are:

  • rresol = 100; minimum number of discretization points in areas

  • hresol = 5; number of discretization points in one direction for areas in binned variograms

  • hstype = "regular"; sampling type for binned variograms

  • rstype = "rtop"; sampling type for real areas

...

Possibility to pass individual parameters

Author

Jon Olav Skoien

Details

There are different options for discretizing the objects. When the areas from the bins are discretized, the options are random or regular sampling, regular sampling is the default.

For the real areas, regular sampling appears to have computational advantages compared with random sampling. In addition to the traditional regular sampling, rtop also offers a third type of sampling which assures that the same discretization points are used for overlapping areas.

Starting with a coarse grid covering the region of interest, this will for a certain support be refined till a requested minimum number of points from the grid is within the support. In this way, for areal supports, the number of points in the area with the largest number of points will be approximately four times the requested minimum number of points. This methods also assure that points used to discretize a large support will be reused when discretizing smaller supports within the large one, e.g. subcatchments within larger catchments.

References

Skoien J. O., R. Merz, and G. Bloschl. Top-kriging - geostatistics on stream networks. Hydrology and Earth System Sciences, 10:277-287, 2006.

Skoien, J. O., Bloschl, G., Laaha, G., Pebesma, E., Parajka, J., Viglione, A., 2014. Rtop: An R package for interpolation of data with a variable spatial support, with an example from river networks. Computers & Geosciences, 67.

See Also

rtopVariogram