[R-sig-Geo] Error in im2asc() conversion

Els Goossens egoossens at avia-gis.be
Mon Feb 22 16:12:25 CET 2010


Dear list,
I have an object (soil) of the class “im” that I want to convert to an object of the class “asc” using im2asc(). An error is returned that cellsize in X and Y directions are not identical. Inspecting the "im"-object, the dimensions of each pixel are the same (i.c. 0.01 units). Is there another way to convert these "im"-data into "asc"-data.

Thanks,
Els

> summary(soil)
real-valued pixel image
202 x 391 pixel array (ny, nx)
enclosing rectangle: [2.546947, 6.45694708336902] x [49.4855561358497, 51.5055561789202] units
dimensions of each pixel: 0.01 x 0.01 units 
Image is defined on a subset of the rectangular grid
Subset area =  3.87300016516024 square units 
Pixel values (inside window):
        range = [0,100]
        integral = 357.54941524725
        mean = 92.3184611412342
> soil.asc<-im2asc(soil)
Error in im2asc(soil) : 
  the grid cellsize should be identical for both X and Y directions.



More information about the R-sig-Geo mailing list