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

REFERENCES

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

SEE ALSO

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

AUTHOR

122       Glynn Clements
123

SOURCE CODE

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