[R-sig-Geo] How to create a SpatialMultiPoints object

Roger Bivand Roger.Bivand at nhh.no
Sun Apr 13 20:57:01 CEST 2014


On Sun, 13 Apr 2014, Stefan Jelkovich wrote:

> Hi all,
>
> I’m struggling with the creation of a 
> SpatialPoints/SpatialPointsDataFrame object containing MultiPoints. Is 
> this possible at all?

Why would it be possible, as each geomtry feature (point) is associated 
with unique observed data values? A multipoint object is of little use in 
point pattern analysis or geostatistics (or other areas of spatial 
statistics) as its support is hard to use - the single unique observed 
data value for each geometry would be associated with multiple points, and 
a set of such objects might well overlap mutually, meaning that it would 
be very hard to retrieve observations.

If you feel that multipoint objects have a future in spatial statistics, 
please contribute a suitable class container and methods for handling it.

Hope this clarifies,

Roger

>
> # SinglePoints are that easy:
> library(sp)
> data(meuse)
> coordinates(meuse) <- ~x+y
>
> # MultiPolygons are that easy:
> p1 <- Polygon(cbind(x=c(0, 0, 10, 10, 0), y=c(0, 10, 10, 0, 0)))
> p2 <- Polygon(cbind(x=c(13, 13, 17, 17, 13), y=c(13, 17, 17, 13, 13)))
> lp <- list(p1, p2)
> pls <- Polygons(lp, ID="1")
> mp <- SpatialPolygons(list(pls))
>
> How can I put all the meuse data points in one MultiPoint object?
>
> Stefan
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no


More information about the R-sig-Geo mailing list