Skip to content
Prev 1897 / 29559 Next

intersection of two polygons

I just checked the code and see that my function was not optimal (too 
much loops). I think that it can be easily improve and I can try to 
write a intersectSpatialPolygons.  There is a unionSpatialPolygons in 
maptools, I think that an intersect function could be also useful. For 
instance, one thing  that I would like to do in R (but I never succeed): 
I have a set of points from which I construct a Voronoi mosaic, I have 
also a polygon of my whole study area, I would like to cut the mosaic 
using the polygon. I now that there is an Arcview extension to do it but 
it would be nice to have also this functionality in R. An intersect 
function would be useful in this case.

Here, I have another related question. My function used polylist objects 
(it was written several years ago when there was no sp). I would like to 
know what will be the future of polylist. The main use of this class was 
its relationship to nb object. Now, poly2nb also accepts SpatialPolygons 
so what about polylist ?

Thanks,
Roger Bivand wrote: