Geoscience Reference
In-Depth Information
-A LC82070232013_composite.tif --A_band=4
Name and band index of first input raster dataset. Defines red band (see Table 17.1).
-B LC82070232013_composite.tif --B_band=5
Name and band index of second input raster dataset. Defines near infrared band
(see Table 17.1).
--outfile=LC82070232013_ndvi.tif
Name of the output raster data that will contain the result of the raster calculation.
--type=UInt16
Output data is of type unsigned (short) integer.
--calc="(B>A)*(0.5+10000.0*(B-A)/(B+A))+(B<=A)*0"
Calculates the NDVI in case the value for near infrared is greater than red. Else
we set the output value to 0. The NDVI value ranges from -1 to +1, with strictly
positive numbers for vegetation cover. Since we are only interested in vegetation
cover, we set negative values to 0. The NDVI values are scaled with a factor of
10
,
000 to convert the floating point result to integer.
To build the mask, we must estimate a lower threshold value for forest pixels. We
will therefore analyze the NDVI values from the forest sample in the training vector
using the utility pkextract (see Sect. 12.3 ) .
pkextract -i LC82070232013_ndvi.tif -s training.sqlite -ln
forest -bn ndvi -r median -t 50 -f SQLite -o
forest_ndvi.sqlite
-i LC82070232013_ndvi.tif
Name of the input raster dataset with the NDVI values.
-s training.sqlite
Name of the sample vector file with the features for which the pixel values will
be extracted.
-ln forest
We specify the name of the layer in the sample vector file (by default all layers
will be selected).
-bn ndvi
Name of the new attribute in the output vector file in which the extracted NDVI
values will be written.
-r median
We will extract the median pixel value in the input raster dataset for each multi-
polygon.
-t 50
Extract only 50% of the multipolygon features. If you want to reduce the process-
ing time, you can further decrease the threshold to reduce the number of extracted
polygons.
 
 
Search WWH ::




Custom Search