### Sidebar

spatial-ecology.org

Trainings:

Learn:

Data:

Community:
teachers
students
projects
Matera 2015
Vancouver 2015
Santa Barbara 2015
Site design
Hands on:
Installations
admin

Donations
Spatial Ecology is a non profit organisation based in the UK. About us. Please help us in our activity
USD

GBP

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
wiki/exercise2.txt · Last modified: 2020/07/17 06:39 (external edit)