Hi R-sig-geo'ers

I am attempting to generate an image with each pixel showing the euclidean distance to nearest line feature using spatstat.
I  would like to set the image extent and resolution, rather than the  default 100 x 100 (nx, ny) cells. However, when attempting this I get  the following error   

Error in diff(w$yrange)/eps : non-numeric argument to binary operator

I am using R version 2.12.1 64-bit and spatstat 1.22-1

Below  is an example using the copper dataset that is provided with spatstat.  This generates the same error that I am getting with my data

> library(spatstat)
>  # get data
> data(copper)
>  # set user defined window
> copper.win <- owin(c(0,70),c(0,158))
>  # default distmap image resolution with 100 x 100 (ny,nx)
> distmap.psp(copper$Lines) # OK
real-valued pixel image
100 x 100 pixel array (ny, nx)
enclosing rectangle: [-0.335, 70.11] x [0.19, 158.23] km 
>  # user defined window and resolution 158 x 70 (ny,nx)
> distmap.psp(copper$Lines,as.mask(w=copper.win,eps=1)) # Error
Error in diff(w$yrange)/eps : non-numeric argument to binary operator 

 I have tried as.mask() with xy coordinates with pixel locations but have encounter the same error.

Thanks 

Matthew Cracknell
PhD. Candidate
   
ARC Centre of Excellence in Ore Deposits
University of Tasmania
Private Bag 79
Hobart, 7001
Australia

Mob: 0409438924 



	[[alternative HTML version deleted]]

