Parent Topic: Examples
The file `irvine.pix' contains 16-bit elevation data held in channel 10 (signed 16-bit channel) expressed in metres. Channel 6 contains Land use / Land coverage data obtained from the U.S. Geological Survey. Segment 28 on the database contains the attribute data identifying the coverage codes. A partial listing of this data is shown below:
! Land Use / Land Cover Classification System from USGS.
!
! Grey level ; Level 1 Level 2
!
11 ; Urban Residential
12 ; Urban Commercial
13 ; Urban Industrial
14 ; Urban Transportation
15 ; Urban Commercial/Industrial
16 ; Urban Mixed
17 ; Urban Other
21 ; Agriculture Crop/Pasture
22 ; Agriculture Orchards
23 ; Agriculture Feeding
24 ; Agriculture Other
31 ; Rangeland Herbaceous
. . .
It has been determined that only land classed as 'Agriculture',
'Rangeland' and 'Forest' are at risk. The model will generate a new
output channel (layer) showing areas of risk and will also generate
a report giving the acreage of each class at risk. To improve the
appearance of the report, the following text was entered into a text
file, 'labels.att':
! Channel 7 Class ; Class Name
0 ; 'No Risk'
20 ; Agriculture
30 ; Rangeland
40 ; Forest
The actual model is shown below and was entered into a text file
called 'risk.mod'.
Fire Risk Zone Model
!In this model, we are assuming that channel 6 is the coverage
!and channel 10 is elevation data.
!Setup Section
input 'Enter base elevation: ' #base; !Prompt user for elevation
seta %6 = 28; !Land use/Land cover attributes
seta %7 = 'labels.att'; !Labels for report
print 'Channel 7 will receive the new coverage map.';
!Equations section
#elev = %10; !elevation to a single value
if (#elev<#base) then
%7 = 0;
else
$class = %6.1; !Land class
if ($class = 'Agriculture') then
%7 = 20;
extrif ($class = 'Rangeland') then
%7 = 30;
extrif ($class = 'Forest') then
%7 = 40;
else
%7 = 0;
endif;
endif;
!Report Section: Generate an area report with title
title 'Fire Risk Area Report';
report %7 by hectares identify %7.1;
To actually run the model, the following commands are entered:
EASI> FILE = "irvine.pix" EASI> SOURCE="risk.mod" EASI> UNDEFVAL= EASI> REPORT = "term" EASI> RUN MODELA copy of the generated report is shown below:
Fire Risk Area Report
Value Pixels Hectares Identifier
0 91059 8195.310 No Risk
20 46025 4142.250 Agriculture
30 119843 10785.870 Rangeland
40 5217 469.530 Forest