Geoscience Reference
In-Depth Information
us to study the effect of edge pixels in our accuracy assessment at a later stage and
differentiate between position and thematic errors.
When all points have been visited, save the result and make sure the projection is
maintained as EPSG:32629. 9
Using ogrinfo and the SQLite dialect, we add a new attribute “label” with the
class number corresponding to the raster forest map (i.e. forest
=
1, non-forest
=
2):
ogrinfo -dialect SQLite -sql "ALTER table sample ADD COLUMN
label Integer" sample.sqlite
ogrinfo -dialect SQLite -sql "UPDATE sample SET label=1 WHERE
description='forest'" sample.sqlite
ogrinfo -dialect SQLite -sql "UPDATE sample SET label=2 WHERE
description='noforest'" sample.sqlite
We create a new reference vector with two layers: one for valid and one for pixels
near the forest border. In case the sample vector does not correspond to the Landsat
image (EPSG:32629), you can still reproject now by defining the target coordinate
reference system.
ogr2ogr -t_srs epsg:32629 -f SQLite -nln valid -where "comment='valid'"
reference.sqlite sample.sqlite
-t_srs epsg:32629
Target coordinate reference system of output vector (input projection is read
from input).
-f SQLite
Format of output vector is SQLite.
-nln valid
Set new layer name to “valid”.
-where "comment='valid'"
Only select those feature with their comment attribute equal to “valid”.
reference.sqlite
Name of the output vector dataset.
sample.sqlite
name of the input vector dataset.
We create a second layer, named “border”, within the same vector dataset that
consist of pixels that have been identified as near the forest edge.
ogr2ogr -t_srs epsg:32629 -update -f SQLite -nln border -where "comment='
border'" reference.sqlite sample.sqlite
9 Opening an OpenLayer image can change the projection of the QGIS project.
 
Search WWH ::




Custom Search