gianni lavaredo <gianni.lavar...@gmail.com> wrote on R-sig-geo:
I wish to convert a really complex "SpatialPolygonsDataFrame" to owin using
MyMask<- readOGR(".", "Mask") MyMask.owin<- as(MyMask, "owin")
but I get this error massage in the end
Errore in matrix(FALSE, npoly, npoly) : too many elements specified
This error is flagged by the package 'spatstat' which is attempting to check whether any pair of polygons is overlapping. Apparently there are so many polygons ('npoly') that the system can't create a logical matrix of size npoly * npoly. That is indeed a lot of polygons (e.g. my laptop will accept npoly = 25,000). To avoid this error, you could try setting spatstat.options(checkpolygons=FALSE) which will simply turn off the checking. Do this if you are confident that the polygons do not overlap. Good luck! Adrian Baddeley _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo