Skip to main content
Source Link

Why is this SRTM TIFF not visible in GRASS GIS 6.4.3?

I want to use interpolated SRTM data for Germany to generate an STL terrain map for use in a CFD application.

My SRTM data comes from the OpenDEM project. SRTM data normally has voids, but this data has been assembled from multiple tiles and the voids filled with other DEM data and through interpolation.

The DEM is in the form of a TIFF, which I am presuming is a GeoTIFF since I've yet to see any other GIS TIFF formats.

When I import the TIFF into GRASS, everything seems to work at first:

(Sat Aug 31 23:22:22 2013)                                                      
r.in.gdal input=/home/sfbosch/Documents/Quelle/OpenFOAM/GIS/srtm_germany_dtm/srtm_germany_dtm.tif output=srtm_germany_dtm
Projection of input dataset and current location appear to match
r.in.gdal complete. Raster map <srtm_germany_dtm> created.
(Sat Aug 31 23:22:28 2013) Command finished (5 sec)                             

The moment I try to make the layer visible in the Layer Manager, though, I get an error:

Command 'd.rast -o map=srtm_germany_dtm@PERMANENT' failed
Details: region for current mapset line 4: <north:
371149.387386>
run "g.region"

The image does not appear in the GIS Map Display window. My first thought was, I've imported the data incorrectly, or there's something wrong with it. But when I use QGIS with the GRASS plugin to access the very same layer and set Contrast Enhancement to "Stretch to MinMax", there it is (though I would like to know why the top half is so dark):

The GRASS SRTM layer in QGIS

Why does it work in one, and not the other? Unfortunately, it's not good enough that it works in QGIS -- I need to get this working in GRASS because the Python script I am using to generate the STL file depends on it.

One clue might be that, when I move the cursor over the (blank) Map Display window in GRASS after rendering the layer and getting the error message, I can't make any sense of the coordinates. They seem to be in some mish-mash of UTM and LatLon, and they are not consistent. The numbers jump all over the place.

If I get the region, here's what comes out:

(Sat Aug 31 23:49:02 2013)                                                      
g.region -p                                                                     
projection: 3 (Latitude-Longitude)
zone:       0
datum:      wgs84
ellipsoid:  wgs84
north:      56:00:01.5N
south:      0:59:58.5S
west:       0
east:       17E
nsres:      1
ewres:      1
rows:       57
cols:       17
cells:      969
(Sat Aug 31 23:49:02 2013) Command finished (0 sec)  

I'm using GRASS GIS 6.4.3, QGIS 1.8.0, GDAL 1.9.2 on Gentoo Linux 3.7.9-gentoo x86_64.