Geoscience Reference
In-Depth Information
the polygon features in the sample. 5 By setting the option -polygon , the output
vector dataset will contain polygon features instead of points (see also Table 12.1 ).
pkextract -i LC82070232013_features.tif -s training.sqlite -r
median -polygon -srcnodata 0 -bndnodata 0 -t 50 -f SQLite
-o training_features.sqlite
Apart from preparing a training set for a supervised classifier, pkextract can
also be used to create a subset of a raster file for statistical analysis. In the following
example, we analyze a time series of remote sensing data acquired over the North of
Italy. We have a Spatialite vector file with the administrative boundaries of Italy and
each administrative region is stored as a different layer.
We begin by overlaying the polygons with the administrative regions on a raster
filewith 12 bands (see Fig. 12.3 ). Each band contains a vegetation index, derived from
the monthly MODIS composites for every month in 2010 (see also Appendix A.2.1).
The vegetation index is calculated as the normalized difference vegetation index
(NDVI (Rouse et al. 1973)). By extracting the 12 bands for the vector layers, we
obtain a time series of the NDVI values. For instance, one of the layers is milano ,
which contains the administrative region of Milan. This is an area with a lot of
commercial and industrial activities. Another layer is lodi , which is predominantly
covered with agricultural land. With the utility pkextract , we can extract the grid
cell values for both layers by multiple use of the option -ln .
ndvi
10
20
30
40
50
60
70
80
Milano
Lodi
0
25
50 km
Fig. 12.3 Polygons defining the administrative region of Milan and Lodi, overlaid on the MODIS
derived NDVI raster (July image)
5 Due to topology conflicts in some of the polygons, the extraction process can produce some
error messages. To overcome this problem, you can try to simplify the polygons (using ogr2ogr
-simplify with a specification of a tolerance), or simply ignore these error messages at the risk
of not selecting these polygons.
 
 
Search WWH ::




Custom Search