DEMs

Bill Brown brown at gis.uiuc.edu
Tue Jun 27 08:00:00 EDT 1995


Bill G,

I think the 1:250K dems are in lat-long rather than UTM.  Here's 
the procedure I've used:

#!/bin/csh -f
# Bill Brown (brown at gis.uiuc.edu)
# DEMs need to already be gunzipped

foreach i ($*)
    echo importing $i ...
    dd if=$i ibs=10240 | m.dmaUSGSread top=1 bottom=1201 left=1 right=1201 outp
ut=$i.dat logfile=$i.log
    m.rot90 input=$i.dat output=$i.dem rows=1201 cols=1201 bpc=2

# this is a little C program I wrote to set header info, but you can
# get what you need out of the log file and input it interactively in g.region
    log2hd $i.log $LOCATION/cellhd/$i.tmp

# this part isn't necessary, just an automatic way of getting
# some decent colors
    mv $i.dem $LOCATION/cell/$i.tmp
    g.region rast=$i.tmp
    r.mapcalc $i=$i.tmp
# mapcalc sets range, needed for r.colors
    r.colors map=$i color=rules < $LOCATION/elev.colors

    g.remove $i.tmp
    /bin/rm -f $i.dat $i.log
    gzip $i
    echo $i DONE
    echo
end






More information about the grass-user mailing list