http://cran.r-project.org/web/packages/sp/vignettes/csdacm.pdf
is a retired chapter from the first edition of http://www.asdar-book.org and describes a possible implementation of SpatialMultiPoints in a way similar to other classes deriving from Spatial. Since its appearance in 2008, nobody has ever mentioned using them, but if you try, let me know which new problems it solves! I think the more usual way of treating these things is having SpatialPointsDataFrame objects with a factor explaining what each point represents (e.g, trees of different species), like a marked point pattern with nominal marks. On 04/14/2014 01:55 PM, Roger Bivand wrote: > On Mon, 14 Apr 2014, Stefan Jelkovich wrote: > >> Roger, >> >> you are right. In case of the meuse data it makes no sense at all. Not >> the best example... I do not see a clear adventage for the use of >> MultiPoints, too. Maybe in case of categorical data? I only wanted to >> create such an object to investigate the structure and prepare my >> functions for MultiPoint objects. >> >> So MultiPoints are not supported by the SpatialPoints and >> SpatialPointsDataFrame classes? That's fine for me. >> >> By the way: if MultiPoint objects are imported in R and converted to >> SpatialPoints, the MultiPoint structure is just gone? > > library(rgeos) > g4=readWKT("MULTIPOINT((3.5 5.6),(4.8 10.5))") > g4 > class(g4) > str(g4) > slot(g4, "coords") > > (they get identical rownames in the coordinate matrix, but by default > there is no key/ID checking for points, so this is not reliable). The > fact that the points belong to a multipoint geometry is not recorded > anywhere as it is an attribute of the points. > > In your use case, the categorical observations have point support, not > multipoint support, so grouping points with the same category level is a > choice the user makes, but does confuse support. It could be done, but > would involve a lot of shoehorning to associate the points with their > appropriate geometry, and makes no great sense. > > Roger > > >> >> Thanks >> Stefan >> >>>> Am 13.04.2014 um 20:57 schrieb Roger Bivand <roger.biv...@nhh.no>: >>>> >>>> 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@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.biv...@nhh.no >> >> _______________________________________________ >> R-sig-Geo mailing list >> R-sig-Geo@r-project.org >> https://stat.ethz.ch/mailman/listinfo/r-sig-geo > > > > _______________________________________________ > R-sig-Geo mailing list > R-sig-Geo@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-sig-geo > -- Edzer Pebesma Institute for Geoinformatics (ifgi), University of Münster Heisenbergstraße 2, 48149 Münster, Germany. Phone: +49 251 83 33081 http://ifgi.uni-muenster.de GPG key ID 0xAC227795
signature.asc
Description: OpenPGP digital signature
_______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo