Question about Polgons()
On 06/07/2012 11:04 PM, Struve,Juliane wrote:
Dear list, In the documentation about SpatialPolygons-class (code is given below) what does the line Srs3 = Polygons(list(Sr3, Sr4), "s3/4") mean and why is it needed ?
It does not mean anything, and it is not needed, but it illustrates that, unlike Srs1 and Srs2, a Polygons object can also contain more than one ring (hence the 's' in Polygons).
Thanks a lot in advance, Juliane Sr1 = Polygon(cbind(c(2,4,4,1,2),c(2,3,5,4,2))) Sr2 = Polygon(cbind(c(5,4,2,5),c(2,3,2,2))) Sr3 = Polygon(cbind(c(4,4,5,10,4),c(5,3,2,5,5))) Sr4 = Polygon(cbind(c(5,6,6,5,5),c(4,4,3,3,4))) Srs1 = Polygons(list(Sr1), "s1") Srs2 = Polygons(list(Sr2), "s2") Srs3 = Polygons(list(Sr3, Sr4), "s3/4") SpP = SpatialPolygons(list(Srs1,Srs2,Srs3)) plot(SpP, col = 1:3, pbg="white") Dr. Juliane Struve Fisheries and Aquatic Sciences 7922 NW 71st Street, Gainesville, FL 32653 352-273-3632 (tel) 352-392-3672 (fax) email: jstruve at ufl.edu<mailto:jstruve at ufl.edu> [[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Weseler Stra?e 253, 48151 M?nster, Germany. Phone: +49 251 8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de http://www.52north.org/geostatistics e.pebesma at wwu.de