If you find this document usefull, please consider ordering a printed hardcopy!
GRASS GIS supports the import of many different raster formats. Generally, three format types should be considered.
Now, it is time to mention a property of GRASS GIS related to raster data import: raster maps are always imported with their original resolution and border coordinates but they are exported with the current resolution and border setting of the region (see chapter 7.1).
For importing non-georeferenced data there are two cases to be considered:
Table 7 gives a list of modules used to import raster data in different formats i.e. formats of other GIS systems as well as special formats of other remotesensing sectors.
| GRASS | Import |
|---|---|
| Module command | Raster format |
| r.in.ascii | GRASS ASCII |
| r.in.bin | BIL, GMT binary files, LANDSAT TM5 |
| r.in.gdal | ARC/INFO ASCII/Binary GRID, BIL, ERDAS (LAN, IMG), |
| USGS DOQ, JPEG, SAR CEOS, EOSAT, GeoTIFF, PPM/PNM, SDTS DEM, | |
| GIF, PNG | |
| (see also http://www.gdal.org/formats_list.html) |
Importing a GeoTiff file
The most frequently used module for importing raster data is r.in.gdal. As described in table
7, it is able to read and write many
different formats (r.out.gdal). As an example we will import a geo-referenced map in ERDAS IMG format. We have prepared a small ASTERDEM of
30 m resolution based on vector data of the city of
Osnabrueck. This is available on the GDF Hannover bR
(http://www.gdf-hannover.de/download).
r.in.gdal in=asterdem30m.img out=asterdem30m Projection of input dataset and current location appear to match. Proceeding with import... 100% CREATING SUPPORT FILES FOR asterdem30m COPYING COLOR TABLE FOR asterdem30m
With the flag -e a possibly necessary spacial extent of the location's definition will be achieved.
# Adapting the current region to the map: g.region rast=asterdem30m -p
The resulting map can be displayed using the Display Manager d.m or with the command d.rast. For this purpose, a GRASS monitor has to be started before with d.mon x0.
# Starting the Display Manager d.m& # Displaying the map in the prompt: d.mon x0 d.rast asterdem30m
If you find this document usefull, please consider ordering a printed hardcopy!