Convex hull clip on 3D Spatial Objects
On 12/20/2012 08:08 PM, Nathalie Morin wrote:
Hello ! Does sp handle clipping 3D Spatial Objects such as a convex hull envelope around SpatialPoints or SpatialGrids ?
more-dimensional grids can be 'clipped' by 2D objects: library(sp) # 10 x 20 x 30 grid: sgdim = c(10,20,30) SG = SpatialGrid(GridTopology(rep(0,3), rep(10, 3), sgdim)) SGDF = SpatialGridDataFrame(SG, data.frame(val = rnorm(prod(sgdim)))) image(SGDF, axes=TRUE,col = 'grey') pol = cbind(c(0,50,50,0,0),c(0,0,50,50,0)) lines(pol) p = Polygon(pol) sp = SpatialPolygons(list(Polygons(list(p), "p"))) image(SGDF[sp,], axes=TRUE, add=TRUE) plot(sp, col='#88888888',add=TRUE) but not by 3D objects. We have no Spatial* classes yet to represent convex hulls in more than 2D.
Cheers, Nathalie MORIN Doctorante en t?l?d?tection foresti?re (Ph.D student in remote sensing applied to forestry) Centre d?application et de recherches en t?l?d?tection (CARTEL) D?partement de G?omatique Appliqu?e Sherbrooke (QC) CANADA J1K 2R1 T?l. : + 1 (819) 821-8000 #62962 e-mail : <mailto:Nathalie.M.Morin at Usherbrooke.ca> Nathalie.M.Morin at Usherbrooke.ca <http://www.usherbrooke.ca/> Universit? de Sherbrooke
_______________________________________________ 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