r.out.gdal

Langue: en

Autres versions - même langue

Version: 372482 (fedora - 01/12/10)

Section: 1 (Commandes utilisateur)

NAME

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

KEYWORDS

raster, export

SYNOPSIS

r.out.gdal
r.out.gdal help
r.out.gdal [-l] [input=name] [format=string] [type=string] [output=name] [createopt=string[,string,...]] [metaopt=string[,string,...]] [nodata=float] [--verbose] [--quiet]

Flags:

-l

List supported output formats
--verbose

Verbose module output
--quiet

Quiet module output

Parameters:

input=name

Name of raster map (or group) to export
format=string

GIS format to write (case sensitive, see also -l flag)
Options: VRT,GTiff,NITF,HFA,ELAS,AAIGrid,DTED,PNG,JPEG,MEM,GIF,FITS,XPM,BMP,PCIDSK,ILWIS,SGI,SRTMHGT,Leveller,Terragen,GMT,netCDF,HDF4Image,ERS,JPEG2000,FIT,RMF,RST,INGR,GSAG,GSBG,R,PNM,ENVI,EHdr,PAux,MFF,MFF2,BT,IDA,USGSDEM,ADRG,BLX,Rasterlite,SAGA
Default: GTiff
type=string

File type
Options: Byte,Int16,UInt16,UInt32,Int32,Float32,Float64,CInt16,CInt32,CFloat32,CFloat64
output=name

Name for output raster file
createopt=string[,string,...]

Creation option to the output format driver. Multiple options may be listed.
metaopt=string[,string,...]

Metadata key passed on the output dataset if possible
nodata=float

Assign a specified nodata value to output bands

DESCRIPTION

r.out.gdal allows a user to export a GRASS raster map layer into any GDAL supported raster map format. For possible metaopt parameters see the 'supported formats' pages of GDAL. The createopt may be used to create TFW or World files ("TFW=YES", dqWORLDFILE=ON").

r.out.gdal also supports the export of multiband rasters through a group (created e.g. with i.group), when the group's name is entered as input.

SUPPORTED RASTER FORMATS

The set of supported raster formats written by r.out.gdal depends on the local GDAL installation. Available may be (incomplete list):



  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

NOTES

When writing out GeoTIFF format for users of ESRI software or ImageMagick, the band interleaving should be switched to pixel interleaving using createopt="INTERLEAVE=PIXEL".

To specify multiple options use a comma separated list (createopt="TFW=YES,COMPRESS=DEFLATE").

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 type as well. Moreover, some GDAL-supported formats do not support all the data types possible in GDAL and GRASS. Use r.info to check the data type and range for your GRASS raster, refer to specific format documentation (GDAL website, format vendor's docs) and e.g. the Wikipedia article Typical boundaries of primitive integral types for details.

EXAMPLES

Export the integer raster roads map to GeoTIFF format:


r.out.gdal input=roads output=roads.tif type=UInt16

Export a DCELL raster map in GeoTIFF format suitable for ESRI software:


r.out.gdal in=elevation.10m out=ned_elev10m.tif type=Float64 createopt="INTERLEAVE=PIXEL,TFW=YES"

Export the floating point raster elevation map to ERDAS/IMG format:


r.out.gdal input=elevation.10m output=elev_dem10.img format=HFA type=Float32

 "ERROR 6: SetColorInterpretation() not supported for this dataset.": This may indicate that the color table was not written properly. But usually it will be correct and the message can be ignored.

 "ERROR 6: SetNoDataValue() not supported for this dataset.": The selected output format does not support "no data". It is recommended to use a different output format.

 "Warning 1: Lost metadata writing to GeoTIFF ... too large to fit in tag.": The color table metadata are too large. It is recommended to use a different output format.

SEE ALSO

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

REFERENCES

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

AUTHOR

Vytautas Vebra (oliver4grass at gmail.com)

Last changed: $Date: 2007-10-11 07:27:27 +0200 (Thu, 11 Oct 2007) $

Full index

© 2003-2008 GRASS Development Team