Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
r.external.out(1)	    GRASS GIS User's Manual	     r.external.out(1)

NAME
       r.external.out	-  Redirects  raster output to file utilizing GDAL li-
       brary rather than storing in GRASS raster format.

KEYWORDS
       raster, export, output, external

SYNOPSIS
       r.external.out
       r.external.out --help
       r.external.out [-frp] directory=path  [extension=string]	 format=string
       [options=string[,string,...]]	  [--help]    [--verbose]    [--quiet]
       [--ui]

   Flags:
       -f
	   List	supported formats and exit

       -r
	   Cease using GDAL and	revert to native output

       -p
	   Print current status

       --help
	   Print usage summary

       --verbose
	   Verbose module output

       --quiet
	   Quiet module	output

       --ui
	   Force launching GUI dialog

   Parameters:
       directory=pathA [required]
	   Name	of output directory

       extension=string
	   Extension for output	files

       format=stringA [required]
	   Format of output files
	   Options: VRT, GTiff,	COG, NITF,  HFA,  ELAS,	 AAIGrid,  DTED,  PNG,
	   JPEG,  MEM,	GIF,  XPM, BMP,	PCIDSK,	PCRaster, ILWIS, SGI, SRTMHGT,
	   Leveller, Terragen, ISIS3, ISIS2,  PDS4,  VICAR,  ERS,  FIT,	 GRIB,
	   JPEG2000,  RMF,  RST,  INGR,	GSAG, GSBG, GS7BG, R, KMLSUPEROVERLAY,
	   PDF,	CALS, MRF, PNM,	PAux, MFF, MFF2, BT, LAN, IDA, LCP, GTX, NTv2,
	   CTable2,  KRO,  ROI_PAC, RRASTER, BYN, ARG, USGSDEM,	NWT_GRD, ADRG,
	   BLX,	SAGA, XYZ, HF2,	ZMap, SIGDEM, ENVI, EHdr, ISCE

       options=string[,string,...]
	   Creation options

DESCRIPTION
       r.external.out instructs	GRASS  GIS  to	write  subsequently  generated
       raster  maps as data files (e.g.	GeoTIFF) using GDAL instead of storing
       them in GRASS raster format in the current mapset.

       Any new raster map is immediately written out through GDAL as a file.

NOTES
       A relative directory path (parameter directory) is interpreted relative
       to  the	current	 mapset	directory, not the current directory where the
       command was launched. An	unspecified or empty directory (which will oc-
       cur  if	the  user  passes a simple filename for	output)	results	in the
       output file being placed	in the "gdal/"	subdirectory  of  the  current
       mapset directory.

EXAMPLES
   Storing results from	raster data analysis directly as GeoTIFF
       The  module  r.external.out is used to write out	processing results di-
       rectly in GeoTIFF format	(any GDAL supported format can be used here):
       # define	output directory for files resulting from GRASS	calculation(s)
       # and target format:
       mkdir $HOME/gisoutput/
       # hint: the create options are not mandatory
       r.external.out directory=$HOME/gisoutput/ format="GTiff"	option="BIGTIFF=YES,COMPRESS=DEFLATE"
       # prepare sample	analysis
       g.region	raster=elevation -p
       # perform GRASS calculation (here: filter by height, write > 120m, NULL otherwise)
       # this will store the output map	directly as GeoTIFF, so	we use .tif extension:
       r.mapcalc "elev_filt.tif	= if(elevation > 120.0,	elevation, null() )"
       # ...the	"elev_filt.tif"	is immediately written.
       # cease GDAL output connection and turn back to write out GRASS raster files:
       r.external.out -r
       # verify	resulting file
       gdalinfo	$HOME/gisoutput/elev_filt.tif

   Complete workflow using only	external geodata while processing in GRASS GIS
       The module r.external.out can be	used along with	r.external to  process
       external	 geodata  in  GRASS  while writing out the results directly in
       GeoTIFF:
       # register GeoTIFF file to be used in current mapset:
       r.external input=terra_lst1km20030314.LST_Day.tif output=modis_celsius
       # define	output directory for files resulting from GRASS	calculation:
       r.external.out directory=$HOME/gisoutput/ format="GTiff"
       # perform GRASS calculation (here: extract pixels > 20 deg C)
       # this stores the output	map directly as	GeoTIFF:
       r.mapcalc "warm.tif = if(modis_celsius >	20.0, modis_celsius, null() )"
       # cease GDAL output connection and turn back to write GRASS raster files:
       r.external.out -r
       # now use the resulting file elsewhere
       gdalinfo	$HOME/gisoutput/warm.tif

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

SEE ALSO
	r.in.gdal, r.out.gdal, r.external

AUTHOR
       Glynn Clements

SOURCE CODE
       Available at: r.external.out source code	(history)

       Main index | Raster index | Topics index	| Keywords index  |  Graphical
       index | Full index

       A(C) 2003-2020 GRASS Development	Team, GRASS GIS	7.8.4 Reference	Manual

GRASS 7.8.4						     r.external.out(1)

NAME | KEYWORDS | SYNOPSIS | DESCRIPTION | NOTES | EXAMPLES | REFERENCES | SEE ALSO | AUTHOR | SOURCE CODE

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=r.external.out&sektion=1&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help