<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>GRASS GIS: r.out.gdal.sh</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" href="grassdocs.css" type="text/css"> </head> <body bgcolor="white"> <img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade> <h2>NAME</h2> <em><b>r.out.gdal.sh</b></em> - Exports GRASS raster into GDAL supported formats. <h2>KEYWORDS</h2> raster, export <h2>SYNOPSIS</h2> <b>r.out.gdal.sh</b><br> <b>r.out.gdal.sh help</b><br> <b>r.out.gdal.sh</b> [-<b>lr</b>] [<b>input</b>=<em>string</em>] [<b>format</b>=<em>string</em>] [<b>type</b>=<em>string</em>] [<b>output</b>=<em>string</em>] [<b>createopt</b>=<em>string</em>[,<i>string</i>,...]] [<b>metaopt</b>=<em>string</em>[,<i>string</i>,...]] [--<b>verbose</b>] [--<b>quiet</b>] <h3>Flags:</h3> <DL> <DT><b>-l</b></DT> <DD>List supported output formats</DD> <DT><b>-r</b></DT> <DD>Region sensitive output</DD> <DT><b>--verbose</b></DT> <DD>Verbose module output</DD> <DT><b>--quiet</b></DT> <DD>Quiet module output</DD> </DL> <h3>Parameters:</h3> <DL> <DT><b>input</b>=<em>string</em></DT> <DD>Name of input raster map</DD> <DT><b>format</b>=<em>string</em></DT> <DD>GIS format to write (case sensitive, see also -l flag)</DD> <DD>Options: <em>AAIGrid,BMP,BSB,DTED,ELAS,ENVI,FIT,GIF,GTiff,HFA,JPEG,MEM,MFF,MFF2,NITF,PAux,PNG,PNM,VRT,XPM</em></DD> <DD>Default: <em>GTiff</em></DD> <DT><b>type</b>=<em>string</em></DT> <DD>File type</DD> <DD>Options: <em>Byte,Int16,UInt16,UInt32,Int32,Float32,Float64,CInt16,CInt32,CFloat32,CFloat64</em></DD> <DT><b>output</b>=<em>string</em></DT> <DD>Name for output file</DD> <DT><b>createopt</b>=<em>string[,<i>string</i>,...]</em></DT> <DD>Creation option to the output format driver. Multiple options may be listed</DD> <DT><b>metaopt</b>=<em>string[,<i>string</i>,...]</em></DT> <DD>Metadata key passed on the output dataset if possible</DD> </DL> <H2>DESCRIPTION</H2> WARNING: <B>This module is superseded and will be removed in future versions of GRASS. Use the much faster <em><A HREF="r.out.gdal.html">r.out.gdal</a></em> instead.</b> <EM>r.out.gdal.sh</EM> outputs GRASS raster maps into various GIS formats as supported by GDAL. This script is based on 'gdal_translate', it's parameters are similar to those of '<a href="http://www.gdal.org/gdal_utilities.html">gdal_translate</a>'. It requires the installation of either GDAL with GRASS support or of the GDAL-OGR-GRASS plugin which is available from the <a href="http://www.gdal.org">GDAL web site</a>. <p> For possible <em>metaopt</em> parameters see the 'supported formats' pages of GDAL. The <em>createopt</em> may be used to create TFW or World files ("TFW=YES", "WORLDFILE=ON"). <H2>SUPPORTED FORMATS</H2> The set of <a href="http://www.gdal.org/formats_list.html">supported formats</a> written by <EM>r.out.gdal.sh</EM> depend on the local GDAL installation. Available may be (incomplete list):<P> <pre> AAIGrid: Arc/Info ASCII Grid BMP: MS Windows Device Independent Bitmap BSB: Maptech BSB Nautical Charts DTED: DTED Elevation Raster ELAS: ELAS ENVI: ENVI .hdr Labelled FIT: FIT Image GIF: Graphics Interchange Format (.gif) GTiff: GeoTIFF HDF4Image: HDF4 Dataset HFA: Erdas Imagine Images (.img) JPEG2000: JPEG-2000 part 1 (ISO/IEC 15444-1) JPEG: JPEG JFIF MEM: In Memory Raster MFF2: Atlantis MFF2 (HKV) Raster MFF: Atlantis MFF Raster NITF: National Imagery Transmission Format PAux: PCI .aux Labelled PCIDSK: PCIDSK Database File PNG: Portable Network Graphics PNM: Portable Pixmap Format (netpbm) VRT: Virtual Raster XPM: X11 PixMap Format </pre> <H2>NOTES</H2> When writing out GeoTIFF format for users of ESRI software or ImageMagick, the band interleaving should be switched to pixel interleaving using <em>createopt="INTERLEAVE=PIXEL"</em>. Multiple options have to be specified as comma separated list (<em>createopt=TFW=YES,COMPRESS=DEFLATE</em>). <p> Out of the GDAL data types, the closest match for GRASS CELL, FCELL and DCELL rasters are respectively Int32, Float32 and Float64. These are not exact equivalents, but they will preserve the max possible data range and number of decimal places for each respective GRASS raster data type. Please keep in mind, that not all CELL rasters will require Int32 - e.g., 0-255 CELL raster are covered by the Byte <em>type</em> as well. Moreover, some GDAL-supported formats do not support all the data types possible in GDAL and GRASS. Use <em><a href="r.info">r.info</a></em> to check the data type and range for your GRASS raster, refer to specific format documentation (<a href="http://www.gdal.org/">GDAL website</a>, format vendor's docs) and e.g. the Wikipedia article <em><a href="http://en.wikipedia.org/wiki/C_syntax#Typical_boundaries_of_primitive_integral_types">Typical boundaries of primitive integral types</a></em> for details. <H2>EXAMPLE</H2> Export of the map 'elevation.dem' from the Spearfish data set: <div class="code"><pre> r.out.gdal.sh elevation.dem format=GTiff type=Int16 output=elev_dem.tif </pre></div> <H2>REFERENCES</H2> <a href="http://www.gdal.org/">GDAL library</a> <p> <a href="http://grass.gdf-hannover.de/wiki/Compile_and_install_GRASS_and_QGIS_with_GDAL/OGR_Plugin">Compile and install GRASS and QGIS with GDAL/OGR Plugin</a> <H2>SEE ALSO</H2> <EM><A HREF="r.out.arc.html">r.out.arc</A></EM>, <EM><A HREF="r.out.ascii.html">r.out.ascii</A></EM>, <EM><A HREF="r.out.tiff.html">r.out.tiff</A></EM> <H2>AUTHOR</H2> Markus Neteler, ITC-irst, Italy <p><i>Last changed: $Date: 2006-12-13 17:35:44 +0100 (Wed, 13 Dec 2006) $</i> <HR> <P><a href="index.html">Main index</a> - <a href="raster.html">raster index</a> - <a href="full_index.html">Full index</a></P> <P>© 2003-2008 <a href="http://grass.osgeo.org">GRASS Development Team</a></p> </body> </html>