
Add Relief to Your Topographic Maps #72
Chapter 6, Mapping on Your Desktop
|
347
HACK
Now you can zoom in and out as you like and return to this view of San
Francisco by typing
g.region San_Francisco, followed by d.redraw.
If you got a single DEM from the USGS Seamless Data Dis-
tribution System or the Global Land Cover Facility, you can
skip over this next part.
Making a Composite Elevation Model
Next, let’s get the DEMs we downloaded imported into GRASS as raster lay-
ers. Ordinarily, r.in.gdal can be used to read DEM files directly into GRASS,
but, for reasons unclear, this causes segmentation faults in the version of
GRASS we used. However, the GDAL package offers a tool called gdal_
translate, which will let us turn the DEMs into GeoTIFFs, and then r.in.gdal
can import those GeoTIFFs into GRASS as usual. Because there are a few
DEM files we want to convert, we wrote a quick bash script called import_
dem.sh to do the job:
#!/bin/bash
for dem in $@; do
Figure 6-34. The USGS DRG for San Francisco, imported into GRASS