[R-sig-Geo] Convex hull clip on 3D Spatial Objects

Edzer Pebesma edzer.pebesma at uni-muenster.de
Thu Dec 20 22:17:01 CET 2012



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



More information about the R-sig-Geo mailing list