Debian Codegraph @

R/Class-SpatialMultiPoints.R

raw
1 setClass("SpatialMultiPoints",
2 contains = "Spatial",
3 slots = c(coords = "list"),
4 prototype = list(bbox = matrix(NA),
5 proj4string = CRS(as.character(NA)),
6 coords = list()),
7 validity = function(object) {
8 if (!is.list(object@coords))
9 return("coords slot is not a list")
10 if (!all(sapply(object@coords, is.matrix)))
11 return("all list elements need to be a matrix")
12 if (!all(sapply(object@coords, is.double)))
13 return("all coordinates must be of mode double")
14 if (unique(sapply(object@coords, ncol)) == 1)
15 return("all coordinate elements need to have the same number of columns")
16 return(TRUE)
17 }
18 )