123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <h2>DESCRIPTION</h2>
- <em>r.external</em> 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.
- <h2>NOTES</h2>
- In essence, <em>r.external</em> 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.
- <h2>NULL data handling</h2>
- GDAL-linked (<em>r.external</em>) maps do not have or use a NULL
- bitmap, hence <em>r.null</em> 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 <em>r.mask</em>) and then "apply" it using e.g. <em>r.resample</em>,
- or use <em>r.mapcalc</em> to create a copy with the appropriate categories
- changed to NULL (if() condition).
- <h2>EXAMPLES</h2>
- <h3>RGB Orthophoto from GeoTIFF</h3>
- <div class="code"><pre>
- # 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
- </pre></div>
- <h3>Processing workflow without data import and export</h3>
- External raster maps to be processed can be directly linked using <em>r.external</em>;
- likewise, results can be written out to standard raster formats with
- <em>r.external.out</em> (GDAL supported formats):
- <div class="code"><pre>
- # 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
- </pre></div>
- <h2>REFERENCES</h2>
- GDAL Pages: <a href="http://www.gdal.org">http://www.gdal.org/</a><br>
- <h2>SEE ALSO</h2>
- <em>
- <a href="r.import.html">r.import</a>,
- <a href="r.in.gdal.html">r.in.gdal</a>,
- <a href="r.external.out.html">r.external.out</a>
- </em>
- <p>
- <em>
- <a href="v.import.html">v.import</a>,
- <a href="v.in.ogr.html">v.in.ogr</a>,
- <a href="v.external.html">v.external</a>,
- <a href="v.external.out.html">v.external.out</a>
- </em>
- <h2>AUTHOR</h2>
- Glynn Clements
- <p>
- <i>Last changed: $Date$</i>
|