User Tools

Site Tools


wiki:contest_create_training

Create training.txt

Convert the ENVI proprietary ASCII to simple ASCII text file
    cat labels.txt | while read class label;do sed -n "/$label/,/^$/p" 2013_IEEE_GRSS_DF_Contest_Samples_TR.txt | sed -e '/;/d' -e '/^$/d'|awk -v C=$class '{print $1,$4,$5,C}'; done > training.txt

Create ogr vector file

    pkascii2ogr -i training.txt -o 2013_IEEE_GRSS_DF_Contest_Samples_TR.shp -x 2 -y 1 -p epsg:4326 -n id -ot Integer -n label -ot Integer 

Re-project vector file

    ogr2ogr -s_srs epsg:4326 -t_srs epsg:26915 2013_IEEE_GRSS_DF_Contest_Samples_TR_26915.shp 2013_IEEE_GRSS_DF_Contest_Samples_TR.shp

Create training vector file with CASI bands as attributes

    pkextract -i 2013_IEEE_GRSS_DF_Contest_CASI.tif -s 2013_IEEE_GRSS_DF_Contest_Samples_TR_26915.shp -o training_casi.shp

wiki/contest_create_training.txt · Last modified: 2017/12/05 22:53 (external edit)