1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
version(1.0);
baseDir = "c:/Program Files/LandSerf/data/landscriptExamples/";
param = "planc";
maxWinSize = 35;
minWinSize = 3;
dem = open(baseDir & "dem.srf");
scaleMax = new(dem);
scaleMax = minWinSize;
maxParamSurf = surfparam(dem,param,minWinSize,1.0);
winSize = minWinSize+2;
maxParam = 0;
while (winSize <= maxWinSize);
{
echo("Calculating "¶m&" using "&winSize&"x"&winSize&" window.");
paramSurf = surfparam(dem_, param, winSize, 1.0);
scaleMax = ifelse(abs(paramSurf) > abs(maxParamSurf), winSize, scaleMax);
maxParamSurf=ifelse(abs(paramSurf) > abs(maxParamSurf), paramSurf, maxParamSurf);
winSize = winSize + 2;
}
colouredit(scaleMax,"rules",minWinSize&" 255 255 255, "& maxWinSize&" 0 0 0");
edit(scaleMax,"title",param&" characteristic scale");
edit(scaleMax,"notes","Window size at which "¶m&" values are most extreme.");
edit(maxParamSurf,"title","Extreme "¶m);
edit(maxParamSurf,"notes",param&" calculated with window sizes from "&
minWinSize&" to "&maxWinSize&". Contains the largest "&
"absolute value of the parameter over the range of scales.");
save(maxParamSurf,baseDir&"max"¶m&".srf");
save(scaleMax,baseDir&"charScale"¶m&".srf");
|