Batchlayer resizing

Download Model
Download the .scn, .sel and .lse files by clicking on the following link:

Model Code Exploration
In the following sections we will examine all of the model files for this model. Note that instead of downloading the zip file above, you could just copy the text in the boxes below into a text editor and save it with the appropriate name (Section title). Opening the resulting .scn file in the SELES simulator would run this model.

batchResize.scn
Scenario Information $baseDir$ = ..\gisData\cell baseLayer = cell\ecoregion for($x$ = "$baseDir$\*") if ($x$ NEQ ecoregion) oldLayer = $baseDir$\$x$ Align oldLayer baseLayer close oldLayer Model Dimensions: baseLayer ModelResize.sel SimStart 1 1 Save alignedoldLayer cell\$x$ GRASS  COMPRESSED close alignedoldLayer end end

ModelResize.sel
Seles Model Landscape Events: Mask.lse Variable-Input View Maps: baseLayer alignedoldLayer Global Constants: minX = MIN(alignedoldLayer)

Mask.lse
LSEVENT: Mask DEFINITIONS LAYER: baseLayer, alignedoldLayer GLOBAL CONSTANT: minX ENDDEF RETURNTIME RETURNTIME = 0 //  alignedoldLayer = IF baseLayer > 0 THEN  alignedoldLayer ELSE minX ENDRT

Suggested Experiments
To explore this cellular automata model further, try the following: