[R-sig-Geo] readAsciiGrid (maptools)

Ingo Holz Ingo.Holz at uni-hohenheim.de
Tue Nov 13 13:57:45 CET 2007


Hi,

 I have an ESRI-Ascii-Grid file which looks like this:

ncols 1001
nrows 1001
xllcorner 3539000
yllcorner 5379000
cellsize 1
NODATA_value -9999
766,65 766,65 766,67 766,69 766,7 766,72 766,74 766,76 766,78 766,8 
766,83 

 I imported this file as.image with readAsciiGrid():

kachel1 <- readAsciiGrid(file1, as.image=T, dec=",")

 After that I get the following "summary results":

min(kachel1$x)
  [1] 3539001               #  I think this should be 3539000

 kachel1$x[1:10]
 [1] 3539001 3539002 3539003 3539004 3539005 3539006 3539007 
3539008 3539009 3539010

 This are 1001 different values in kachel1$x !

 And...

 is(kachel1$x)
[1] "numeric" "vector" 

 However:

summary(kachel1$x)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
3539000 3539000 3540000 3540000 3540000 3540000 

Why this?
Ingo




More information about the R-sig-Geo mailing list