[R-sig-Geo] readAsciiGrid (maptools) 2
Michal Gallay
mgallay01 at qub.ac.uk
Tue Nov 13 16:02:10 CET 2007
I Ingo,
I had a similar problem when reading ESRI ASCII grid in R. After checking
it in ArcGIS I found out that there is one row of NoData values at the
edges, when exporting from Arc. It has to do with the definition of the
extent of the analysis and the grid cell definition (lower left corner or
center of the cell).
This, doesn't really explain why you see the lenght of 1000 and 1001, but
perhaps gives a clue.
Michal
On Nov 13 2007, Ingo Holz wrote:
> Hi again,
>
> OK, it is not a problem of readAsciiGrid (maptools)!
>
> However:
>
> x <- 3539000.5 : 3540000.5 ## OK, readAsciiGrid adds .5 to the
> coordinates
> length(x)
> x[1:10]
> min(x) ## OK, this is the rounded value
> summary(x) ## I still do not understand this
> summary(1:1001)
>
> I get the following results:
>
> > x <- 3539000.5 : 3540000.5 ## OK, readAsciiGrid adds .5 to the
> > coordinates length(x)
> [1] 1001
> > x[1:10]
> [1] 3539001 3539002 3539003 3539004 3539005 3539006 3539007 3539008
> 3539009 3539010
> > min(x) ## OK, this is the rounded value
> [1] 3539001
> > summary(x) ## I still do not understand this
> Min. 1st Qu. Median Mean 3rd Qu. Max.
> 3539000 3539000 3540000 3540000 3540000 3540000
> > summary(1:1001)
> Min. 1st Qu. Median Mean 3rd Qu. Max.
> 1 251 501 501 751 1001
> >
>
> Ingo
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Michal Gallay
Postgraduate Research Student
School of Geography, Archaeology and Palaeoecology
Queen's University
Belfast BT7 1NN
Northern Ireland
Tel: +44(0)2890 273929
Fax: +44(0)2890 973212
email: mgallay01 at qub.ac.uk
www: www.qub.ac.uk/geog
More information about the R-sig-Geo
mailing list