Skip to content
Prev 316449 / 398506 Next

points rejected as lying outside the specified window

This is a question about the "spatstat" package and as such would have
been more appropriately directed to the R-sig-Geo list.

(1) Your code seems unnecessarily complicated; I haven't followed it
through in detail however.

(2) You did not get an "error", you got a "warning".  This warning means
what it says:   A number of the points that you are trying to make into
a planar point pattern lie out side of the window that you specified.

Since you say that *all* of your points lie outside the specified window
one might guess that the coordinate system of the points in "myfile.csv"
(God how I hate that "mythis" and "mythat" terminology that Micro$soft
has introduced!) is different from the coordinate system that is used in the
"NYBorough" data set.

Look at

     range(coords[,1])
     range(coords[,2])
     range(myfile$X)
     range(myfile$Y)

to get some insight into the nature of the coordinates.

If the coordinates seem to be at least roughly commensurate
your could try:

WR <- ripras(x=myfile$X[u],y=myfile$Y[u],shape="rectangle")
Type_0 <- ppp(myfile$X[u],myfile$Y[u],window=WR)
WP <- owin(poly=list(x=coords[,1],y=coords[,2]))
plot(Type_0)
plot(WP,add=TRUE)

which might be revealing.

Other than that it's difficult to say what your problem is without having
access to your actual data.

     cheers,

         Rolf Turner
On 01/30/2013 09:29 AM, Abby Rudolph wrote: