Re: [R-sig-Geo] Prevent minor discrepancy in pixel resolution using Spatstat

2010-02-18 Thread Tyler Dean Rudolph
Like many things (but not all!), this makes a great deal of sense. My solution, therefore is to first ensure my x and y ranges are divisible by 25 xran<-c(-100, 100) + sort(c(as.numeric(x[4]), as.numeric(x[6]))) xran[2]<-xran[2] + ((ceiling((xran[2]-xran[1])/25)-((xran[2]-xran[1])/25))*25) yran

Re: [R-sig-Geo] Prevent minor discrepancy in pixel resolution using Spatstat

2010-02-17 Thread Roger Bivand
On Wed, 17 Feb 2010, Tyler Dean Rudolph wrote: When I specify eps=25 (m resolution) in a call to distmap... library(spatstat) temp <- data.frame(x=-670049.2, y=752814.6, X2=-669961.9, Y2=752648.2) subwin<-owin(xrange=c(-100, 100) + sort(c(temp$x, temp$X2)), yrange=c(-100, 100) + sort

[R-sig-Geo] Prevent minor discrepancy in pixel resolution using Spatstat

2010-02-17 Thread Tyler Dean Rudolph
When I specify eps=25 (m resolution) in a call to distmap... > library(spatstat) > temp <- data.frame(x=-670049.2, y=752814.6, X2=-669961.9, Y2=752648.2) >subwin<-owin(xrange=c(-100, 100) + sort(c(temp$x, temp$X2)), yrange=c(-100, 100) + sort(c(temp$y, temp$Y2))) >trajpsp<-psp(te