|
@@ -28,7 +28,7 @@ changed to NULL (if() condition).
|
|
|
|
|
|
<div class="code"><pre>
|
|
<div class="code"><pre>
|
|
# import of all channels (each channel will become a GRASS raster map):
|
|
# import of all channels (each channel will become a GRASS raster map):
|
|
-r.external /home/user/data/maps/059100.tif out=ortho
|
|
|
|
|
|
+r.external input=/home/user/data/maps/059100.tif output=ortho
|
|
g.region raster=ortho.3 -p
|
|
g.region raster=ortho.3 -p
|
|
d.rgb r=ortho.1 g=ortho.2 b=ortho.3
|
|
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
|
|
r.composite r=ortho.1 g=ortho.2 b=ortho.3 output=ortho.rgb
|
|
@@ -42,19 +42,19 @@ likewise, results can be written out to standard raster formats with
|
|
|
|
|
|
<div class="code"><pre>
|
|
<div class="code"><pre>
|
|
# register GeoTIFF file to be used in current mapset:
|
|
# register GeoTIFF file to be used in current mapset:
|
|
-r.external terra_lst1km20030314.LST_Day.tif out=modis_celsius
|
|
|
|
|
|
+r.external input=terra_lst1km20030314.LST_Day.tif output=modis_celsius
|
|
|
|
|
|
# define output directory for files resulting from GRASS calculation:
|
|
# define output directory for files resulting from GRASS calculation:
|
|
r.external.out directory=$HOME/gisoutput/ format="GTiff"
|
|
r.external.out directory=$HOME/gisoutput/ format="GTiff"
|
|
-
|
|
|
|
-# perform GRASS calculation (here: extract pixels > 20 deg C)
|
|
|
|
|
|
+
|
|
|
|
+# perform GRASS calculation (here: extract pixels > 20 deg C)
|
|
# this stores the output map directly as GeoTIFF:
|
|
# this stores the output map directly as GeoTIFF:
|
|
-r.mapcalc "warm.tif = if(modis_celsius > 20.0, modis_celsius, null() )"
|
|
|
|
-
|
|
|
|
|
|
+r.mapcalc "warm.tif = if(modis_celsius > 20.0, modis_celsius, null() )"
|
|
|
|
+
|
|
# cease GDAL output connection and turn back to write GRASS raster files:
|
|
# cease GDAL output connection and turn back to write GRASS raster files:
|
|
r.external.out -r
|
|
r.external.out -r
|
|
-
|
|
|
|
-# now use the result elsewhere
|
|
|
|
|
|
+
|
|
|
|
+# now use the resulting file elsewhere
|
|
gdalinfo $HOME/gisoutput/warm.tif
|
|
gdalinfo $HOME/gisoutput/warm.tif
|
|
</pre></div>
|
|
</pre></div>
|
|
|
|
|