[GRASS-user] .e00 to DEM

Dylan Beaudette debeaudette at ucdavis.edu
Wed Jul 8 17:14:24 EDT 2009


On Wednesday 08 July 2009, Nikos Alexandris wrote:
> On Wed, 2009-07-08 at 09:51 -0700, Dylan Beaudette wrote:
> > On Wednesday 08 July 2009, Nikos Alexandris wrote:
> > > There is something strange with the values though (they expand from min
> > > = -32687  max = 32645). Don't have the time to dig further, maybe there
> > > are details in the meta-data about it (!?).
> >
> > This looks like an overflow problem. Could it be that this file contains
> > unsigned 16 / 32 bit integers, but is being read in as signed 16 bit
> > integers?
>
> Probably you are right Dylan. In the meta-data it is written:
>
> << Level 2 DEM: Level 2 DEMs may contain void areas due to interruptions
> to contours in the source graphic or DLG. Void area elevation grid posts
> are assigned the value of -32,767. >>
>
> * This means that original data are for sure Signed (probably
> Int16-bit... ?).
>
> * gdal reads the data correctly (look previous post of mine) as:
>   Band 1 Block=20x4 Type=Int16, ColorInterp=Undefined
>   Min=0.000 Max=1371.000
>   NoData Value=-32768
>
> * grass reports the range of the imported data as:
> r.info dem250 -tr
> min=-32687
> max=32645
> datatype=CELL
>
> * The data show up correctly in GRASS:
>
> g.region rast=dem250 && r.colors dem250 color=terrain && d.mon x0 &&
> d.rast dem250
>
>
> If we accept min=-32687 that was assigned to be nodata, what is this
> max=32645?
>
> Nikos

Hi Nikos, 

Looks like a 16bit signed integer file. I have found that in the past using 
gdal_translate and manually setting the data type and nodata value results in 
the generation of a new file that GRASS can read in without further work. 
Also, have you tried manually setting NULL cells with 

r.null setnull=32768

Sometimes GRASS isn't notified of the nodata upon importing...

Dylan

-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341


More information about the grass-user mailing list