.TH r.external 1grass "" "GRASS 8.3.2" "GRASS GIS User's Manual" .SH NAME \fI\fBr.external\fR\fR \- Links GDAL supported raster data as a pseudo GRASS raster map. .SH KEYWORDS raster, import, external .SH SYNOPSIS \fBr.external\fR .br \fBr.external \-\-help\fR .br \fBr.external\fR [\-\fBfojeahvtmr\fR] [\fBinput\fR=\fIname\fR] [\fBsource\fR=\fIname\fR] \fBoutput\fR=\fIname\fR [\fBband\fR=\fIinteger\fR] [\fBtitle\fR=\fIphrase\fR] [\-\-\fBoverwrite\fR] [\-\-\fBhelp\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] [\-\-\fBui\fR] .SS Flags: .IP "\fB\-f\fR" 4m .br List supported formats and exit .IP "\fB\-o\fR" 4m .br Override projection check (use current location\(cqs projection) .br Assume that the dataset has same projection as the current location .IP "\fB\-j\fR" 4m .br Perform projection check only and exit .IP "\fB\-e\fR" 4m .br Extend region extents based on new dataset .br Also updates the default region if in the PERMANENT mapset .IP "\fB\-a\fR" 4m .br Auto\-adjustment for lat/lon .br Attempt to fix small precision errors in resolution and extents .IP "\fB\-h\fR" 4m .br Flip horizontally .IP "\fB\-v\fR" 4m .br Flip vertically .IP "\fB\-t\fR" 4m .br List available bands including band type in dataset and exit .br Format: band number,type,projection check .IP "\fB\-m\fR" 4m .br Read data range from metadata .br WARNING: metadata are sometimes approximations with wrong data range .IP "\fB\-r\fR" 4m .br Create fast link without data range .br WARNING: some modules do not work correctly without known data range .IP "\fB\-\-overwrite\fR" 4m .br Allow output files to overwrite existing files .IP "\fB\-\-help\fR" 4m .br Print usage summary .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .IP "\fB\-\-ui\fR" 4m .br Force launching GUI dialog .SS Parameters: .IP "\fBinput\fR=\fIname\fR" 4m .br Name of raster file to be linked .IP "\fBsource\fR=\fIname\fR" 4m .br Name of non\-file GDAL data source .IP "\fBoutput\fR=\fIname\fR \fB[required]\fR" 4m .br Name for output raster map .IP "\fBband\fR=\fIinteger\fR" 4m .br Band to select (default is all bands) .IP "\fBtitle\fR=\fIphrase\fR" 4m .br Title for resultant raster map .SH DESCRIPTION \fIr.external\fR allows a user to link a GDAL supported raster file to a binary raster map layer, from any GDAL supported raster map format, with an optional title. The file is not imported but just registered as GRASS raster map. .SH NOTES In essence, \fIr.external\fR creates a read\-only link to the original dataset which is only valid if the original dataset remains at the originally indicated directory and filename. .SH NULL data handling GDAL\-linked (\fIr.external\fR) maps do not have or use a NULL bitmap, hence \fIr.null\fR cannot manipulate them directly. Here NULL cells are those whose value matches the value reported by the GDALGetRasterNoDataValue() function. To apply the GDAL\-linked the user need to either create a MASK (e.g. with \fIr.mask\fR) and then \(dqapply\(dq it using e.g. \fIr.resample\fR, or use \fIr.mapcalc\fR to create a copy with the appropriate categories changed to NULL (if() condition). .SH EXAMPLES .SS RGB Orthophoto from GeoTIFF .br .nf \fC # import of all channels (each channel will become a GRASS raster map): r.external input=/home/user/data/maps/059100.tif output=ortho g.region raster=ortho.3 \-p d.rgb r=ortho.1 g=ortho.2 b=ortho.3 r.composite r=ortho.1 g=ortho.2 b=ortho.3 output=ortho.rgb \fR .fi .SS Processing workflow without data import and export External raster maps to be processed can be directly linked using \fIr.external\fR; likewise, results can be written out to standard raster formats with \fIr.external.out\fR (GDAL supported formats): .br .nf \fC # 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=\(dqGTiff\(dq # perform GRASS calculation (here: extract pixels > 20 deg C) # this stores the output map directly as GeoTIFF: r.mapcalc \(dqwarm.tif = if(modis_celsius > 20.0, modis_celsius, null() )\(dq # 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 \fR .fi .SH REFERENCES GDAL Pages: http://www.gdal.org/ .br .SH SEE ALSO \fI r.import, r.in.gdal, r.external.out \fR .PP \fI v.import, v.in.ogr, v.external, v.external.out \fR .SH AUTHOR Glynn Clements .SH SOURCE CODE .PP Available at: r.external source code (history) .PP Accessed: Friday Mar 08 07:34:28 2024 .PP Main index | Raster index | Topics index | Keywords index | Graphical index | Full index .PP © 2003\-2024 GRASS Development Team, GRASS GIS 8.3.2 Reference Manual