User Tools

Site Tools


wiki:exercise2a

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

wiki:exercise2a [2017/12/05 22:53] (current)
Line 1: Line 1:
 +====== 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:
 +
 +<code bash>
 +mkdir -p ${OUTPUTDIR}/​exercise2
 +</​code>​
 +
 +__Extract Landsat profiles from forest in Cornwall (mean value for each polygon)__
 +
 +<code bash>
 +pkextract -i ${LANDSATDIR}/​${LANDSATIMG} -s ${OUTPUTDIR}/​exercise1/​cornwall_forest_3035.shp -o ${OUTPUTDIR}/​exercise2/​forest_landsat.shp -r mean -polygon
 +</​code>​
 +\\
 +__Calculate statistics using pkstatogr__
 +
 +<code bash>
 +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
 +</​code>​
 +\\
 +__Extract Landsat profiles from water in Cornwall (mean value for each polygon)__
 +<code bash>
 +pkextract -i ${LANDSATDIR}/​${LANDSATIMG} -s ${OUTPUTDIR}/​exercise1/​cornwall_water_3035.shp -o ${OUTPUTDIR}/​exercise2/​water_landsat.shp -r mean -polygon
 +</​code>​
 +\\
 +__Calculate statistics using pkstatogr__
 +
 +<code bash>
 +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
 +</​code>​
 +\\
 +__Plot the profiles in gnuplot__ (click [[gnuplot2a | here]] for the code)
 +
 +Question: Why is is this signature different than a typical vegetation reflectance spectrum?
 +
 +<note warning>​Standard Landsat images are not atmospherically corrected</​note> ​
 +
 +Consult http://​www.ncaveo.ac.uk/​special_topics/​atmospheric_correction/​example2/​
 +
  
wiki/exercise2a.txt ยท Last modified: 2017/12/05 22:53 (external edit)