r.external.out.html 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <h2>DESCRIPTION</h2>
  2. <em>r.external.out</em> instructs GRASS to write raster maps as data
  3. files (e.g. GeoTIFF) using GDAL.
  4. <h2>NOTES</h2>
  5. A relative directory path (parameter <em>directory</em>) is interpreted
  6. relative to the current mapset directory, not the current directory where
  7. the command was launched. An unspecified or empty directory (which will
  8. occur if the user passes a simple filename for <em>output</em>) results
  9. in the output file being placed in the "gdal/" subdirectory of the
  10. current mapset directory.
  11. <h2>EXAMPLE</h2>
  12. The module <em>r.external.out</em> can be used along with
  13. <em>r.external</em> to process external geodata in GRASS
  14. while writing out the results directly in GeoTIFF:
  15. <div class="code"><pre>
  16. # register GeoTIFF file in GRASS database:
  17. r.external terra_lst1km20030314.LST_Day.tif out=modis_celsius
  18. # define output directory for files resulting from GRASS calculation:
  19. r.external.out $HOME/gisoutput/
  20. # do something (here: extract pixels &gt; 20°C), write output directly as GeoTIFF:
  21. r.mapcalc "warm.tif = if(modis_celsius &gt; 20, modis_celsius, null() )"
  22. # cease GDAL output connection and turn back to write GRASS raster files:
  23. r.external.out -r
  24. # use the result elsewhere
  25. qgis $HOME/gisoutput/warm.tif
  26. </pre></div>
  27. <h2>SEE ALSO</h2>
  28. <em>
  29. <a href="r.in.gdal.html">r.in.gdal</a>,
  30. <a href="r.out.gdal.html">r.out.gdal</a>,
  31. <a href="r.external.html">r.external</a>
  32. </em>
  33. <h2>REFERENCES</h2>
  34. GDAL Pages: <a href="http://www.gdal.org">http://www.gdal.org/</a><br>
  35. <h2>AUTHOR</h2>
  36. Glynn Clements
  37. <p><i>Last changed: $Date$</i>