dear Researcher,

it's friday afternoon i am starting to be tired. I don't rememeber the
method to convert a polygon class in a SpatialPolygonsDataFrame to use
overlay later. Sorry for destrub with this simple question.

thanks in advance Gianni



mywindow <- owin(mydata@bbox[1,],mydata@bbox[2,])
        plot(mywindow, border="red")
        points(centroid.owin(mywindow),pch=19,cex = 0.7)
        xy.centr <- as.matrix(data.frame(centroid.owin(mywindow)))
        # create a circle with the radius equal 1/2 the side of square area
        big =  disc(radius=100, centre=xy.centr[1,], npoly=4)
        vert <- vertices(big)
        # square of 200 x 200 m side
        r <- as.rectangle(big)
        plot(r, add=T)
        vert.r.xy <- as.matrix(data.frame(vertices(r)))
        vert.r.xy.poligon <- rbind(vert.r.xy,vert.r.xy[1,])
        p <- Polygon(vert.r.xy.poligon, hole=as.logical(NA))
---------------------------
overlay

	[[alternative HTML version deleted]]

