Class for (irregularly spaced) MultiPoints

Objects from the Class

Objects can be created by calls of the form SpatialPoints(x).

Slots

coords:

Object of class "list", containing the coordinates of point sets (each list element is a matrix)

bbox:

Object of class "matrix", with bounding box

proj4string:

Object of class "CRS", projection string

Extends

Class "Spatial", directly.

Methods

[

signature(x = "SpatialMultiPoints"): subsets point sets

coerce

signature(from = "SpatialPoints", to = "data.frame"): coerce to data.frame

coordinates

signature(obj = "SpatialMultiPoints"): retrieves all the coordinates, as one single matrix

plot

signature(x = "SpatialPoints", y = "missing"): plot points

summary

signature(object = "SpatialPoints"): summarize object

points

signature(x = "SpatialPoints"): add point symbols to plot

show

signature(object = "SpatialPoints"): prints coordinates

rbind

signature(object = "SpatialPoints"): rbind-like method

plot method arguments

The plot method for “SpatialPoints” objects takes the following arguments:

x

object of class SpatialPoints

pch

default 3; either an integer specifying a symbol or a single character to be used as the default in plotting points

axes

default FALSE; a logical value indicating whether both axes should be drawn

add

default FALSE; add to existing plot

xlim

default NULL; the x limits (x1, x2) of the plot

ylim

default NULL; the y limits of the plot

...

passed through

setParUsrBB

default FALSE; set the par “usr” bounding box, see note in Spatial-class

cex

default 1; numerical value giving the amount by which plotting text and symbols should be magnified relative to the default

col

default 1; default plotting color

lwd

default 1; line width

bg

default 1; colour to be used for the background of the device region

Author

Edzer Pebesma, edzer.pebesma@uni-muenster.de

Examples

cl1 = cbind(rnorm(3, 10), rnorm(3, 10))
cl2 = cbind(rnorm(5, 10), rnorm(5,  0))
cl3 = cbind(rnorm(7,  0), rnorm(7, 10))

mp = SpatialMultiPoints(list(cl1, cl2, cl3))
plot(mp, col = 2, cex = 1, pch = 1:3)

mp
#> SpatialMultiPoints:
#> [[1]]
#>           [,1]      [,2]
#> [1,]  8.354729  8.871482
#> [2,] 10.118459 10.318447
#> [3,] 10.334439  9.285841
#> 
#> [[2]]
#>           [,1]       [,2]
#> [1,] 10.869094 -0.0391045
#> [2,] 10.357445  2.2134383
#> [3,] 11.034092 -0.2316658
#> [4,]  9.571326 -0.9843264
#> [5,] 10.886738  1.4226089
#> 
#> [[3]]
#>             [,1]      [,2]
#> [1,] -0.25811487  9.903283
#> [2,]  0.44084084 11.845590
#> [3,]  0.25428522  9.975245
#> [4,] -0.02562433 10.619211
#> [5,] -0.43270350  9.755816
#> [6,]  0.52600028  9.437798
#> [7,]  0.59928980 10.184914
#> 
#> Coordinate Reference System (CRS) arguments: NA 
mp[1:2]
#> SpatialMultiPoints:
#> [[1]]
#>           [,1]      [,2]
#> [1,]  8.354729  8.871482
#> [2,] 10.118459 10.318447
#> [3,] 10.334439  9.285841
#> 
#> [[2]]
#>           [,1]       [,2]
#> [1,] 10.869094 -0.0391045
#> [2,] 10.357445  2.2134383
#> [3,] 11.034092 -0.2316658
#> [4,]  9.571326 -0.9843264
#> [5,] 10.886738  1.4226089
#> 
#> Coordinate Reference System (CRS) arguments: NA 

print(mp, asWKT=TRUE, digits=3)
#> SpatialMultiPoints:
#>                                                                                       geometry
#> 1                                                   MULTIPOINT (8.35 8.87,10.1 10.3,10.3 9.29)
#> 2                          MULTIPOINT (10.9 -0.0391,10.4 2.21,11 -0.232,9.57 -0.984,10.9 1.42)
#> 3 MULTIPOINT (-0.258 9.9,0.441 11.8,0.254 9.98,-0.0256 10.6,-0.433 9.76,0.526 9.44,0.599 10.2)
#> Coordinate Reference System (CRS) arguments: NA