[STATSGRASS] import DTM with readRAST6()

Carlos "Guâno" Grohmann carlos.grohmann at gmail.com
Mon Jul 9 09:41:47 EDT 2007


try to
str(trentino.grid)

the summary() you want is probably

summary(trentino.grid$DTM_trentino_100m)

hope this helps
Carlos



On 7/9/07, Matteo Dall'Amico <matteo.dallamico at ing.unitn.it> wrote:
>
> Hello everybody,
> I am a new R & Grass user.
> I am interested in doing a kriging of the Temperature in a basin, based on
> pixel elevation (DTM).
> I use Grass 6.2.1 and R 2.5.1 and have installed the spgrass6 package.
>
> The DTM is called "DTM_trentino_100m" and has a header and data like the
> following:
>
> north:5158000.0
> south:5058500.0
> east:1729700.0
> west:1611600.0
> rows:995
> cols:1181
> -9999.0 -9999.0 -9999.0 370.84381103515625 372.55120849609375
> 373.13128662109375 .....
>
> I have opened R inside the Grass location, and imported the DTM:
>
> >  trentino.grid<-readRAST6("DTM_trentino_100m")
> Creating BIL support files ...
> Header File =
> /Users/Matteo/Documents/DataGrass/GBovest/Permafrost/.tmp/nilo.local/DTM_trentino_100m.hdr
> World File =
> /Users/Matteo/Documents/DataGrass/GBovest/Permafrost/.tmp/nilo.local/DTM_trentino_100m.wld
> Exporting Raster as double values(bytes=8)
> Using the Current Region settings ...
> north=5158000.000000
> south=5058500.000000
> east=1729700.000000
> west=1611600.000000
> r=995
> c=1181
>
> Percent complete:  100%
> r.out.bin complete.
>
> > summary(trentino.grid)
> Object of class SpatialGridDataFrame
> Coordinates:
>               min     max
> coords.x1 1611600 1729700
> coords.x2 5058500 5158000
> Is projected: TRUE
> proj4string :
> [+proj=tmerc +lat_0=0.0000000000 +lon_0=9.0000000000 +k_0=0.9996000000
> +x_0=1500000.0000000000 +y_0=0.0000000000 +a=6378388 +rf=297 +no_defs
> +towgs84=-225.000,-65.000,9.000]
> Number of points: 2
> Grid attributes:
>   cellcentre.offset cellsize cells.dim
> 1           1611650      100      1181
> 2           5058550      100       995
> Data attributes:
> DTM_trentino_100m
> Min.   :1.192e-319
> 1st Qu.:1.065e-314
> Median :1.066e-314
> Mean   :1.285e-312
> 3rd Qu.:2.722e-312
> Max.   :4.774e-312
>
> As you can see, the import has been fully done, yet the attributes are not
> correct. In fact, the Min. value is 1.192e-319 and the Max is 4.774e-312 but
> in reality the elevation changes between 60m to 3500m.
> Have I done something wrong? What should I do?
> Thank you in advance,
>
> Matteo
>
>
> ---------------------------------
> Matteo Dall'Amico
> PhD candidate
> CUDAM and department of Civil and Environmental Engineering
> Universita' degli Studi di Trento
> Via Mesiano 77 - 38050 Trento - Italy
> email: matteo.dallamico at ing.unitn.it
> Tel. +39 0461 882610
> Fax +39 0461 882672
> http://www.dottorato.it/trento/
> ---------------------------------
>
>
> _______________________________________________
> statsgrass mailing list
> statsgrass at grass.itc.it
> http://grass.itc.it/mailman/listinfo/statsgrass
>
>


-- 
+-----------------------------------------------------------+
              Carlos Henrique Grohmann - Guano
  Visiting Researcher at Kingston University London - UK
  Geologist M.Sc  - Doctorate Student at IGc-USP - Brazil
Linux User #89721  - carlos dot grohmann at gmail dot com
+-----------------------------------------------------------+
_________________
"Good morning, doctors. I have taken the liberty of removing Windows
95 from my hard drive."
--The winning entry in a "What were HAL's first words" contest judged
by 2001: A SPACE ODYSSEY creator Arthur C. Clarke




More information about the grass-stats mailing list