1r.out.gdal(1)                 Grass User's Manual                r.out.gdal(1)
2
3
4

NAME

6       r.out.gdal  - Exports GRASS raster map into GDAL supported formats.
7

KEYWORDS

9       raster, export
10

SYNOPSIS

12       r.out.gdal
13       r.out.gdal help
14       r.out.gdal [-l]  [input=name]   [format=string]   [type=string]   [out‐
15       put=name]                               [createopt=string[,string,...]]
16       [metaopt=string[,string,...]]   [nodata=float]   [--verbose]  [--quiet]
17
18   Flags:
19       -l
20           List supported output formats
21
22       --verbose
23           Verbose module output
24
25       --quiet
26           Quiet module output
27
28   Parameters:
29       input=name
30           Name of raster map (or group) to export
31
32       format=string
33           GIS format to write (case sensitive, see also -l flag)
34           Options:
35           VRT,GTiff,NITF,HFA,ELAS,AAIGrid,DTED,PNG,JPEG,MEM,GIF,FITS,XPM,BMP,PCIDSK,ILWIS,SGI,SRTMHGT,Lev‐
36           eller,Terra‐
37           gen,GMT,netCDF,HDF4Image,ERS,JPEG2000,FIT,RMF,RST,INGR,GSAG,GSBG,R,PNM,ENVI,EHdr,PAux,MFF,MFF2,BT,IDA,USGS‐
38           DEM,ADRG,BLX,Rasterlite,SAGA
39           Default: GTiff
40
41       type=string
42           File type
43           Options:
44           Byte,Int16,UInt16,UInt32,Int32,Float32,Float64,CInt16,CInt32,CFloat32,CFloat64
45
46       output=name
47           Name for output raster file
48
49       createopt=string[,string,...]
50           Creation  option  to the output format driver. Multiple options may
51           be listed.
52
53       metaopt=string[,string,...]
54           Metadata key passed on the output dataset if possible
55
56       nodata=float
57           Assign a specified nodata value to output bands
58

DESCRIPTION

60       r.out.gdal allows a user to export a GRASS raster map  layer  into  any
61       GDAL  supported raster map format.  For possible metaopt parameters see
62       the 'supported formats' pages of GDAL.  The createopt may  be  used  to
63       create TFW or World files ("TFW=YES", "WORLDFILE=ON").
64
65       r.out.gdal  also  supports  the  export  of multiband rasters through a
66       group (created e.g. with i.group), when the group's name is entered  as
67       input.
68

SUPPORTED RASTER FORMATS

70       The  set  of  supported raster formats written by r.out.gdal depends on
71       the local GDAL installation. Available may be (incomplete list):
72
73
74         AAIGrid: Arc/Info ASCII Grid
75         BMP: MS Windows Device Independent Bitmap
76         BSB: Maptech BSB Nautical Charts
77         DTED: DTED Elevation Raster
78         ELAS: ELAS
79         ENVI: ENVI .hdr Labelled
80         FIT: FIT Image
81         GIF: Graphics Interchange Format (.gif)
82         GTiff: GeoTIFF
83         HDF4Image: HDF4 Dataset
84         HFA: Erdas Imagine Images (.img)
85         JPEG2000: JPEG-2000 part 1 (ISO/IEC 15444-1)
86         JPEG: JPEG JFIF
87         MEM: In Memory Raster
88         MFF2: Atlantis MFF2 (HKV) Raster
89         MFF: Atlantis MFF Raster
90         NITF: National Imagery Transmission Format
91         PAux: PCI .aux Labelled
92         PCIDSK: PCIDSK Database File
93         PNG: Portable Network Graphics
94         PNM: Portable Pixmap Format (netpbm)
95         VRT: Virtual Raster
96         XPM: X11 PixMap Format
97
98

NOTES

100       When writing out GeoTIFF format for users of ESRI software or ImageMag‐
101       ick,  the  band  interleaving  should be switched to pixel interleaving
102       using createopt="INTERLEAVE=PIXEL".
103
104       To  specify  multiple  options  use  a  comma  separated   list   (cre‐
105       ateopt="TFW=YES,COMPRESS=DEFLATE").
106
107       Out of the GDAL data types, the closest match for GRASS CELL, FCELL and
108       DCELL rasters are respectively Int32, Float32 and  Float64.  These  are
109       not  exact  equivalents,  but  they will preserve the max possible data
110       range and number of decimal places for  each  respective  GRASS  raster
111       data  type. Please keep in mind, that not all CELL rasters will require
112       Int32 - e.g., 0-255 CELL raster are covered by the Byte type  as  well.
113       Moreover, some GDAL-supported formats do not support all the data types
114       possible in GDAL and GRASS. Use r.info to check the data type and range
115       for  your  GRASS  raster,  refer to specific format documentation (GDAL
116       website, format vendor's docs) and e.g. the Wikipedia  article  Typical
117       boundaries of primitive integral types for details.
118

EXAMPLES

120   Export the integer raster roads map to GeoTIFF format:
121
122       r.out.gdal input=roads output=roads.tif type=UInt16
123
124
125   Export a DCELL raster map in GeoTIFF format suitable for ESRI software:
126
127       r.out.gdal   in=elevation.10m   out=ned_elev10m.tif  type=Float64  cre‐
128       ateopt="INTERLEAVE=PIXEL,TFW=YES"
129
130
131   Export the floating point raster elevation map to ERDAS/IMG format:
132
133       r.out.gdal   input=elevation.10m    output=elev_dem10.img    format=HFA
134       type=Float32
135
136
138                      "ERROR  6:  SetColorInterpretation()  not  supported for
139                     this dataset.": This may indicate that  the  color  table
140                     was  not written properly. But usually it will be correct
141                     and the message can be ignored.
142
143                      "ERROR  6:  SetNoDataValue()  not  supported  for   this
144                     dataset.":  The  selected  output format does not support
145                     "no data". It is recommended to use  a  different  output
146                     format.
147
148                      "Warning  1:  Lost  metadata  writing to GeoTIFF ... too
149                     large to fit in tag.": The color table metadata  are  too
150                     large.  It  is recommended to use a different output for‐
151                     mat.
152

SEE ALSO

154       The GDAL supported formats page.
155        r.out.ascii, r.out.arc, r.out.bin,  r.out.mat,  r.out.png,  r.out.ppm,
156       r.out.tiff
157       r.out.gdal.sh (old shell script version using gdal_translate)
158

REFERENCES

160       GDAL Pages: http://www.gdal.org
161

AUTHOR

163       Vytautas Vebra (oliver4grass at gmail.com)
164
165       Last changed: $Date: 2007-10-11 07:27:27 +0200 (Thu, 11 Oct 2007) $
166
167       Full index
168
169       © 2003-2008 GRASS Development Team
170
171
172
173GRASS 6.3.0                                                      r.out.gdal(1)
Impressum