Dear all,


I'm running on R 2.7.1 (win), and I'm trying to "clip" a psp and an owin
object, without success. Here is the code that I'm using:



############################################

library(maptools)

library(spatstat)



a<-readShapeSpatial("area.shp")

b <- as(as(a, "SpatialPolygons"), "owin")

plot(b)



g<-0:360



            pt<-runifpoint(1, b)

            pt_v<-as.data.frame(pt)



            x<-pt_v[,1]

            y<-pt_v[,2]



            dest<-gcDestination(x, y, bearing=sample(g, 1), dist=4,
dist.units = "km")

            trans <- psp(x, y, dest[,1],dest[,2],  window=owin())



            plot(trans, lwd=2, add=TRUE)



###############################################



My question is what should I do to get the information of what is inside the
clipping object (trans), having as an input object an owin (b).



Sorry if the code looks silly (and/or the question!), but I'm a nearby.



Thanks in advance for any help,



Cheers,



Alexandre Camargo Martensen

**********************************

Landscape Ecology and Conservation Lab

University of Sao Paulo

Sao Paulo – Brazil

**********************************

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to