1
|
&args dem pctlname radius geographic
|
2
|
|
3
|
&type Running pctl %dem% %pctlname% %radius% %geographic%
|
4
|
|
5
|
&if [exists demtmp.flt -file] &then [delete demtmp.flt -file]
|
6
|
demtmp.flt = gridfloat(%dem%)
|
7
|
&if %geographic% &then &sys pctl -ud %radius% demtmp.flt pctl.flt
|
8
|
&else &sys pctl %radius% demtmp.flt pctl.flt
|
9
|
&if [delete demtmp.flt -file] ^= 0 &then &type ERROR deleting demtmp.flt
|
10
|
&if [delete demtmp.hdr -file] ^= 0 &then &type ERROR deleting demtmp.hdr
|
11
|
&if [delete demtmp.prj -file] ^= 0 &then &type ERROR deleting demtmp.prj
|
12
|
&if [exists %pctlname% -grid] &then kill %pctlname%
|
13
|
%pctlname% = floatgrid(pctl.flt)
|
14
|
&if [delete pctl.flt -file] ^= 0 &then &type ERROR deleting pctl.flt
|
15
|
&if [delete pctl.hdr -file] ^= 0 &then &type ERROR deleting pctl.hdr
|