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

NAME

6       r.external.out   -  Redirects  raster  output  to  file  utilizing GDAL
7       library rather than storing in GRASS raster format.
8

KEYWORDS

10       raster, export, output, external
11

SYNOPSIS

13       r.external.out
14       r.external.out --help
15       r.external.out [-frp] directory=path  [extension=string]  format=string
16       [options=string[,string,...]]      [--help]    [--verbose]    [--quiet]
17       [--ui]
18
19   Flags:
20       -f
21           List supported formats and exit
22
23       -r
24           Cease using GDAL and revert to native output
25
26       -p
27           Print current status
28
29       --help
30           Print usage summary
31
32       --verbose
33           Verbose module output
34
35       --quiet
36           Quiet module output
37
38       --ui
39           Force launching GUI dialog
40
41   Parameters:
42       directory=path [required]
43           Name of output directory
44
45       extension=string
46           Extension for output files
47
48       format=string [required]
49           Format of output files
50           Options: VRT, GTiff, NITF, HFA,  ELAS,  AAIGrid,  DTED,  PNG,  GTA,
51           JPEG,  MEM,  GIF,  FITS,  XPM,  BMP,  PCIDSK, PCRaster, ILWIS, SGI,
52           SRTMHGT, Leveller, Terragen, GMT, netCDF, HDF4Image, ISIS3,  ISIS2,
53           PDS4,  ERS,  JP2OpenJPEG, FIT, GRIB, JPEG2000, RMF, WMS, RST, INGR,
54           GSAG, GSBG,  GS7BG,  R,  KMLSUPEROVERLAY,  WEBP,  PDF,  Rasterlite,
55           MBTiles,  CALS, WMTS, MRF, PNM, PAux, MFF, MFF2, BT, LAN, IDA, LCP,
56           GTX, NTv2, CTable2, KRO, ROI_PAC, RRASTER, ARG,  USGSDEM,  NWT_GRD,
57           ADRG,  BLX,  PostGISRaster, SAGA, XYZ, HF2, ZMap, GPKG, ENVI, EHdr,
58           ISCE
59
60       options=string[,string,...]
61           Creation options
62

DESCRIPTION

64       r.external.out instructs GRASS  GIS  to  write  subsequently  generated
65       raster  maps as data files (e.g. GeoTIFF) using GDAL instead of storing
66       them in GRASS raster format in the current mapset.
67
68       Any new raster map is immediately written out through GDAL as a file.
69

NOTES

71       A relative directory path (parameter directory) is interpreted relative
72       to  the  current  mapset directory, not the current directory where the
73       command was launched. An unspecified or  empty  directory  (which  will
74       occur  if  the user passes a simple filename for output) results in the
75       output file being placed in the "gdal/"  subdirectory  of  the  current
76       mapset directory.
77

EXAMPLES

79   Storing results from raster data analysis directly as GeoTIFF
80       The  module  r.external.out  is  used  to  write out processing results
81       directly in GeoTIFF format (any  GDAL  supported  format  can  be  used
82       here):
83       # define output directory for files resulting from GRASS calculation(s)
84       # and target format:
85       mkdir $HOME/gisoutput/
86       r.external.out directory=$HOME/gisoutput/ format="GTiff"
87       # prepare sample analysis
88       g.region raster=elevation -p
89       # perform GRASS calculation (here: filter by height, write > 120m, NULL otherwise)
90       # this will store the output map directly as GeoTIFF, so we use .tif extension:
91       r.mapcalc "elev_filt.tif = if(elevation > 120.0, elevation, null() )"
92       # ...the "elev_filt.tif" is immediately written.
93       # cease GDAL output connection and turn back to write out GRASS raster files:
94       r.external.out -r
95       # verify resulting file
96       gdalinfo $HOME/gisoutput/elev_filt.tif
97
98   Complete workflow using only external geodata while processing in GRASS GIS
99       The  module r.external.out can be used along with r.external to process
100       external geodata in GRASS while writing out  the  results  directly  in
101       GeoTIFF:
102       # register GeoTIFF file to be used in current mapset:
103       r.external input=terra_lst1km20030314.LST_Day.tif output=modis_celsius
104       # define output directory for files resulting from GRASS calculation:
105       r.external.out directory=$HOME/gisoutput/ format="GTiff"
106       # perform GRASS calculation (here: extract pixels > 20 deg C)
107       # this stores the output map directly as GeoTIFF:
108       r.mapcalc "warm.tif = if(modis_celsius > 20.0, modis_celsius, null() )"
109       # cease GDAL output connection and turn back to write GRASS raster files:
110       r.external.out -r
111       # now use the resulting file elsewhere
112       gdalinfo $HOME/gisoutput/warm.tif
113

REFERENCES

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

SEE ALSO

118        r.in.gdal, r.out.gdal, r.external
119

AUTHOR

121       Glynn Clements
122
123       Last changed: $Date: 2017-02-28 17:48:37 +0100 (Tue, 28 Feb 2017) $
124

SOURCE CODE

126       Available at: r.external.out source code (history)
127
128       Main  index  | Raster index | Topics index | Keywords index | Graphical
129       index | Full index
130
131       © 2003-2019 GRASS Development Team, GRASS GIS 7.6.0 Reference Manual
132
133
134
135GRASS 7.6.0                                                  r.external.out(1)
Impressum