User Tools

Site Tools


wiki:exercise2

Exercise 2a: Extract Landsat profiles from vector

In this exercise, the following tools will be used:

  • pktools: pkextract and pkogrstat
  • awk (basic)

Create a directory for this exercise:

mkdir -p ${OUTPUTDIR}/exercise2

Extract Landsat profiles from forest in Cornwall (mean value for each polygon)

pkextract -i ${LANDSATDIR}/${LANDSATIMG} -s ${OUTPUTDIR}/exercise1/cornwall_forest_3035.shp -o ${OUTPUTDIR}/exercise2/forest_landsat.shp -r mean -polygon


Calculate statistics using pkstatogr

pkstatogr -i ${OUTPUTDIR}/exercise2/forest_landsat.shp -n B0 -n B1 -n B2 -n B3 -n B4 -n B5 -n B6 -n B7 -mean -stdev| awk '{print $4,$6}' > ${OUTPUTDIR}/exercise2/forest_landsat_mean_stdev.txt


Extract Landsat profiles from water in Cornwall (mean value for each polygon)

pkextract -i ${LANDSATDIR}/${LANDSATIMG} -s ${OUTPUTDIR}/exercise1/cornwall_water_3035.shp -o ${OUTPUTDIR}/exercise2/water_landsat.shp -r mean -polygon


Calculate statistics using pkstatogr

pkstatogr -i ${OUTPUTDIR}/exercise2/water_landsat.shp -n B0 -n B1 -n B2 -n B3 -n B4 -n B5 -n B6 -n B7 -mean -stdev| awk '{print $4,$6}' > ${OUTPUTDIR}/exercise2/water_landsat_mean_stdev.txt


Plot the profiles in gnuplot (click here for the code)

Question: Why is is this signature different than a typical vegetation reflectance spectrum?

Standard Landsat images are not atmospherically corrected

Consult http://www.ncaveo.ac.uk/special_topics/atmospheric_correction/example2/

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