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
|
version(1.0);
baseDir = "c:/Program Files/LandSerf/data/landscriptExamples/";
raster = open(baseDir&"topoMap.srf");
midEasting = info(raster,"w")+(info(raster,"e")-info(raster,"w"))/2;
midNorthing = info(raster,"s")+(info(raster,"n")-info(raster,"s"))/2;
nw = newraster(info(raster,"w"),midNorthing,
info(raster,"xRes"),info(raster,"yRes"),
info(raster,"numRows")/2,info(raster,"numCols")/2);
ne = newraster(midEasting,midNorthing,
info(raster,"xRes"),info(raster,"yRes"),
info(raster,"numRows")/2,info(raster,"numCols")/2);
sw = newraster(info(raster,"w"),info(raster,"s"),
info(raster,"xRes"),info(raster,"yRes"),
info(raster,"numRows")/2,info(raster,"numCols")/2);
se = newraster(midEasting,info(raster,"s"),
info(raster,"xRes"),info(raster,"yRes"),
info(raster,"numRows")/2,info(raster,"numCols")/2);
nw = combine(raster_,nw_,"intersection");
edit(nw,"title","NW quadrant of "&info(raster,"title"));
ne = combine(raster_,ne_,"intersection");
edit(ne,"title","NE quadrant of "&info(raster,"title"));
sw = combine(raster_,sw_,"intersection");
edit(sw,"title","SW quadrant of "&info(raster,"title"));
se = combine(raster_,se_,"intersection");
edit(se,"title","SE quadrant of "&info(raster,"title"));
save(nw,baseDir&"topoMapNW.srf");
save(ne,baseDir&"topoMapNE.srf");
save(sw,baseDir&"topoMapSW.srf");
save(se,baseDir&"topoMapSE.srf");
|