Project

General

Profile

Download (1.1 KB) Statistics
| Branch: | Revision:
1
/* need to ensure that the aggregation boxes are consistent across the whole set of layers
2
/* so might need a setwindow here to enforce the correct location
3

    
4
/* Question about 1km Behrman version - should that be projected from 30" stats, or
5
/* should data be projected to Behrman and aggregated over 1km cell. Far from the equator
6
/* these will give quite different results
7

    
8
/* elevation - derive mean, min, max, std. dev, skew
9
elev_mean = aggregate(srtm_or_smth, 10, mean)
10
elev_min = aggregate(srtm_or_smth, 10, min)
11
elev_max = aggregate(srtm_or_smth, 10, max)
12
elev_range = elev_max - elev_min
13

    
14
/* stupid arc doesn't have a standard deviation function for aggregation
15
elev_sd = sqrt(aggregate(sqr(srtm_or_smth - elev_mean), 10, sum) / 100)
16

    
17

    
18
/* slope - just mean and standard deviation
19
slopedeg_mean = aggregate(slopedeg, 10, mean)
20
slopedeg_sd = sqrt(aggregate(sqr(slopdeg - slopedeg_mean), 10, sum) / 100)
21

    
22
/* wetness index - mean and standard deviation
23
/* twi not done yet
24
twi_fill_mean = aggregate(twi_fill, 10, mean)
25
twi_fill_sd = sqrt(aggregate(sqr(twi_fill - twi_fill_mean), 10, sum) / 100)
(1-1/12)