TerrSet Tutorial
TerrSet Tutorial
1987-2016 1987-2016
J. Ronald Eastman Clark University
www.clarklabs.org [email protected]
INTRODUCTION
The exercises of the Tutorial are arranged in a manner that provides a structured approach to the understanding of the fundamentals of
spatial analysis and modeling that the TerrSet system provides. The TerrSet Geospatial Monitoring and Modeling System is comprised of a
constellation of eight interdependent and integrated toolsets. These exercises explore all eight toolsets that cover a wide range of topics in the
areas of GIS analysis, image processing, spatial modeling and earth science. The exercises are organized as follows:
Exercises in this section introduce the fundamental terminology and operations of the TerrSet system, including setting user preferences,
display and map composition, and working with databases in Database Workshop. It is strongly recommended that users complete these
exercises to fully take advantage of TerrSets capabilities.
The exercises in this section explore the powerful IDRISI GIS Analysis toolset found in the TerrSet system. The first set of exercises in this
section provides an introduction to the most fundamental raster GIS analytical tools: database query, distance and context operators, map
algebra, the use of cartographic models, multi-criteria and multi-objective decision making, and TerrSets Macro Modeler, a graphic
modeling environment to organize analyses. The last set of exercises in this section illustrates a range of the possibilities for advanced analysis
using IDRISI GIS Analysis toolset. These include regression modeling, predictive modeling using Markov Chain analysis, database
uncertainty and decision risk, geostatistics and soil loss modeling with RUSLE.
The exercises in this section explore the IDRISI Image Processing toolset found in the TerrSet system. The first set of exercises steps the user
through the fundamental processes of satellite image classification, using both supervised and unsupervised techniques. In the latter exercises,
the techniques explored in the previous set of exercises are expanded to include issues of classification uncertainty and mixed-pixel
classification. The IDRISI Image Processing toolset provides advanced image processing techniques that are explored in the latter set of
exercises in this section.
This set of exercises explores TerrSets Land Change Modeler, an integrated vertical application for analyzing past land cover change,
modeling the potential for change, predicting the course of change into the future, and evaluating planning interventions for maintaining
ecological sustainability. There is a facility also for modeling REDD scenarios (Reducing Emissions from Deforestation and Forest
Degradation).
INTRODUCTION 1
GeOSIRIS
This exercise explores TerrSets GeOSIRIS modeler, an integrated vertical application for national-level REDD planning that estimates the
impacts of alternative policies for REDD+ projects on deforestation, emission reductions, and revenue generation.
This set of exercises explores TerrSets Habitat and Biodiversity Modeler, an integrated vertical application for assessing the implications of
change on habitats, species modeling, and biodiversity analysis. Tools include interfaces to MAXENT and MARXAN.
This set of exercises explores TerrSets Ecosystem Services Modeler, an integrated vertical application containing 15 ecosystem service models
that are closely based on the InVEST toolkit developed by the Natural Capital Project.
This set of exercise explores TerrSets Climate Change Adaptation Modeler, an integrated vertical application for addressing the growing
challenges of adapting to rapidly changing climate.
This set of exercises explores Earth Trends Modeler, another vertical application within TerrSet for the analysis of image time series. The
Earth Trends Modeler includes a coordinated suite of data mining tools for the extraction of trends and underlying determinants of
variability.
We recommend you complete the exercises in the order in which they are presented within each section, though this is not strictly necessary.
Knowledge of concepts presented in earlier exercises, however, is assumed in subsequent exercises. All users who are not familiar with the
TerrSet system should complete the first set of exercises entitled Using the TerrSet System. After this, a user new to GIS and Image Processing
might wish to complete the Introductory GIS and Image Processing exercise sections, then come back to the Advanced exercises at a later
time. Users familiar with the system should be able to proceed directly to the particular exercises of interest. In only a few cases are results
from one exercise used in a later exercise.
As you are working on these exercises, you will want to access the Program Modules section in the on-line Help System any time you
encounter a new module. When action is required at the computer, the section in the exercise is designated by a letter. Throughout most
exercises, numbered questions will also appear. These questions provide opportunity for reflection and self-assessment on the concepts just
presented or operations just performed.
When working through an exercise, examine every result (even intermediate ones) by displaying it. If the result is not as expected, stop and
rethink what you have done. Geographical analysis can be likened to a cascade of operations, each one depending upon the previous one. As a
result, there are endless blind alleys, much like in an adventure game. In addition, errors accumulate rapidly. Your best insurance against this
is to think carefully about the result you expect and examine every product to see if it matches expectations.
INTRODUCTION 2
The TerrSet Tutorial data can be downloaded from the Clark Labs website: www.clarklabs.org. Once downloaded and unzipped, data for the
Tutorial are in a set of folders, one for each Tutorial section as outlined above.
INTRODUCTION 3
TUTORIAL 1 -
USING THE TERRSET SYSTEM
Map Composition
Data for the exercises in this section are in the \TerrSet Tutorial\Using TerrSet folder. The TerrSet Tutorial data can be downloaded from the
Clark Labs website: www.clarklabs.org.
Getting Started
A To start the TerrSet system, double-click on the TerrSet application icon in the TerrSet Program Folder. This will load the TerrSet
system.
Once the system has loaded, notice that the screen has four distinct components. At the top, we have the main menu. Underneath we find the
tool bar of icons that can be used to control the display and access commonly used facilities. Below this is the main workspace, followed by
the status bar.
Depending upon your Windows setup, you may also have a Windows task bar at the very bottom of the screen. If the screen resolution of
your computer is somewhat low (e.g., 1024 x 768), you may wish to change your task bar settings to autohide.1 This will give you extra space
for displayalways an essential commodity with a GIS.
B Now move your mouse over the tool bar icons. Notice that a short text label pops up below each icon to tell you its function. This
is called a hint. Several other features of the TerrSet interface also incorporate hints.
TerrSet Explorer
C
Click on the TerrSet Explorer icon, the left-most tool bar icon. This option will launch the TerrSet Explorer utility.
TerrSet Explorer is a general purpose utility to manage and explore TerrSet files and projects. Use TerrSet Explorer to set your project
environment, manage your group files, review metadata, display files, and simply organize your data with such tools as copy, delete, rename,
and move commands. You can use TerrSet Explorer to view the structure of TerrSet file formats and to drag and drop files into TerrSet dialog
boxes. TerrSet Explorer is permanently docked to the left edge of the TerrSet desktop. It cannot be moved but it can be minimized and
horizontally resized whenever more workspace is required. We will explore the various uses of TerrSet Explorer in the exercises that follow.
1
This can be done from the START menu of Windows. Choose START, then SETTINGS, then Task bar. Click "always on top" off and "autohide" on. When you do
this, you simply need to move your cursor to the bottom of the screen in order to make the task bar visible.
D With TerrSet Explorer open, select the Projects tab at the top of TerrSet Explorer. This option allows you to set the project
environment of your file folders. Make sure that the Editor pane is open at the bottom of the Projects tab. If you right-click
anywhere in the Projects form you will have the option to show the Editor. The Editor pane will show the working and resource
folders for each project. During the installation a Default project is created. Make sure that you have selected this project by
clicking on it. The result will have the radio button highlighted for that project.
A project is an organization of data files, both the input files you will use and the output files you
will create. The most fundamental element is the Working Folder. The Working Folder is the
location where you will typically find most of your input data and will write most of the results of
your analyses.2 The first time TerrSet is launched, the Working Folder by default is named:
E If it is not set this way already, change the Working Folder to be the Using TerrSet
folder.3 To change the Working Folder, click in the Working Folder input box and
either type in the location or select the browse button to the right to locate the Using
TerrSet folder.
In addition to the Working Folder, you can also have any number of Resource
Folders. A Resource Folder is any folder from which you can read data, but to which
you typically will not write data.
If this is not correctly set, use the New Folder icon at the bottom of the Editor pane to
specify the correct Resource Folder. Note that to remove folders, you must highlight
them in the list first and then click the Remove Folder icon at the bottom of Editor.
F The project should now show \\TerrSet Tutorial\Using TerrSet as the Working Folder
and \\TerrSet Tutorial\Introductory GIS as the Resource Folder. Your settings are
automatically saved in a file named DEFAULT.ENV (the .env extension stands for
Project Environment File). As new projects are created, you can always use Projects in
TerrSet Explorer to re-load these settings.
2
You can always specify a different input or output path by typing that full path in the filename box directly or by using the Browse button and selecting another
folder.
3
During installation, the default location will be to the Public folder designated by Windows. This will usually be in a shared documents folder in Users or Documents
and Settings. Adjust these instructions accordingly.
G Now click the Files tab in TerrSet Explorer. You are now ready to start exploring the TerrSet system. We will discuss TerrSet
Explorer more in depth later, but from the Files tab you will see a list of all files in your working and resource folders.
The data for the exercises are installed in several folders. The introduction to each section of the Tutorial indicates which particular folder you
will need to access. Whenever you begin a new Tutorial section, change your project accordingly.
Resource Folder(s): The folder(s) in which the original tutorial input data are stored.
Note that all the files that comprise raster (.rgf), vector (.vlx), or signature (.sgf) groups must be in the same folder. When an exercise requires
students to add new files from the Working Folder to groups stored in a Resource Folder, they should first copy all the files to group from the
Resource Folder to the Working Folder.
H There are three ways to launch TerrSet module dialog boxes. The most commonly used modules have toolbar icons. Click the
Display icon to launch the DISPLAY Launcher dialog. Close the dialog by clicking the X in the upper right corner of the dialog
window. Now go to the Display menu and click on the DISPLAY Launcher menu entry. Close the dialog again. Finally, you can
access an alphabetical list of all the TerrSet modules with the Shortcut utility, located at the top of the TerrSet window. Shortcut
will stay open until you choose the Turn
Shortcut Off command under the File Menu.
Click the dropdown list arrow on Shortcut and
scroll down until you find DISPLAY Launcher,
then click on it and click the Open Dialog button
(green arrow to the right of Shortcuts), or simply
hit Enter. Note that you may also type the
module name directly into the Shortcut box. In
the Tutorial Exercises, you will typically be
instructed to find module names in their menu
I Notice first the three buttons at the bottom of the DISPLAY Launcher dialog. The OK button is used after all options have been set
and you are ready to have the module do its work. By default TerrSet dialogs are persistent -- i.e., the dialog does not disappear
when you click OK. It does the work, but stays on the screen with all of its settings in case you want to do a similar analysis. If you
would prefer that dialogs immediately close after clicking OK, you can go to the User Preferences option under the File menu and
disable persistent dialogs. (Note: having said this, DISPLAY Launcher is never persistent.)
If persistent dialogs are enabled, the button to the right of the OK button will be labeled as Close. Clicking on this both closes the
dialog and cancels any parameters you may have set. If persistent forms are disabled, this button will be labeled Cancel. However,
the action is the same -- Cancel always aborts the operation and closes the dialog.
J The Help button can be used to access the context-sensitive Help System. You probably noticed that the main menu also has a
Help button. This can be used to access the TerrSet Help System at its most general level. However, accessing the Help button on a
dialog will bring you immediately to the specific Help section for that module. Try it now. Then close the Help window by clicking
the X button in its upper-right corner.
The Help System does not duplicate information in the manuals. Rather, it is a supplement, acting as the primary technical reference for
specific program modules. In addition to providing directions for the operation of a module and explaining its options, the Help System also
provides many helpful tips and notes on the implementation of these procedures in the TerrSet system.
Dialogs are primarily made up of standard Windows elements such as input boxes (the white boxes) in which text can be entered, radio
buttons (such as the file type radio button group), check boxes (such as those to indicate whether or not the map layer should be displayed
with a legend), buttons, and so on. However, TerrSet has incorporated some special dialog elements to facilitate your use of the system.
In DISPLAY Launcher, make sure the File Type indicates that you wish to display a raster layer. Then click the small button with
K the ellipses, just to the right of the left input box. This will launch the pick list. TerrSet uses this specially-designed selection tool
throughout the system.
The pick list displays the names of map layers and other data elements, organized by folders. Notice that it lists your Working Folder first,
followed by each Resource Folder. The pick list always opens with the Working Folder expanded and the Resource Folders collapsed. To
expand a collapsed folder, click on the plus sign next to the folder name. To collapse a folder, click on the minus sign next to the folder name.
A listed folder without a plus/minus symbol is an indication that the folder contains no files of the type required for that particular input box.
Note that you can also access other folders using the Browse button.
L Collapse and expand the two folders. Since the pick list was invoked from an input box requiring the name of a raster layer, the
files listed are all the raster layers in each folder. Now expand the Working Folder. Find the raster layer named SIERRADEM and
click on it. Then click on the OK button of the pick list. Notice how its name is now entered into the input box on DISPLAY
Launcher and the pick list disappears.4
4
Note that when input filenames are chosen from the Pick List or typed without a full path, TerrSet first looks for the file in the Working Folder, then in each Resource
Folder until the file is found. Thus, if files with the same name exist in both the Working and Resource Folders, the file in the Working Folder will be selected.
M Now that we have selected the layer to be displayed, we need to choose an appropriate palette (a sequence of colors used in
rendering the raster image). In most cases, you will use one of the standard palettes represented by radio buttons. However, you
will learn later that it is possible to create a virtually infinite number of palettes. In this instance, the TerrSet Default Quantitative
palette is selected by default and is the palette we wish to use.
N Notice that the autoscale option has been automatically set to Equal Intervals by the display system. This will be explained in
greater detail in a later exercise. However, for now it is sufficient to know that autoscaling is a procedure by which the system
determines the correspondence between numeric values in your image (SIERRADEM) and the color symbols in your palette.
O The legend and title check boxes are self-explanatory. For this illustration, be sure that these check boxes are also selected and then
click OK. The image will then appear on the screen. This image is a Digital Elevation Model (DEM) of an area in Spain.
P Move the mouse over the map window you just launched. Notice how the status bar continuously updates the column and row
position as well as the X and Y coordinate position of the mouse. Also notice what happens when the mouse is moved off of the
map window.
All map layers will display the X and Y positions of the mousecoordinates representing the ground position in a specific geographic
reference system (such as the Universal Transverse Mercator system in this case). However, only raster layers indicate a column and row
reference (as will be discussed further below).
Also note the Representative Fraction (RF) on the left of the status bar. The RF expresses the current map scale (as seen on the screen) as a
fraction reduction of the true earth. For example, an RF = 1/5000 indicates that the map display shows the earth 5000 times smaller than it
actually is.
Q Like the position fields, the RF field is updated continuously. To get a sense of this, click the icon marked Full Extent Maximized
(pause the cursor over the icons to see their names). Notice how the RF changes. Then click the Full Extent Normal icon. These
functions are also activated by the End and Home keys. Press the End key and then the Home key.
R You can set a specific RF by right-clicking in image. Select Set specific RF from the menu. A dialog will allow you to set a specific
RF. Clicking OK will display the image at this specified scale.
As indicated earlier, many of the tool bar icons launch module dialogs, just like the menu system. However, some of them are specifically
designed to access interactive features of the display system, such as the two you just explored. Two other interactive icons are the Measure
tools, both length and zone.
Click on the Measure Zone icon located to the right of the Measure Length icon. Then click anywhere in the image and move the
mouse. As you drag the mouse, a circle will be drawn with a dialog showing the radius and area of the circle. A right-click will end
this process.
Menu Organization
As distributed, the main menu has nine sections: File, IDRISI GIS Analysis, IDRISI Image Processing, Land Change Modeler, Habitat and
Biodiversity Modeler, GeOSIRIS, Ecosystem Services Modeler, Earth Trends Modeler, Climate Change Adaptation Modeler. Collectively,
they provide access to over 300 analytical modules, as well as a host of specialized utilities and vertical applications. The File, IDRISI GIS
Analysis, IDRISI Image Processing items will open to your typical pull-down menu to expose more items. The remaining menu items will
launch vertical applications that are theme oriented. Each is explored later. For now we will explore the first three menu items that contain
the majority of the analytical functionality in TerrSet.
As the name suggests, the File menu contains a series of utilities for the import, export and organization of data files. However, as is
traditional with Windows software, the File menu is also where you set user preferences.
T Open the User Preferences dialog from the File menu. We will discuss many of these options later. For now, click on the Display
Settings tab and then the Revert to Defaults button to ensure that your settings are set properly for this exercise. Click OK.
The Reformat submenu under the File menu contains a series of modules for the purpose of converting data from one format to another. It is
here, for example, that one finds routines for converting between raster and vector formats, changing the projection and grid reference system
of map layers, generalizing spatial data and extracting subsets.
The IDRISI GIS Analysis and the IDRISI Image Processing menus contain the majority of modules. The GIS Analysis menu is two to four
levels deep, with its primary organization at level two. The first four menu entries at this second level represent the core of GIS analysis:
Database Query, Mathematical Operators, Distance Operators and Context Operators. The others represent major analytical areas: Statistics,
Decision Support, Change and Time Series Analysis, and Surface Analysis. The IDRISI Image Processing menu includes ten submenus.
The Model Deployment Tools menu includes tools and facilities for constructing models as well as information for calling TerrSet capabilities
from user-written programs.
U Go to the Surface Analysis submenu under the IDRISI GIS Analysis main menu and explore the four submenus there. Note that
most of the menu entries that open module dialog boxes (i.e., the end members of the menu trees) are indicated with capital letters
but some are not. Those designated with capital letters can be used as procedures with the IDRISI Macro Language (IML). Now
click on the CONTOUR menu entry in the Feature Extraction submenu to launch the CONTOUR module.
V From the CONTOUR dialog, specify SIERRADEM as the input raster image. (Recall that the pick list may be launched with the
Pick List button, or by double-clicking on the input box.)
Change the input boxes to specify a minimum contour value of 400 and a maximum of 2000, with a contour interval of 100. You
can leave the default values for the other two options. Enter a descriptive title to be recorded in the documentation of the output
file. In this case, the title "100 m Contours from SIERRADEM" would be appropriate. Click OK. Note that the status bar shows the
progress of this module as it creates the contours in two passesan initial pass to create the basic contours and a second pass to
generalize them. When the CONTOUR module has finished, TerrSet will automatically display the result.
The automatic display of analytical results is an optional feature of the System Settings of the User Preferences dialog (under the File menu).
The procedures for changing the Display Settings will be covered in the next exercise.
W Move your cursor over the CONTOURS map window. Note that it does not display a column and row value in the status bar. This
is because CONTOURS is a vector layer.
X To appreciate the difference between raster and vector layers better, close the CONTOURS map window by clicking on the X
button on its upper-right corner. Then, with the SIERRADEM display active, click the Add Layer option of the Composer dialog
and specify CONTOURS as the vector layer and Outline Black as the symbol file. Click OK to add this layer to your composition.
Composer is one of the most important tools you will use in the construction of map compositions. It allows you to add and
remove layers, change their hierarchical position and symbolization, and ultimately save and print map compositions. Composer
will be explored in far greater depth in the next exercise. By default, Composer will always be displayed on the right-side of the
desktop when any map window is open.
Y Along with Composer, the navigation tools on the tool bar (which are also available on the keyboard and mouse) are essential for
manipulating the map window. The tool bar has several icons for navigating around a map layer. There are icons for panning,
zooming and changing the size or extent of the map window. These functions are duplicated by keyboard and mouse operations.
The zoom in and zoom out icons not only zoom, but also center the image depending on where you place your cursor. The PgUp
and PgDn keys on the keyboard are similar but without the recentering. The Full Extent Normal and Full Extent Maximized icons
are duplicated by the Home and End keys. With the keyboard you can also pan using the arrow keys and with a properly
supported mouse, you can zoom in and out using the mouse wheel.
Now pan to an area of interest and zoom in until the cell structure of the raster image (SIERRADEM) becomes evident. As you
can see, the raster image is made up of a fine cellular structure of data elements (that only become evident under considerable
magnification). These cells are often referred to as pixels. Note, however, that at the same scale at which the raster structure
becomes evident, the vector contours still appear as thin lines.
In this instance, it would seem that the vector layer has a higher resolution, but looks can be deceiving. After all, the vector layer was derived
from the raster layer. In part, the continuity of the connected points that make up the vector lines gives this impression of higher resolution.
Z Click on the DISPLAY Launcher icon and specify the raster layer named SIERRA234. Note that the palette options are disabled in
this instance because the image represents a 24-bit full color image5 (in this case, a satellite image created from bands 2, 3 and 4 of
a Landsat scene). Click OK.
AA Now choose the ORTHO option from the DISPLAY submenu under the File menu. Specify SIERRADEM as the surface image
and SIERRA234 as the drape image. Since this is a 24-bit image, you will not need to specify a palette. Keep the default settings for
all other parameters except for the output resolution. Choose one level below your display system's resolution.6 For example, if
your system displays images at 1024 x 768, choose 800 x 600. Then click OK. When the map window appears, press the End key to
maximize the display.
The three-dimensional (i.e., orthographic) perspective offered through ORTHO can produce extremely dramatic displays and is a powerful
tool for visual analysis. Later we will explore another module that not only produces three dimensional displays, but also allows you to fly
through the model!
The rest of the exercises in this section of the Tutorial focus primarily on the elements of the Display System.
Housekeeping
As you are probably now beginning to appreciate, it takes little time before your workspace is filled with many windows. Go to the Window
List menu. Here you will find a list of all open dialogs and map windows. Clicking on any of these will cause that window to come to the top.
5
A 24-bit image is a special form of raster image that contains the data for three independent color channels which are assigned to the red, green and blue primaries of
the display system. Each of these three channels is represented by 256 levels, leading to over 16 million displayable colors. However, the ability of your system to
resolve this image will depend upon your graphics system. This can easily be determined by minimizing TerrSet and clicking the right mouse button on the Windows
desktop. Then choose the Settings tab of the Display Properties dialog. If your system is set for 24-bit true color, you are seeing this image at its fullest color
resolution. However, it is as likely as not that you are seeing this image at some lower resolution. High color settings (15 or 16 bit) look almost indistinguishable from
24-bit displays, but use far less memory (thus typically allowing a higher spatial resolution). However, 256 color settings provide quite poor approximations.
Depending upon your system, you will probably have a choice of settings in which you trade off color resolution for spatial resolution. Ideally, you should choose a
24-bit true color or 16-bit high color option and the largest spatial resolution available. A minimum of 800 x 600 spatial resolution is recommended, but 1024 x 768
or better is more desirable.
6
If you find that the resulting display has gaps that you find undesirable, choose a lower resolution. In most instances, you will want to choose the highest resolution
that produces a continuous display. The size of the images used with ORTHO (number of columns and rows) influences the result, so in one case, the best result may
be obtained with one resolution, while with another dataset, a different resolution is required.
The digital representation of spatial data requires a series of constituent elements, the most important of which is the map layer. A layer is a
basic geographic theme, consisting of a set of similar features. Examples of layers include a roads layer, a rivers layer, a land use layer, a census
tract layer, and so on. Features are the constituents of map layers, and are the most fundamental geographic entitiesthe equivalent of
molecules, which are in turn compounds of more basic atomic features such as nodes, vertices and lines.
At a higher level, layers can be understood to be the basic building blocks of maps. Thus a map might be composed of a state boundaries layer,
a forest lands layer, a streams layer, a contours layer and a roads layer, along with a variety of ancillary map components such as legends,
titles, a scale bar, north arrow, and the like.
With traditional geographic representations, the map is the only entity that we can interact with. However, in GIS, any of these levels are
available to us. We can focus the display on specific features, isolated layers, or we can view any of a series of multi-layer custom-designed
maps. It is the layer, however, that is unquestionably the most important of these. Layers are not only the basic building blocks of maps, but
they are also the basic elements of geographic analysis. They are the variables of geographic models. Thus our exploration of GIS logically
starts with map layers, and the display system that allows us to explore them with the most important analytical tool at our disposalthe
visual system.
A Make sure your main Working Folder is set to Using TerrSet. Then click on the DISPLAY Launcher icon on the tool bar. Note
that separate options are included for raster and vector layers, as well as a map composition option (which we will explore in a
later exercise). Despite the fact that their representational structures are very different, your means of displaying and interacting
with them is identical.
Display the vector layer named SIERRAFOREST. Select the user-defined symbol option, invoke the pick list for the symbol files
and choose the symbol file Forest. Turn the title and legend options off. Click OK.
B Press the Home key to restore the original display and then the End key to maximize the display of the layer. Click on a forest
polygon. The polygon becomes highlighted and its ID is shown near the cursor. Click on several other forest polygons. Also click
on some of the white areas between these polygons. Now select the Identify icon on the toolbar. Continue to click on
polygons. Note the information presented in the Identify box that to the right of the map.
What should be evident here is that vector representations are feature-orientedthey describe featuresentities with distinct boundaries
and there is nothing between these features (the void!). Contrast this with raster layers.
C Click on the Add Layer button on Composer. This dialog is a modified version of DISPLAY Launcher with options to add either
an additional raster or vector layer to the current composition. Any number of layers can be added in this way. In this instance,
select the raster layer option and choose SIERRANDVI from the pick list options. Then choose the NDVI palette and click OK.
This is a vegetation biomass image, created from satellite imagery using a simple mathematical model.2 With this palette, greener
areas have greater biomass. Areas with progressively less biomass range from yellow to brown to red. This is primarily a sparse
dry forest area.
D Notice how this raster layer has completely covered over the vector layer. This is because it is on top and it contains no empty
space. To confirm that both layers are actually there, click on the check mark beside the SIERRANDVI layer in the Composer
dialog. This will temporarily turn its visibility off, allowing you to see the layer below it.
Make the raster layer visible again by clicking to the left of the filename. Raster layers are composed of a very fine matrix of cells
commonly called pixels,3 stored as a matrix of numeric values, but represented as a dense grid of varying colored rectangles.4
Zoom in with the PgDn key until this raster structure becomes apparent.
Raster layers do not describe features in space, but rather the fabric of space itself. Each cell describes the condition or character of
space at that location, and every cell is described. Since the Identify tool is still on, first click on the SIERRANDVI filename on
Composer (to select it for inquiry) then click onto a variety of cells with the cursor. Notice how each and every cell contains a
value. Consequently, when a raster layer is in a composition, we generally cannot see through to any layers below it. Conversely,
this is generally not the case with vector. However, the next exercise will explore ways in which we can blend the information in
layers and make background areas transparent.
1
Areal features, such as provinces, are commonly called polygons because the points which define their boundaries are always joined by straight lines, thus producing
a multi-sided figure. If the points are close enough, a linear or polygonal feature will appear to have a smooth boundary. However, this is only a visual appearance.
2
NDVI and many other vegetation indices are discussed in detail in the chapter Vegetation Indices in the TerrSet Manual as well as Tutorial Exercise 5-7.
3
The word pixel is a contraction of the words picture and element. Technically a pixel is a graphic element, while the data value which underlies it is a grid cell value.
However, in common parlance, it is not unusual to use the word pixel to refer to both.
4
Unlike most raster systems, TerrSet does not assume that all pixels are square. By comparing the number of columns and rows against the coordinate range in X and
Y respectively, it determines their shape automatically, and will display them either as squares or rectangles accordingly.
With the vector layer on top, notice how you can see through to the layer below it wherever there is empty space. However, the
polygons themselves obscure everything behind them. This can be alleviated by using a different form of symbolization.
F Select the SIERRAFOREST layer in Composer. Then click on the Layer Properties button. Layer Properties, as the name suggests,
displays some important details about the selected (highlighted) layer, including the palette or symbol file in use.
You have two options to change the symbol file used to display the SIERRAFOREST layer. One would be to click on the pick list
button and select a symbol file, as we did the first time. However, in this case, we are going to use the Advanced Palette/Symbol
Selection tool. Click that particular button--it is just below the symbol file input box.
The Advanced Palette/Symbol Selection tool provides quick access to over 1300 palette and symbol files. The first decision you
need to make is whether the data express quantitative variations (such as with the NDVI data), qualitative differences (such as
land cover categories that differ in kind rather than quantity) or simple set membership depicted with a uniform symbolization.
In our case, the latter applies, therefore click on the None (uniform) option. Then select the cross-stripe symbol type (x stripe)
and a blue color logic. Notice that there are four blue color options. Any of these four can be selected by clicking on the button
that illustrates the color sequence. Try clicking on these buttons and note what happens in the input box -- the symbol filename
changes! Thus all you are doing with this interface is selecting symbol files that you could also choose from a pick list. Ultimately,
click on the darkest blue option (the first button on the right) and then click on OK. This returns you to Layer Properties. You can
also click OK here.
Unlike the solid polygon fill of the Forest symbol file, the new symbol file you selected uses a cross-hatch pattern with a clear
background. As a result, we can now see the full layer below. In the next exercise you will learn about other ways of blending or
making layers transparent.
From the steps above, we can clearly see that vector and raster layers are different. However, their true relative strengths are not yet apparent.
Over the course of many more exercises, we will learn that raster layers provide the necessary ingredients to a large number of analytical
operationsthe ability to describe continuous data (such as the continuously varying biomass levels in the SIERRANDVI image), a simple
and predictable structure and surface topology that allows us to model movements across space, and an architecture that is inherently
compatible with that of computer memory. For vector layers, the real strength of their structure lies in the ability to store and manipulate data
for collections of layers that apply to the features described.
Group Files
In this section, we will begin an exploration of group files. In TerrSet, a group file is a collection of files that are specifically associated with
each other. Group files are associated with raster layers and to signature files. A group file, depending on the type, will have a specific
extension but is always a text file that lists files associated with a group. There are two types of raster group layers: raster and time series files
with .rgf and .ts extensions respectively. Signature group files are of two types, multispectral signature and hyperspectral signature group files
with .sgf and .hgf extensions respectively. All group files are created using TerrSet Explorer.
G Open TerrSet Explorer from the File menu. By default TerrSet Explorer opens to the
Files tab displaying all the filtered files in the Working and Resource folders. Like the
pick list, you can display files in any of the folders by scrolling and clicking the
appropriate folder name. Make sure you are in the Using TerrSet folder. To create a
raster group file we will select the necessary files and then right-click to create this file.
Select each of the following files in turn. You may multi-select files by holding down the
shift key to select several files listed together or by holding down the control key to
select several files individually.
SIERRA1
SIERRA2
SIERRA3
SIERRA4
SIERRA5
SIERRA7
SIERRA234
SIERRA345
SIERRADEM
SIERRANDVI
If you make any mistakes, simply click the file to highlight or remove the highlight. If it
is highlighted, it is selected. Then, right-click in the Files pane and choose the
Create\Raster group option from the menu. By default the name given to this new
group file is RASTER GROUP.RGF. The files contained in the raster group will also be
displayed in TerrSet Explorer. Change the name of the raster group file to SIERRA by
right-clicking on the RASTER GROUP.RGF filename and select Rename.
By default, the Metadata pane should be visible in TerrSet Explorer. If it is not, right
click in the Files pane and select Metadata. Then when you select the SIERRA group
file, Metadata will show the files contained in this group and their order. In most cases order is not important, but if it is as in the
case of Time Series analysis, you can always change the order in Metadata.
Raster group files provide a range of powerful capabilities, including the ability to provide tabular summaries about the characteristics of any
location.
H Bring up DISPLAY Launcher and select the raster layer option. Then click on the pick list button. Notice that your SIERRA group
appears with a plus sign, as well as the individual layers from which it was formed. Click on the plus sign to list the members of the
group and then select the SIERRA345 image. You should now see the text "sierra.sierra345" in the input box. Since this is a 24-bit
With raster groups, the individual layers exist independent of the group. Thus, to display any one of these layers we can specify it either with
its direct name (e.g., SIERRA345) or with its group name attached (e.g., SIERRA.SIERRA345). What is the benefit, then, of using a group?
I We will need to work through several exercises to fully answer this question. However, to get a sense, invoke the Identify tool from
the toolbar. Then move the mouse and use the left mouse button to click on various pixels around the image and look at the
Identify grid box to the right of the map.
Identify Mode allows you to inspect the value of any specific pixel for any map layer or across map layers. See the section on Display:
Navigating Map Query.
J To display SIERRADEM from TerrSet Explorer, double-click on the filename. The map layer will appear on the TerrSet Desktop.
You can also display a member of a group file by double-clicking on the raster group file to expose the grouped files, then again
double-click on the file to display. The resulting file will be displayed with the dot logic in the filename, for example,
SIERRA.SIERRADEM.
When displaying layers from TerrSet Explorer you will have no control over its initial display characteristics, unlike DISPLAY Launcher.
However, once a layer is displayed you can alter its display from Layer Properties in Composer. As we will see in the next section, TerrSet
Explorer can also be used to Add Layers to map compositions, just as in Composer.
As we have seen, map compositions are formed from stacking a series of layers in the same map window using Composer. By default, the
backgrounds of vector layers are transparent while those of raster layers are opaque. Thus, adding a raster layer to the top of a composition
will, by default, obscure the layers below. However, TerrSet provides a number of multi-layer interaction effects which can modify this action
to create some exciting display possibilities.
Blends
A If your workspace contains any existing windows, clean it off by using the Close All Windows option from the Window List menu.
Then use DISPLAY Launcher to view the image named SIERRADEM using the Default Quantitative palette. The colours in this
image are directly related to the height of the land. However, it does not convey well the nature of the relief. Therefore we will
blend in some hillshading to give a sense of the topography.
B First, go to the Surface Analysis section of the GIS Analysis menu and then the Topographic Variables submenu to select
HILLSHADE. This option accesses the SURFACE module to create hillshading from your digital elevation model. Specify
SIERRADEM as the elevation model and SIERRAHS as the output. Leave the sun azimuth and elevation values at their default
values and simply click OK.
The effect here is clearly dramatic! To create this by hand would have taken the skills of a talented topographer and many weeks
of painstaking artistic rendition using a tool such as an air brush. However, through illumination modeling in GIS, it takes only
moments to create this dramatic rendition.
C Our next step is to blend this with our digital elevation model. Remove the hillshaded image from the screen by clicking the X in
its upper-right corner. Then click onto the banner of the map window containing SIERRADEM and click Add Layer in Composer.
When the Add Layer dialog appears, click on Raster as the layer type and indicate SIERRAHS as the image to be displayed. For the
palette, select Greyscale.
Now be sure SIERRADEM is highlighted in Composer (click on its name if it isnt) and then click the Blend button on Composer.
The Blend button blends the color information of the selected layer 50/50 with that of the assemblage of visible elements below it
in the map composition. The Layer Properties button contains a visibility dialog that allows other proportions to be used (such as
60/40, for example). However, a 50% blend is typically just right. Note that the blend can be removed by clicking the Blend button
a second time while that layer is highlighted in Composer. This application is probably the most common use of blend -- to
include topographic hillshading. However, any raster layer can be blended.2
Vector layers cannot be blended directly. However, they can be affected by blends in raster layers visually above them in the
composition. To appreciate this, click the Add Layer button on Composer and specify the vector layer named CONTOURS that
you created in the first exercise. Then click on the Advanced Palette/Symbol Selection tab. Set the Data Relationship to None
(uniform), the Symbol Type to Solid, and the Color Logic to Blue. Then click on the last choice to select LineSldUniformBlue4 and
click OK. As you can see, the contours somewhat dominate the display. Therefore drag the CONTOURS layer to the position
between SIERRAHS and SIERRADEM. Notice how the contours appear in a much more subtle color that varies between
contours. The reason for this is that the color from SIERRADEM has now blended with that of the contours as well.
Before we go on to consider transparency, lets make the color of SIERRADEM coordinate with the contours. First be sure that
the SIERRADEM layer is highlighted in Composer by clicking onto its name. Then click the Layer Properties button. In the
Display Min/Max Contrast Settings input boxes type 400 for the Display Min and 2000 for the Display Max. Then change the
Number of Classes to 16 and click the Apply button, followed by OK. Note the change in the legend as well as the relationship
between the color classes and the contours. Keep this composition on the screen for use in the next section.
Transparency
D Lets now define the lakes and reservoirs. Although we dont have direct data for this, we do have the near-infrared band from a
Landsat image of the region. Near-infrared wavelengths are absorbed very heavily by water. Thus open water bodies tend to be
quite distinctive on near-infrared images. Click onto the DISPLAY Launcher icon and display the layer named SIERRA4. This is
the Landsat Band 4 image. Use Identify to examine pixel values in the lakes. Note that they appear to have reflectance values less
than 30. Therefore it would appear that we can use this threshold to define open water areas.
E Click on the RECLASS icon on the toolbar. Set the type of file to be reclassified to Image and the classification type to User-
Defined. Set the input file to SIERRA4 and the output file to LAKES. Set the reclass parameters to assign:
1
To drag it, place the mouse over the layer name and press and hold the left mouse button down while you move the mouse to the new position where you want the
layer to be. Then release the left mouse button and the move will be implemented.
2
Vector layers cannot be the agents of a blend. However, they can be affected by blends in raster layers above them, as will be demonstrated in this exercise.
F Now use the Add Layer button on Composer to add the raster layer LAKES. Again use the Advanced Palette/Symbol Selection tab
and set the Data Relationship to None (uniform), the Color Logic to Blue and then click the third choice to select UniformBlue3.
G Clearly there is a problem here -- the LAKES layer obscures everything below it. However, this is easily remedied. Be sure the
LAKES layer is highlighted in Composer and then click the right-most of the small buttons above Add Layer.
This is the Transparency button. It makes all pixels assigned to color 0 in the prevailing palette transparent (regardless of what
that color is). Note that a layer can be made both transparent and blended -- try it! As with the blend effect, clicking the
Transparent button a second time while a transparent layer is highlighted will cause the transparency effect to be removed.
Composites
In the first exercise, you examined a 24-bit color composite layer, SIERRA234. Layers such as this are created with a special module named
COMPOSITE. However, COMPOSITE images can also be created on the fly through the use of Composer. We will explore both options here.
H First remove any existing images or dialogs. Then use DISPLAY Launcher to display SIERRA4 using the Greyscale palette. Then
press the r key on the keyboard. This is a shortcut that launches the Add Layer dialog from Composer, set to add a raster layer
(note that you can also use the shortcut v to bring up Add Layer set to add a vector layer). Specify SIERRA5 as the layer and
again use the Greyscale palette. Then use the r shortcut again to add SIERRA7 using the Greyscale palette. At this point, you
should have a map composition containing three images, each obscuring the other.
Notice that the small buttons above Add Layer in Composer include three with red, green and blue colors. Be sure that SIERRA7
is highlighted in Composer and then click on the Red button. Then highlight SIERRA5 in Composer (i.e., click onto its name) and
then click the Green button. Finally, highlight SIERRA4 in Composer and click the Blue button.
Any set of three adjacent layers can be formed into a color composite in this way. Note that it was not important that they had a
Greyscale palette to start withany initial palette is fine. In addition, the layers assigned to red, green and blue can be in any
order. Finally, note that as with all of the other buttons in this row on Composer, clicking it a second time while that layer is
highlighted causes the effect to be removed.
Creating composites on the fly is very convenient, but not necessarily very efficient. If you are going to be working with a particular
composite often, it is much easier to merge the three layers into a single 24-bit color composite layer. 24-bit composite layers have a special
data type, known as RGB24 in TerrSet. These are TerrSets equivalent of the same kind of color composite found in BMP, TIFF and JPG files.
Open the COMPOSITE module, either from the Display menu or from its toolbar icon. Here we can create 24-bit composite images. Specify
SIERRA4, SIERRA5 and SIERRA7 as the blue, green and red bands, respectively. Call the output SIERRA457. We will use the default settings
to create a 24-bit composite with original values and stretched saturation points with a default saturation of 1%. Click OK.
The issue of scaling and saturation will be covered in more detail in a later exercise. However, to get a quick sense of it, create another
composite but use a temporary name for the output and use the simple linear option. To create a temporary output name, simply double-click
in the output name box. This will automatically generate a name beginning with the prefix tmp such as TMP000.
Anaglyphs
Anaglyphs are three-dimensional representations derived from superimposing a pair of separate views of the same scene in different colors,
such as the complementary colors, red and cyan. When viewed with 3-D glasses consisting of a red lens for one eye and a cyan lens for the
other, a three-dimensional view can be seen. To work properly, the two views (known as stereo images) must possess a left/right orientation,
with an alignment parallel to the eye4.
I Use the Close All Windows option of the Window List menu to clear the screen. Then use DISPLAY Launcher to view the file
named IKONOS1 using the Greyscale palette. Then use Add Layer in Composer (or press the r key) to add the image named
IKONOS2, again with the Greyscale palette.
Click the checkmark next to the IKONOS2 image in Composer on and off repeatedly. These two images are portions of two
IKONOS satellite images (www.spaceimaging.com) of the same area (San Diego, United States, Balboa Park area), but they are
taken from different positions -- hence the differences evident as you compare the two images.
More specifically, they are taken at two positions along the satellite track from north to south (approximately) of the IKONOS
satellite system. Thus the tops of these images face west. They are also epipolar. Epipolar images are exactly aligned with the path
of viewing. When they are viewed such that the left eye only sees the left image (along track) and the right eye only sees the right
image, a three-dimensional view is perceived.
Many different techniques have been devised to present each eye with the appropriate image of a stereo pair. One of the simplest is
the anaglyph. With this technique each image is portrayed in a special color. Using special eyeglasses with filters of the same color
logic on each eye, a three-dimensional image can be perceived.
J The TerrSet system can accommodate all anaglyphic color schemes using the layer interaction effects provided by Composer.
However, the red/cyan scheme typically provides the highest contrast. First be sure that the IKONOS2 image is highlighted in
3
More specifically, the on the fly compositing feature in Composer looks to see whether the Display Min and Max are equal to the actual Min and Max. If they are, it
then calculates the 1% saturation points and alters the Display Min and Max values. However, if they are different, it assumes that you have already made decisions
about scaling and therefore uses the stored values directly.
4
If they have not already been prepared to have this orientation, it is necessary to use either the TRANSPOSE or RESAMPLE modules to reorient the images.
This is only a small portion of an IKONOS stereo scene. Zoom in and roam around the image. The resolution is 1 meter -- truly
extraordinary! Note that other sensor systems are also capable of producing stereo images, including SPOT, QUICKBIRD and
ASTER. However, you may need to reorient the images to make them viewable as an anaglyph, either using TRANSPOSE or
RESAMPLE. TRANSPOSE is the simplest, allowing you to quickly rotate each image by 90 degrees. This will typically make them
useable as an anaglyphic pair. However, it does not guarantee that they will be truly epipolar. With truly epipolar images, a single
straight line joins up the two image centers and the position of the other images center in each. In many cases, this can only be
achieved with RESAMPLE.
In the first exercise, we had a brief look at the use of ORTHO to produce a three-dimensional display, and in the previous exercise, we saw
how blends can be used to create dramatic maps of topography by combining hillshading with hypsometric tints. In this exercise, we will
explore the ability to interactively fly through a three-dimensional model. In addition, we will look at the use of the ILLUMINATE module
for preparing drape images for fly through.
Fly Through
A If your workspace contains any existing windows, clean it off by using the Close All Windows option from the Window List menu.
Then click on the 3DFly Through icon on the toolbar (the one that looks like an airplane with a head-on view). Alternatively, you
can select Fly Through from the DISPLAY menu.
B Look very carefully at the graphics on the Fly Through dialog. A fly through is created by specifying a digital elevation model
(DEM) and (typically) an image to drape upon it. Then you control your flight with a few simple controls.
Movement is controlled with the arrow keys. You will want to control these with one hand. Since you will less often be moving
backwards, try using your index and two middle fingers to control the forward and left and right keys. Note that you can press
more than one key simultaneously. Thus pressing the left and forward keys together will cause you to move in a left curve, while
holding these two keys and increasing your altitude will cause you to rise in a spiral.
You can control your altitude using the shift and control keys. Typically you will want to use your other hand for this on the
opposite side of the keyboard. Thus using your left and right hands together, you have complete flight control. Again, remember
that you can use these keys simultaneously! Also note that you are always flying horizontally, so that if you remove your fingers
from the altitude controls, you will be flying level with the ground.
Finally you can move your view up and down with the Page Up and Page Down keys. Initially your view will be slightly down
from level. Using these keys, you can move between the extremes of level and straight down.
Here is a strategy for your first flight. You may wish to maximize the Fly Through display window, but note that it will take a few
moments. Start by moving forward only. Then try using the left and right arrows in combination with the forward arrow. When
you get close to the model, try using the altitude keys in combination with the horizontal movement keys. Then experiment ...
youll get the hang of it very soon.
Here are some other points about Fly Through that you should note:
A right mouse click in the display area will provide several additional display options including the ability to change the
background color and view of the sky.
Fly Through occurs in a separate window from TerrSet. If you click on the main TerrSet window, the Fly Through display
might slip behind TerrSet. However, you can always click on its icon in the Windows taskbar to bring it back to the front.
Fly Through requires very substantial computing resources. It is constructed using OpenGL -- a special applications
programming interface designed for constructing interactive 3-D applications. Many newer graphics cards have special
settings for optimizing the performance of OpenGL. However, experiment with care and pay special attention to limitations
regarding display resolution. In general, the key to working with large images (with or without special support for OpenGL)
is having adequate RAM -- 256 megabytes should generally be regarded as a minimum. 512 megabytes to 1 gigabyte are really
required for smooth movement around very large images. Experiment using the three options for resource use (see the next
bullet) and varying image sizes. Also note that you should close all unnecessary applications and map windows to maximize
the amount of RAM available. See the Fly Through Help for more suggestions if problems occur.
Fly Through actually constructs a triangulated irregular network (TIN) for the interactive display -- i.e., the surface is
constructed from a series of connected triangular facets. Changing the resolution option affects both the resolution of the
drape image and the underlying TIN. However, in general, a smaller image with higher resource use will lead to the best
display. Again, experiment. If the triangular facets become disturbingly obvious, either move to a smaller image size or zoom
out to a higher altitude. Note that poor resolution may lead to some unusual interactions between the three-dimensional
model and the draped image (such as streams flowing uphill).
If surfaces were displayed true to scale in their vertical axis, they would typically appear to have very little relief. As a result,
the system automatically estimates a default exaggeration. In general this will work well. However, specific locations may
need adjustment. To do this, close any open Fly Through window and redisplay after adjusting the exaggeration factor. A
value of 50% will yield half the exaggeration while 200% will double it. 0% will clearly lead to a flat surface.
C Using Fly Through, use the images SFDEM and SF234 to open the 3-D display window. Maximize the display window. When the
3-D display window appears, right-click and select the Load option and load the file SF.CSV. Right-click again and select Play (F9).
This will replay a recorded flight path we developed. You can use the speed keys F10 and F9 to pause and play the loaded path.
You can also create your own and save it to an AVI file to be played back in Media Viewer or embed it into a PowerPoint
presentation!
Illuminate
The most dramatic Fly Through scenes are those that contain illumination effects. The shading associated with sunlight shining on a surface
is an important input to three-dimensional vision. Satellite imagery naturally contains illumination shading. However, this is not the case
with other layers. Fortunately, the ILLUMINATE module can be used to add illumination effects to any raster layer.
D To appreciate the scope of the issue, first close all windows (including Fly Through) and then use Fly Through to explore the DEM
named SIERRADEM without a drape image. Use all of the default settings. Although this image does not contain any illumination
effects, it does present a reasonable impression of topography because the hypsometric tints (elevation-based colors) are directly
related to the topography.
E Close the Fly Through display window and then use Fly Through to explore SIERRADEM using SIERRAFIRERISK as the drape
image. Use the user-defined palette named Sierrafirerisk and the defaults for all other settings. As you will note, the sense of
topographic relief exists but is not great. The problem here is that the colors have no necessary relationship to the terrain and there
is no shading related to illumination. This is where ILLUMINATE can help.
F Go to the DISPLAY menu and launch ILLUMINATE. Use the default option to illuminate an image by creating hillshading for a
DEM. Specify SIERRAFIRERISK as the 256 color image to be illuminated1 and specify Sierrafirerisk as the palette to be used. Then
specify SIERRADEM as the digital elevation model and SIERRAILLUMINATED as the name of the output image. The blend and
sun orientation parameters can be left as they are.2 You will note that the result is the same as you might have produced using the
Blend option of Composer. The difference, however, is that you have created a single image that can be draped onto a DEM either
with Fly Through or with ORTHO.
G Finally, run Fly Through using SIERRADEM and SIERRAILLUMINATED. As you can see, the result is clearly superior!
1
The implication is that any image that is not in byte binary format will need to be converted to that form through the use of modules such as STRETCH (for
quantitative data), RECLASS (for qualitative data), or CONVERT (for integer images that have data values between 0-255 and thus simply need to be converted to a
byte format.
2
ILLUMINATE performs an automatic contrast stretch that will negate much of the impact of varying the sun elevation angle. However, the sun azimuth will be very
noticeable. If you wish to have more control over the hillshading component, create it separately using the HILLSHADE module and then use the second option of
ILUMINATE.
As should now be evident, one of the remarkable features of a GIS is that maps can be actively queried. They are not simply static
representations of singular themes, but collections of data that can be viewed in myriad ways. In this exercise, we will consolidate and extend
some of the interactive map query techniques already discussed.
A First, close any open map windows. Then use Display Launcher and display the raster layer SIERRA234. Since this is a 24-bit
image, no palette is needed.
A 24-bit image is so named because it defines all possible colors (within reason) by means of the mixture of red, green and blue (RGB)
additive primaries needed to create any color. Each of these primaries is encoded using 8 bits of computer memory (thus 24 bits over all three
primaries) meaning that it encodes up to 256 levels from dark to bright for each primary.1 This yields a total of 16,777,216 combinations of
colora range typically called true color.2 24-bit images specify exactly how each pixel should be displayed, and are commonly used in
Remote Sensing applications. However, most GIS applications use "single band" images (i.e., raster images that only contain a single type of
information), thus requiring a palette to specify how the grid values should be interpreted as colors.
B Keeping SIERRA234 on the screen, use DISPLAY Launcher to display SIERRA4 and SIERRANDVI. Use the Grey Scale palette for
the first of these and the NDVI palette for the second.
C Each of these two images is a "single band" image, thus requiring the specification of a palette. Each palette contains up to 256
consecutive colors. Click on the Identify tool from the tool bar and then click various pixels in all three images.
Without clicking on the Identify tool, clicking in any image will show the pixel value at the cursor location. Clicking on the Identify tool from
the icon bar will open the Identify box to the right the image showing the pixel value and the x and y location. As you click in the SIERRA234
1
In the binary number system, 00000000 (8 bits) equals 0 in the decimal system, while 11111111 (8 bits) equals 255 in the decimal system (a total of 256 values).
2
The degree to which this image will show its true colors will also depend upon your graphics system and its setting. You may wish to review your settings by looking
at your display system properties (accessible through Control Panel). With the system set to 256 colors, the rendition may seem somewhat poor. Obviously, setting
the system to 24-bit (true color) will give the best performance. Many systems offer 16-bit color as well, which is almost indistinguishable from 24-bit.
The SIERRA4 image is a Landsat satellite Band 4 image and shows the degree to which the landscape has reflected near-infrared wavelength
energy from the sun. It is identical in concept to a black and white photograph, even though it was taken with a scanner system rather than a
camera. This single band image is also quantized to 256 levels, ranging from 0 (depicted as black with the Grey Scale palette) to 255 (shown as
white with the Grey Scale palette). Note that this band is also one of the three components of SIERRA234. In SIERRA234, the Band 4
component is associated with the red primary.3
In the SIERRA4 image, there is a direct correspondence between pixel values and colors. For example, in the Grey Scale palette, middle grey
occupies the 128th position (half way between black at 0 and white at 255), and will be assigned to any pixels that have a value of 128.
However, notice that the SIERRANDVI image does not have this correspondence. Here the values range from -0.30 to 0.72. In cases such as
this, TerrSet uses a system of autoscaling to assign cell values to palette colors. We will explore the issue of autoscaling more thoroughly in
Exercise 1-8. For now, simply recognize that, by default, the system evenly divides the actual number range (-0.30 to 0.72) into 256 classes and
assigns each a color from the palette. For example, all cells with values between -0.300 and -0.296 are assigned color 0, those between -0.296
and -0.292 are assigned color 1, and so on.
Now lets see how we can view all the pixel values across many images at any location. To do this, again we will use the Identify tool.
D From TerrSet Explorer, highlight the six SIERRA raw bands, SIERRA1, SIERRA2, SIERRA3, SIERRA4, SIERRA5, and SIERRA7.
Once they are highlighted, right-click in TerrSet Explorer and select Add Layer. This will display all 6 bands into one map
window.
E Now, with the Identify tool selected, click anywhere in the map composition to view the pixel value across all the bands. The
values will be shown in the Identify box.
F The graphing option of the Identify tool also works by autoscaling. Click on the View as Graph checkbox at the bottom of the
Identify box to change the display to graph mode and then click around in the map composition containing the 6 images. By
default, the bars for each image are scaled in length between the minimum and maximum for that image. Thus a half-length bar
would signify that the selected pixel has a value half-way between the minimum and maximum for that image. This is called
independent scaling. However, notice that there is also a button to toggle this to relative scaling. In this case, all the bars are scaled
to a uniform minimum and maximum for the entire group. Try this. You will be required to specify the minimum and maximum
to be used. You can accept the default offered.
3
It has become common to specify the primaries from long to short wavelength (RGB) while satellite image bands are commonly specified from short to long
wavelengths (e.g., SIERRA234 which is composed from the green, red and near-infrared wavelengths, and assigned the blue, green and red primaries respectively).
G Close all map windows. Then use DISPLAY Launcher and select from the SIERRA group the raster layer SIERRA234. It is
important here that this be selected from the group (i.e., that its name is specified as SIERRA.SIERRA234 in the input box). Again,
since this is a 24-bit image, no palette is needed. Alternatively, you can display this file from TerrSet Explorer by selecting the file
from within the SIERRA group file. To verify that it is displayed correctly with the dot-logic, the banner of the map window
should read SIERRA.SIERRA234.
H Now display SIERRA2, SIERRA3 and SIERRA4 using the dot-logic, that is, display the images by selecting them from within the
SIERRA group file.
I Close the Identify box. Notice that this does not turn off the simpler Identify Mode. Now move the three images on your screen so
that you can see as much as possible of all three. Then click on the SIERRA.SIERRA234 layer to give it focus. Using the pan and
zoom keys, move around this image.
Normally, pan and zoom operations only affect the map window that has focus. However, since each of these map windows
belongs to a common group, their pan and zoom operations can also be linked.
Placemarks
As you zoom into various parts of a map, you may wish to save a particular view in order to return to it at a later time. This can be achieved
through the use of placemarks. A placemark is the spatial equivalent of a bookmark.
Use DISPLAY Launcher to bring up any layer you wish. Then use the zoom and pan keys to zoom into a specific view. Save that
K view by clicking on the Placemarks icon (next to the Group Link icon).
The Placemarks tab of the Map Properties dialog is displayed. We will explore this dialog in much greater depth in the next
exercise. For now, click on the Add Current View as a New Placemark button to save your view. Then type in any name you wish
into the input box that opens on the right, and click the Enter and OK buttons.
Now zoom to another view, add it as a second placemark, and then exit from the Placemarks dialog. Press the Home key to
restore the original map window. At this point, your view corresponds with neither placemark. To return to one of your
TerrSet allows you to maintain up to 10 placemarks per map composition, where a composition consists of a single map window with one or
more layers. In the next exercise, we will explore map compositions in depth. However, for now it is simply necessary to recognize that
placemarks will be lost if a map window is removed from the screen without saving the composition, and that placemarks apply to the
composition and not to the individual map layer per se.
By now you have gained some familiarity with Composerthe utility that is present whenever a map window is on the screen. However, as
you will see in this illustration, it is but one piece of a very powerful system for map composition.
Map Components
A map composition consists of one or more map layers along with any number of ancillary map components, such as titles, a scale bar and so
on. Here we review each of these constituent elements.
Map Window
The map window is the window within which all map components are contained. A new map window is created each time you use DISPLAY
Launcher. The map window can be thought of as the piece of paper upon which you create your composition. Although DISPLAY Launcher
sets the size of the map window automatically, you can change its size either by pressing the End or Home keys. You can also move the mouse
over one of its borders, hold the left mouse button down, and then drag the border in or out.
Layer Frame
The layer frame is a rectangular region in which map layers are displayed. When you use DISPLAY Launcher, and choose not to display a title
or legend, the layer frame and the map window are exactly the same size. When you also choose to display a legend, however, the map
window is opened up to accommodate the legend to the right of the layer frame. In this case the map window is larger than the layer frame.
This is not merely a semantic distinction. As you will see in the practical sequence below, there is truly a layer frame object that contains the
map layers and that can be resized and moved. Each map composition contains one layer frame.
Legends
Legends can be constructed for raster layers and point, line and polygon vector layers. Like all map components, they are sizable and
positionable. The system allows you to display legends for up to five layers simultaneously. The text content of legends is derived either from
the legend information carried in the documentation file of the layer involved, or is constructed automatically by the system.
North Arrow
The standard north arrow supplied allows not only text and color changes, but can also be varied in its declination (its angle from grid north).
Declination angles are always specified as azimuths (as an angle from 0-360, clockwise from north).
Titles
In addition to text layers (which annotate layer features), you also have the ability to add up to three free-floating titles. These are referred to
as the title, sub-title and caption. However, they are all map objects of identical character and can thus be used for any purpose whatsoever.
Text Frame
In addition to titles, you can also incorporate a text frame. A text frame is a sizable and placeable rectangular box that contains text. It is
commonly used for blocks of descriptive text or credits. There is no limit on the amount of text, although it is rare that more than a paragraph
or two would be used (for reasons related to map composition space).
Graphic Insets
TerrSet also allows you to incorporate up to two graphic insets into your map. A graphic inset can be either a Windows Metafile (.wmf), an
Enhanced Windows Metafile (.emf) or a Windows Bitmap (.bmp) file. It is both sizable and placeable. Note that the Windows Metafile (.wmf)
format has now been superseded by the Enhanced Windows Metafile (.emf), which is preferred.
Map Grid
A map grid can also be incorporated into your composition quite easily. Parameters include the position of the origin and the increment (i.e.,
interval) in X and Y and the ability to display grids or tics. The grid is automatically labeled and can be varied in its position and color and
text font.
Backgrounds
All map components have backgrounds. By default, all are white. However, each can be varied individually or as a group. The layer frame and
map window backgrounds deserve special mention.
When one or more raster layers is present in the composition, the background of the layer frame will never be visible. However, when only
vector layers are involved, the layer frame background will be evident wherever no feature is present. For example, if you were creating a map
of an island with vector layers, you might wish to color the layer frame background blue to convey the sense of its surrounding ocean.
A Use DISPLAY Launcher to launch a map window with the raster layer named WESTLUSE. Choose the user-defined palette
WESTLUSE. Also, be sure the legend and title options are both checked. Then click OK.
DISPLAY Launcher provides a quick composition facility for a single layer, with automatic placement of both the title and the legend (if
chosen). To add further layers or map components, however, we will need to use other tools. Let's first add some further layers to the
composition. All additional layers are added with Composer.
B Click on the Add Layer button of Composer.1 Then add the vector layer named WESTROAD using the symbol file also named
WESTROAD. Then click on Add Layer again and add the vector text layer named WESTBOROTXT. It also has a special symbol
file, named WESTBOROTXT.
The text here is probably very hard to read. Therefore, press the End key (or click the Full Extent Maximized button on the tool
bar) to enlarge your composition. Depending upon your display resolution, this may or may not have helped much. However, this
is a limitation of your display system only. When it is printed, the text will have significantly better quality (because printers
characteristically have higher display resolutions than monitors).
C An additional feature of text layers is that they maintain their relative size. Use the PgUp and PgDn keys to zoom into the map.
Notice how the text gets physically bigger, but retains its relative size. As you will see later, there is a way in which you can
specifically set the relationship between map scale and text size.
D Press the Home key and then the End key to return to the previous state of the composition. Then click the Map Properties button
on Composer. This tabbed page dialog contains the means of controlling all non-layer components of the composition.
By default, the Map Properties dialog opens to the Legends tab. In this case, we need to add a legend for the roads layer. Notice
how the first legend object is set to the WESTLUSE layer. This was set when you chose to display a legend when first launching
the layer. We therefore will need to use one of the other legend objects. Click the down arrow of the layer name input box for
Legend 2 for a list of all the layers in the composition. Select the WESTROAD layer. Notice how the visible property is
automatically selected. Now click the Select Font button and set the text to be 8-point, the font to be Arial, the style to be regular,
1
There are two short-cut keys for Add Layer, r for raster and v for vector. With a map layer in focus, hit the r or v key to bring up the Add Layer dialog box.
E When DISPLAY Launcher initiates the display, it is in complete control of where all elements belong. However, after it is
displayed, we can alter the location and the size of any component. Move the mouse over the roads legend and double-click onto
it. This will produce a set of sizing/move bars along the edge of the component. Once they appear, the component can be either
resized and/or moved. In this case, we simply want to move it. Place the mouse over the legend and hold the left button down to
drag to a new location. Then to fix it in place (and thereby stop the drag/size operation), click on any other map component (or
the banner of the map window). Do this now. You will know you have been successful if the sizing bars disappear.
Note that in Composer, Auto-Arrange is on by default whereby map elements such as titles, legends, scale bar, insets, etc. are
automatically arranged. When the Home and End key are pressed, the map compostion will return to its default display state.
Turning off the Auto-Arrange option allows the manual positioning of map elements.
F
Now move the mouse over the title and click the right mouse button. Right clicking over any map composition element will
launch the Map Properties dialog with the appropriate tab for the map component involved.2 Notice how the Title component has
been set to visible. Again, this was set when the land use layer was launched. When the title option was selected in DISPLAY
Launcher, it adopted the text of the title entry in the documentation file for that layer.3 However, we are going to change this.
Change the title to read "Westborough, Massachusetts." Then click on the Select Font button and change the font to Times New
Roman, bold italic style, maroon color and 22-point size.
Next, click into the Caption Text input box and type "Landuse / Landcover." Set the font to be bold 8-point Arial, in maroon.
Then click OK.
G Turn off Auto-Arrange in Composer. Now bring up Map Properties again and select the Graphic Insets tab. Use the Browse
button to find the WESTBORO.BMP bitmap. Select this file and then set the Stretchable property on and the Show Border option
off. Then click OK. You will immediately note that you will need to both position and size this component. Double-click onto the
inset and move it so that its bottom-right corner is in the bottom-right corner of the map window, allowing a small margin equal
to that between the layer frame and the map window. Then grab the upper-left grab bar and drag it diagonally up and to the left so
that the inset occupies the full width of the legend area (again leaving a small margin equal to that placed on the right side). Also
be sure that the shape is roughly square. Then click any other component (of the map window banner) to set the inset in place.
H Now bring up Map Properties again and select the Scale Bar tab. Set the Units text to Meters, the number of divisions to 4 and the
length to 2000. Also click the Select Font button and set it to 8-point regular black Arial and click OK. Then double-click onto the
scale bar and move it to a position between the inset and the roads legend. Click onto the map window banner to set it in place.
I Now select the Background tab from Map Properties. Click into the Map Window Background Color box to bring up the color
selection dialog. Select the upper-left-most color box and click the Define Custom Colors button. This will yield an expanded
dialog in which colors can be set graphically, or by means of their RGB or HLS color specifications. Set the Red, Green and Blue
coordinates to 255, 221 and 157 respectively. Then click on the Add to Custom Colors button, followed by the OK button. Now
2
In the case of right clicking over the layer frame, the default legend tab is activated.
3
If the title entry in the documentation file is blank, no title will appear even though space has been left for it.
J This time select the Map Grid tab from Map Properties. Set the origin X and Y coordinates to 0 and the increment in both X and Y
to be 200. Click the Current View option under the Map Grid Bounds. Choose the text option to Number inside. Set the color (by
clicking onto its box) to be the bright cyan (aquamarine) color in column 5, row 2 of the color selection options. Set the Decimal
Places to 0 and the Grid Line Width to 1. Then set the font to regular 8-point Arial with an Aqua color (to match the grid). Then
click OK to see the result.
Finally, bring up Map Properties and go to the GeoReferencing tab. We will not change anything here, but simply examine its
K contents. This tab is used to set specific boundaries to the composition and the current view. Note that the units are specified in
the actual map reference units, which may represent a multiple of ground units. In this case, each map reference unit represents 20
meters. Note also the entries to change the relationship of Reference System coordinates to Text Points. At the moment, it has
been set to 1. This means that each text point is the equivalent of 1 map unit, which in turn represents 20 meters. Thus, for
example, a text label of 8-points would span an equivalent of 160 meters on the ground. Changing this value to 2 would mean that
8-point text would then span 320 meters. Try this if you would like. You will need to click on OK to have the change take place.
However, be sure to change it back to 1 before finishing.
L Next, let's go to the North Arrow tab. Select one of the north arrows with your cursor. This will automatically select the visible
option. Besides the default north arrows, you have the option of creating your own and importing these and a BMP or EMF. You
have additional options for setting background color and declination. Like all other components, the North Arrow is also
placeable and sizable. Place it below the legends.
N Click the Save button on Composer. Note the variety of options you have. However, only the first truly saves your composition in
a form that will allow you to recreate and further edit or extend your map composition. Click it now, and save it to a Map
Composition named WESTBORO. This will create a map composition file named "WESTBORO.MAP" in your Working Folder.
However, note that it only contains the instructions on how to create the map and not the actual data layers. It assumes that when
it recreates the map, it will be able to find the layers you reference in either the Working Folder or one of the Resource Folders of
the current Project Environment. Thus if you wish to copy the composition to another location, you should remember to copy
both the ".map" file and all layer, palette and symbol files required. (The TerrSet Explorer may be used to copy files.)
O Once you have saved your composition, remove it from the screen. Then call DISPLAY Launcher and select the Map Composition
File option and search for your composition named WESTBORO. Then simply click OK to view the result. Once your
composition has finished displaying, you are exactly where you left off.
After you have reviewed the graphics options, set the paper orientation to landscape and then print your map.
You should always work with True Type fonts if you intend to print your map. Non-True Type fonts cannot be rotated properly (or
at all) by Windows (even on screen). In addition, some printers will substitute different fonts for non-True Type fonts without
asking for your permission. True Type fonts are always specially marked by Windows in the font selection dialog.
Some printers provide options to render True Type fonts as graphics or to download them as "soft fonts." Experiment with both
options, but most printers with this option require the "soft fonts" option in order to print text backgrounds correctly.
Probably the best value for money in printers for GIS and Image Processing lies with color ink jet printers. However, the quality of
paper makes a huge difference. Photo quality papers will yield stunning results, while draft quality papers may be blurred with poor
color fidelity.
Throughout the preceding exercises, we have been using palettes and symbol files to graphically render map layers. Through the Advanced
Palette/Symbol Selection options of DISPLAY Launcher and Layer Properties in Composer, TerrSet provides over 1300 pre-defined palettes
and symbol files. However, there are times when you will need to make a special palette for a specific map layer. In this exercise, we explore
how to create these files. In addition, we explore the creation of text layers (a major form of annotation) through digitizing.
A Find the icon for Symbol Workshop and click it. We will create a new palette to render topographic surfaces. Notice the large
matrix of boxes on the right. These represent the 256 colors that are possible in a color palette.1 Currently, they are all set to the
same color. We will change this in a moment. Now move your mouse over these boxes and notice that as the mouse is over each
box, a hint is displayed indicating which of the 256 palette entries that box represents.
From the File menu, select New. Specify a palette as the type of symbol and the name ETDEM as the filename and click OK.
B Click into the box for palette entry 0. You will now be presented with the standard Windows color dialog. The color we want for
this entry is black, which is the sample color in the lower-left corner of the basic colors section of the dialog box. Select it and then
click OK.
C Now click into the box for palette entry number 17. Define a custom color by setting the values for Red, Green and Blue (RGB) to
136 222 64 and click OK. Then set the From blend option to 0 and the To blend option to 17 and click the Blend button.
D Now locate palette entry 51 and set its RGB values to 255 232 123. Set the blend limits from 17 to 51 and click the Blend button.
1
This limit of 256 colors per palette is set by Windows.
F Set palette entry 238 to an RGB of 180 255 255. Then blend from 119 to 238.
G Finally, set palette entry 255 to white. This is the sample color in the lower right corner of the basic colors section (or you can set it
with an RGB of 255 255 255). Then blend from 238 to 255. This completes the palette. We can save it now by selecting the Save
option from Symbol Workshop's File menu. Exit from Symbol Workshop.
H Now use DISPLAY Launcher to view the image named ETDEM. You will notice that DISPLAY Launcher automatically detects
that a palette exists with the same name as the image to be displayed, and therefore assumes that you want to use it. However, if
you had used a different name, you would simply need to select the Other/User-defined option and choose the palette you just
created from the pick list.2
I Use the Add Layer button on Composer and add the file named ETPROV with the Outline Black symbol file. As you can see, these
lines (thin solid black) are somewhat too dark for the delicate palette we've created. Therefore, let's create a new symbol file using
grey lines.
J Open Symbol Workshop either from the Display menu or by clicking on its icon. Under Symbol Workshop's File menu, select
New. When the New Symbol File dialog appears, click on Line and specify the name Grey.
Now select line symbol 0 and set its width to 1 and its style to solid. Then click on the color box to access the Windows color
K dialog to set its color to RGB 128 128 128. Click OK to exit the color selection dialog and again to exit the line symbol dialog.
L Now click on the Copy button. By default, this function is set to copy the symbol characteristics from symbol 0 to all other
symbols. Therefore, all 256 symbols should now appear the same as symbol 0. Choose Save from the Symbol Workshop File menu
and close Symbol Workshop.
M We will now apply the symbol file we just created to the province boundaries vector layer in the map display. Click on the entry
for ETPROV in the Composer list (to select it), then click the Layer Properties button. Change the symbol file to Grey. Then click
on the OK button of the Layer Properties dialog. The more subtle medium grey province boundaries go well with the colors of the
elevation palette.
N Open Symbol Workshop and from the File menu, select New. In the New Symbol File dialog, specify Text and input the name
PROVTEXT. Select text symbol 0 and set its characteristics to 12 point bold italic Times New Roman in maroon. Click OK to
return to the main Symbol Workshop dialog, and use the Copy button to copy this symbol to all other categories. Then Save the
file (from the File menu) and exit Symbol Workshop.
We now have a symbol file to use in labeling the provinces. To create the text layer with the province names, we will use the TerrSet on-screen
digitizing utility. Before beginning, however, examine the provinces as delineated in your composition. Notice that if you start at the
northernmost province and move clockwise around the boundary, you can count 11 provinces, with two additional provinces in the middle
a northern one and a southern one. This is the order we will digitize in: number 1 for the northernmost province, number 2 for that which
borders it in the clockwise direction, and so on, finishing with number 13 as the more southerly of the two inner provinces.
O
First, press the End key to make your composition as large as possible. Then click the digitize icon on the tool bar (the one with
the cross in a circle). If the highlighted layer in Composer is the ETPROV layer, you will then be asked if you wish to add features
to this existing layer, or create a new layer. Indicate that you wish to create a new layer. If, on the other hand, the highlighted layer
in Composer was the ETDEM layer, it would automatically assume that you wished to create a new layer since ETDEM is raster,
and the on-screen digitizing feature always creates vector layers.
P Specify PROVTEXT as the name of the layer to be created and click on Text as the layer type. For the symbol file, specify the
PROVTEXT symbol file you just created. Specify 1 as the index of the first feature, make sure the Automatic Index feature is
selected, and click OK. Now move to the middle of the northernmost province and click the left mouse button. Enter TIGRAY as
the text for the label. Most other elements can be left at their default values. However, select the Specify Rotation Angle option,
and leave it at its default value of 90.3 Also, the relative caption position should be set to Center. Then click OK.
Q Repeat this action for each of the remaining provinces. Their names and their feature ID's (the symbol type will remain at 1 for all
cases) are listed below. Remember to digitize them in clockwise order. For the two center provinces, digitize the northern one first.
2 Welo
3 Harerge
4 Bale
5 Sidamo
6 Gamo Gofa
7 Kefa
8 Ilubabor
9 Welega
10 Gojam
11 Gonder
12 Shewa
13 Arsi
3
Text rotation angles are specified as azimuths (i.e., clockwise from north). Thus, 90 yields standard horizontal text while 270 produces text that is upside-down.
R When we initially created this text layer, we made all text labels horizontal. Let's delete the label for Shewa and put it on an angle
with the same orientation as the province. Make sure the text layer, PROVTEXT is highlighted in Composer. Click on the Delete
Feature icon on the tool bar (a red X to the right of the Digitize icon). Then move the mouse over the Shewa label and click the left
mouse button to select it. Press the Delete key on the keyboard. TerrSet will prompt you with a message to confirm that you do
wish to delete the feature. Click Yes. Click on the Delete Feature icon again to release this mode. Now click the Digitize icon and
indicate that you wish to add a feature to the existing layer. Specify that the index of the first feature to be added should be 12.
Then move the cursor to the center of the Shewa province and click the left mouse button. As before, type in the name Shewa, but
this time, indicate that you wish to use Interactive Rotation Specification Mode. Then click OK and move the cursor to the right.
Notice the rotation angle line. This is used simply to facilitate specification of the rotation angle. The length of the line has no
significanceonly the angle is meaningful. Now rotate the line to the northeast to an angle that is similar to the angle of the
province itself. Finally click the left mouse button to place the text.
If you made any mistakes in constructing the text layer, you can correct them in the same manner. Otherwise, click the right
mouse button to finish digitizing and then save your revised layer by clicking on the Save Digitized Data icon on the tool bar.4
S To complete your composition, place the legend for the elevation layer in the upper-left corner of the layer frame. Since the
background color is black, you will want to use Map Properties to change the text color of the legend to be white and its
background to be black.
T Add any other map components you wish and then save the composition under the name ETHIOPIA.
Photo Layers
A photo layer is a special example of a text layer. It was developed specifically for use with ground truthing. This final section of the exercise
will demonstrate using Photo Layers as part of a ground truth exercise in Venezuela. Photo Layers are created as text layers during the on-
screen digitizing process, either through digitizing a new text layer or when laying down waypoints during GPS interaction. In both cases,
entering the correct syntax for the text caption will create a Photo Layer.
V Using DISPLAY Launcher, display the layer LANDSAT345_JUNE2001. Then, use Add Layer on Composer to add the vector text
layer CORRIDOR.
4
If you forget to save your digitizing, TerrSet will ask if you wish to save your data when you exit.
When the text layer is displayed, text labels associated with photos will be underlined. In our case, the text labels shown are different times
during the day, but on different days.
W Using Identify, click on the text location. The photos associated only with that label will be displayed. Only one photo layer label
can be displayed at a time. Click on the other text labels and the previous photos will be removed as other layers are displayed.
Each photo shown corresponds exactly to the view azimuth at the location where the photo was taken. When you move the mouse
over the banner of a photo, its title will be displayed. In our case, each photo has a title corresponding to the name of the photo,
and also its azimuth. Arrows will correspond to the azimuth.
You will want to review the Help on Photo Layers for complete detail on creating these text layers. Once created, you can use them to recall
your ground truth experience.
A Use DISPLAY Launcher to view both the WESTBORO and ETHIOPIA map compositions
created in Exercises 1-6 and 1-7.1 Notice the difference between the legends for the WESTLUSE
layer of the WESTBORO composition and the ETDEM legend of the ETHIOPIA composition.
To appreciate the reasons for this difference, choose TerrSet Explorer from the File menu or
click on its icon (the first icon).
TerrSet Explorer is a general purpose utility to manage and explore TerrSet files and projects. You can use
TerrSet Explorer to set your project environment, manage your group files, review metadata, display files,
and simply organize your data with such tools as copy, delete, rename, and move commands. You can use
TerrSet Explorer to view the structure of TerrSet file formats and to drag and drop files into TerrSet dialog
boxes. TerrSet Explorer is permanently docked to the left of the TerrSet desktop. It cannot be moved but it
can be minimized and horizontally resized.
With the Files tab selected in TerrSet Explorer, you will notice a filters tab where you can select the files that
only files selected with the filter will show in the files list. Notice that there is a Filters tab where one can
select the files to be shown in the Files tab. Alternatively, you can alter the filter at the bottom of the Files
pane. When you first open TerrSet Explorer, it automatically lists the files in your Working Folder.
However, like the pick-list, you can select to show files in any of your Resource Folders as well.
B
From the Files tab, select the folder that contains the WESTLUSE and ETDEM raster images.
Find the file WESTLUSE and right-click on its filename.
By right-clicking on any file or files you will be presented with a host of utilities including copying, deleting
and renaming files, along with a second set of utilities for showing its structure and/or for viewing file
contents of a binary file. We will use these latter operations in this exercise.
C Right-click again in the Files pane and make sure that the Metadata option is selected and
showing on the bottom half of the Files tab. Now, notice as you select any file, the metadata for
that file is shown. Again, highlight the WESTLUSE layer. Notice that the name is listed as
1
If you did not complete the earlier exercises, display the raster image WESTLUSE with the palette WESTLUSE and a legend. Also display ETDEM with the ETDEM
palette (or the Default Quantitative palette) and a legend. Then continue with this exercise.
Now change the filter to show all files. Go to the input box below the Files pane and select the pull-down menu. Select the All Files
(*.*) option. Now locate again WESTLUSE.RST. Notice, however, that also shown is a second file with an ".rdc" extension. The
".rdc" file is its accompanying metadata file. The term metadata means "data about data," i.e., documentation (which explains the
"rdc" extensionit stands for "raster documentation"). The data shown in the Metadata pane come from the .rdc files. Vector
files also have a documentation file, .vdc.
Change the filter back again to the default listing. You can do this from the pull-down menu.
D Now with WESTLUSE highlighted, right-click and choose the Show Structure option. This shows the actual data values behind the
upper left-most portion (8 columns and 16 rows) of the raster image. Each of these numbers represents a land use type, and is
symbolized by the corresponding palette entry. For example, cells with a number 3 indicate forested land and are symbolized with
the third color in the WESTLUSE palette. Use the arrow keys to move around the image. Then close the Show Structure dialog.
E Make sure that the WESTLUSE raster layer is still highlighted in TerrSet Explorer, and view its metadata which will show us the
contents of the "WESTLUSE.RDC" file. This file contains the fundamental information that allows the file to be displayed as a
raster image and to be registered with other map data.
The file type is specified as binary, meaning that numeric values are stored in standard IEEE base 2 format. The Show Structure utility in
TerrSet Explorer allows us to view these values in the familiar base 10 numeric system. However, they are not directly accessible through
other means such as a word processor. TerrSet also provides the ability to convert raster images to an ASCII2 format, although this format is
only used to facilitate import and export.
The data type is byte. This is a special sub-type of integer. Integer numbers have no fractional parts, increasing only by whole number steps.
The byte data type includes only the positive integers between 0 and 255. In contrast, files designated as having an integer data type can
contain any whole numbers from -32768 to + 32767. The reason that they both exist is that byte files only require one byte per cell whereas
integer files require 2. Thus, if only a limited integer range is required (as in this case), use of the byte data type can halve the amount of
computer storage space required. Raster files can also be stored as real numbers, as will be discussed below.
The columns and rows indicate the basic raster structure. Note that you cannot change this structure by simply changing these values. Entries
in a documentation file simply describe what exists. Changing the structure of a file requires the use of special procedures (which are
extensively provided within TerrSet). For example, to change the data type of a file from byte to integer, you would use the module
CONVERT.
There are seven fields related to the reference system to indicate where the image exists in space. The Georeferencing chapter in the TerrSet
Manual gives extensive details on these entries. However, for now, simply recognize that the reference system is typically the name of a
special reference system parameter file (called a REF file in TerrSet) that is stored in the GEOREF sub-folder of the TerrSet program
directory. Reference units can be meters, feet, kilometers, miles, degrees or radians (abbreviated m, ft, km, mi, deg, rad). The unit distance
multiplier is used to accommodate units of other types (e.g., minutes). Thus, if the units are one of the six recognized unit types, the unit
2
ASCII is the American Standard Code for Information Interchange. It was one of the earliest coding standards for the digital representation of alphabetic characters,
numerals and symbols. Each ASCII character takes one byte (8 bits) of memory. Recently, a new system has been introduced to cope with non-US alphabet systems
such as Greek, Chinese and Arabic. This is called UNICODE and requires 2 bytes per character. TerrSet accepts UNICODE for its text layers since the software is
used worldwide. However, the ASCII format is still very much in use as a means of storing single byte codes (such as Roman numerals), and is a subset of UNICODE.
The positional error indicates how close the actual location of a feature is to its mapped position. This is often unknown and may be left blank
or may read unknown. The resolution field indicates the size of each pixel (in X) in reference units. It may also be left blank or may read
unknown. Both the positional error and resolution fields are informational only (i.e., are not used analytically).
The minimum and maximum value fields express the lowest and highest values that occur in any cell, while the display minimum and display
maximum express the limits that are used for scaling (see below). Commonly, the display minimum and display maximum values are the
same as the minimum and maximum values.
The value units field indicates the unit of measure used for the attributes, while the value error field indicates either an RMS value for
quantitative data or a proportional error value for qualitative data. The value error field can also contain the name of an error map. Both fields
may be left blank or read unknown. They are used analytically by only a few modules.
A data flag is any special value. Some TerrSet modules recognize the data flags background or missing data as indicating non-data.
F Using WESTLUSE we see there are 13 legend categories. Either double-click in Categories input box or select the ellipse button to
the right of the Categories input box to show the legend categories. This Categories dialog box contains interpretations for each of
the land use categories. Clearly it was this information that was used to construct the legend for this layer. You can now close
Categories dialog.
G Now highlight the ETDEM raster layer in File Tab of TerrSet Explorer and right-click to Show Structure. What you will initially
see are the zeros which represent the background area. However, you may use the arrow keys to move farther to the right and
down until you reach cells within Ethiopia. Notice how some of the cells contain fractional parts. Then exit from Show Structure
and view this files Metadata.
Notice that the data type of this image is real. Real numbers are numbers that may contain fractional parts. In TerrSet, raster
images with real numbers are stored as single precision floating point numbers in standard IEEE format, requiring 4 bytes of
storage for each number. They can contain cells with data values from -1 x 1037 to +1 x 1037 with up to 7 significant figures. In
computer systems, such numbers may be expressed in general format (such as you saw in the Show Structure display) or in
scientific format. In the latter case, for example, the number 1624000 would be expressed as 1.624e+006 (i.e., 1.624 x 106).
Notice also that the minimum and maximum values range from 0 to 4267.
Now notice the number of legend categories. There is no legend stored for this image. This is logical. In these metadata files,
legend entries are simply keys to the interpretation of specific data values, and typically only apply to qualitative data. In this case,
any value represents an elevation.
H Remove everything from the screen except your ETHIOPIA composition. Then use DISPLAY Launcher to display ETDEM, and
for variety, use the TerrSet Default Quantitative palette and select 16 as the number of classes. Be sure that the legend option is
selected and then click OK. Also, for variety, click the Transparency button on Composer (the one on the far right in Composer).
When the data type is either byte or integer, and the layer contains only positive values from 0-255 (the range of permissible
values for symbol codes), TerrSet will automatically interpret cell values as symbol codes. Thus, a cell value of 3 will be interpreted
as palette color 3. In addition, if the metadata contains legend captions, it will display those captions.
If the data type is integer and contains values less than 0 or greater than 255, or if the data type is real, TerrSet will automatically
assign cells to symbols using a feature known as autoscaling and it will automatically construct a legend.
Autoscaling divides the data range into as many categories as are included in the Autoscale Min to Autoscale Max range specified
in the palette (commonly 0-255, yielding 256 categories). It then assigns cell values to palette colors using this relationship. Thus,
for example, an image with values from 1000 to 3000 would assign the value 2000 to palette entry 128.
The nature of the scaling and the legend created under autoscaling depends upon the number of classes chosen. In the User
Preferences dialog under the File menu, there is an entry for the maximum number of displayable legend categories. By default, it
is set at 16. Thus when the number of classes is 16 or less, TerrSet will display them as separate classes and construct a legend
showing the range of values assigned to each class.
When there are more than 16 classes, the result depends on the data type. When the data contain real numbers or integers with
values less than 0 or greater than 255, it will create a continuous legend with pointers to representative values (such as you see in
the ETHIOPIA composition). For cases of positive integer values less than 256, it will use a third form of legend. To appreciate
this, use DISPLAY Launcher to examine the SIERRA4 layer using the Greyscale palette. Be sure the legend option is on but that
the autoscaling option is set to Off (Direct).
In this case, the image is not autoscaled (cell values all fall within a 0-255 range). However, the range of values for which legend
captions are required exceeds the maximum set in User Preferences,3 so TerrSet provides a scrollable legend. To understand this
effect further, click on the Layer Properties button in Composer. Then, alternately set the autoscaling option to Equal Intervals
and None (Direct). Notice how the legend changes.
I You will also notice that when the autoscaling is set to Equal Intervals, the contrast of the image is improved. The Display Min and
Display Max sliders also become active when autoscaling is active. Set the autoscaling to Equal Intervals and then try sliding these
with the mouse. They can also be moved with the keyboard arrow keys (hold down the shift key with the arrows for smaller
increments).
Slide the Display Min slider to the far left. Then press the right arrow twice to move the Display Min to 26 (or close to it). Then
move the Display Max slider to the far right, followed by three clicks of the left arrow to move the Display Max to 137. Notice the
start and end legend categories on the display.
When the Display Min is increased from the actual minimum, all cell values lower than the Display Min are assigned the lowest
palette entry (black in this case). Similarly, all cell values higher than the Display Max are assigned the highest palette entry (white
in this case). This is a phenomenon called saturation. This can be very effective in improving the visual appearance of autoscaled
images, particularly those with very skewed distributions.
3
The number of displayable legend categories can be increased to a maximum of 48.
Notice that the distribution is very skewed (the maximum extends to 96 despite the fact that very few pixels have values greater
than 60). Given that the palette ranges from 0-255, the dark appearance of the image is not surprising. Virtually all values are less
than 60 and are therefore displayed with the darkest quarter of palette colors.
If the Layer Properties dialog is not visible, be sure that SIERRA2 has focus and click Layer Properties again. Now set autoscaling
to use Equal Intervals and click Apply. This provides a big improvement in contrast since the majority of cell values now cover
half the color range (which is spread between the minimum of 23 and the maximum of 96). Now slide the Display Max slider to a
value around 60. Notice the dramatic improvement! Click the Save button. This saves the new Display Min and Display Max
values to the metadata file for that layer. Now whenever you display this image with equal intervals autoscaling, these enhanced
settings will be used.
You will have noticed that there are two other options for autoscaling -- Quantiles and Standard Scores. Use DISPLAY Launcher
K to display SIERRA2 using the Greyscale palette and no autoscaling (i.e., Direct). Notice again how little contrast there is. Now go
to Layer Properties and select the Quantiles option. Notice how the contrast sliders are now greyed out. Despite this, choose 16
classes and click Apply. As you can see, the Quantiles scheme does not need any contrast enhancement! It is designed to create the
maximum degree of contrast possible by rank ordering pixel values and assigning equal numbers to each class.
Now use Layer Properties to select the Standard Scores autoscaling option using 6 classes. Click Apply. This scheme creates class
boundaries based on standard scores. The first class includes all pixels more than 2 standard deviations below the mean. The next
shows all cases between 1 and 2 standard deviations below the mean. The next shows cases from 1 standard deviation below the
mean to the mean itself. Similarly, the next class shows cases from the mean to one standard deviation above the mean, and so on.
As with the other end, the last class shows all cases of 2 or more standard deviations. For an appropriate palette, go to the
Advanced Palette / Symbol Selection dialog. Choose a Quantitative data relationship and a Bipolar (Low-High-Low) color logic.
Select the third scheme from the top of the four offered, and then set the inflection point to be 37.12 (the mean). Then click on
OK. Bipolar palettes seem to be composed of two different color groups -- in this case, the green and orange group, signifying
values below and above the mean.
L Remove all images and dialogs from the screen and then display the color composite named SIERRA345. Then click on Layer
Properties on Composer. Notice that three sets of sliders are providedone for each primary color. Also notice that the Display
Min and Max values for each are set to values other than the actual minimum and maximum for each band. This was caused by
the saturation option in COMPOSITE. They have each been moved in so that 1% of the data values is saturated at each end of the
scale for each primary.
Experiment with moving the sliders. You probably won't be able to improve on what COMPOSITE calculated. Note also that you
can revert to the original image characteristics by clicking either the Revert or Close buttons.
Scaling is a powerful visual tool. In this exercise, we have explored it only in the context of raster layers and palettes. However, the same logic
applies to vector layers. Note that when we use the interactive scaling tools, we do not alter the actual data values of the layers. Only their
appearance when displayed is changed. When we use these layers analytically the original values will be used (which is what we want).
To finish this exercise, we will use TerrSet Explorer a bit further to examine the structure of vector layers.
M Open TerrSet Explorer and make sure the filter used is displaying vector files (.vct). Then choose the WESTROAD layer and right-
click on Show Structure. As you can see, the output from this module is quite different for vector layers. Indeed, it will even differ
between vector layer types.
The WESTROAD file contains a vector line layer. However, what you see here is not the actual way it is stored. Like all TerrSet
data files, the true manner of storage is binary. To get a sense of this, close the Show Structure dialog and then right-click on
WESTROAD to Show Binary. Clearly this is unintelligible. The Show Structure procedure for vector layers provides an
interpreted format known as "Vector Export Format".4 That said, the logical correspondence between what is seen in Show
Structure and what is contained in the binary file is very close. The binary version does not contain the interpretation strings on
the left, and it encodes numbers in a standard IEEE binary format.
N Remove any displays related to Show Structure or Show Binary. Then view the Metadata button for WESTROADS. As you can
see, there is a great deal of similarity between the metadata file structures for raster and vector. The primary difference is related to
the data type field, which in this case reads ID type. Vector files always store coordinates as double precision real numbers.
However, the ID field can be either integer5 or real. When it contains a real number, it is assumed that it is a free-standing vector
layer, not associated with a database. However, when it is an integer, the value may represent an ID that is linked to a data table, or
it may be a free-standing layer. In the first case, the vector feature IDs would match a link field in a database that contains
attributes relating to the features. In the second case, the vector feature IDs would be embedded integer attributes such as
elevations or land use codes.
O You may wish to explore some other vector files with the Show Structure option to see the differences in their structure. All are
self-evident in their organization, with the exception of polygon files. To appreciate this, find the AWRAJAS2 vector layer in the
Files list. Then right-click on Show Structure. The item that may be difficult to interpret is the Number of Parts. Most polygons
will have only one part (the polygon itself). However, polygons that contain holes will have more than one part. For example, a
polygon with two holes will list three partsthe main polygon, followed by the two holes.
4
A vector export format file has a ".vxp" extension and is editable. The CONVERT module can import and export these files. In addition, the content of Show
Structure can be saved as a VXP file (simply click on the Save to File button). Furthermore, you can edit within the Show Structure dialog. If you edit a VXP file, be
sure to re-import it under a new name using CONVERT. This way your original file will be left intact. The Help System has more details on this process.
5
The integer type is not further broken down into a byte subtype as it is with raster. In fact, the integer format used for vector files is technically a long integer, with a
range within +/- 2,000,000.
A spatial frame is simply a layer that describes only the geographic character of features and not their attributes. In raster, as with vector, this
spatial frame is bound by the minimum and maximum X and Y coordinates, but with raster its attributes are tied to the actual pixel values.
And as we worked with in earlier exercises, a raster group file is essentially a simple collection of raster layers. The case of vector layers is very
different in concept. A single vector layer acts as a spatial frame but its attributes can be associated with a data table of statistics for the
features depicted. By associating a data table with attribute data for each feature, a layer can be formed from each such data field. Although
simple vector layers can exist, the power of associating unique vector features to a collection of attributes in a table is the hallmark of vector
GIS.
In TerrSet we accomplish this association between a vector spatial frame and a collection of attributes with our Database Workshop facility.
Our native database format for storing attribute data is in Microsoft Access (.accdb) format. In these remaining exercises we will explore the
use of vector collections and Database Workshop.
A Remove all map windows from the screen by choosing Close All Windows from the Window List menu.
B Bring up DISPLAY Launcher and choose to display a vector layer. Then click on the Pick List button and find the entries named
MASSTOWNS. The first one listed is a spatial frame, while the second (with the + sign beside it) is a layer collection based on that
spatial frame. Select the layer named MASSTOWNS (the one without the plus sign). Click the legend option off and then go to the
Advanced Palette/Symbol Selection tab. A spatial frame defines features but does not carry any attribute (thematic) data. Instead,
each feature is identified by an ID number. Since these numbers do not have a quantitative relationship, click on the data
relationship button for Qualitative. Then select the Variety (black outline) color logic option and click OK. The state of
Massachusetts in the USA is divided into 351 towns. If you click on the polygons with Identify, you will be able to see the ID
numbers.
Now run DISPLAY Launcher again to display a vector layer and locate the vector collection named MASSTOWNS1 (look for the
+ sign beside it). Click on either the + sign or the MASSTOWNS filename, and notice that a whole set of layer names are then
listed below it. Select the layer named POP2000. Ensure that the title and legend are checked on. Then select the Advanced
Palette/Symbol Selection tab. The data in this layer express the population in the year 2000. Since these data clearly represent
1
There is no requirement that the spatial frame and the collection based upon it have the same name. However, this is often helpful in visually associating the two.
Unipolar color schemes are those that appear to progress in a single sequence from less to more. You can easily see this in the
legend, but the map looks terrible! The problem here is that the population of Boston is so high compared to all other towns in the
state, the other towns must appear at the other end of the color scale in order to preserve the linear scaling between the colors and
the data values. To remedy this, click on Layer Properties and change the autoscaling option to be Quantiles. Then click OK.
As you can see, the quantiles autoscaling option is ideally suited to the display of highly skewed distributions such as this. It does
it by rank ordering the towns according to their data values and then assigning them in equal groups to each of a set of classes.
Notice how it automatically decided on 16 classes. However, you are not restricted to this. You can choose any number of classes
up to 16.
MASSTOWNS is a vector layer collection. In reality, the data file with the + sign beside it is a vector link file (also called a VLX file since it has
a .vlx extension, or simply a link file). A vector link file establishes a relationship between a vector spatial frame and a database table that
contains the information for a set (collection) of attributes associated with the features in the spatial frame.
C To get an understanding of this, we will open TerrSet's relational database manager, Database Workshop. Make sure the
population for 2000 (MASSTOWNS.POP2000) map window has focus (click on its banner if you are unsureit will be
highlighted when it has focus). Then click on the Database Workshop icon on the tool bar (an icon with a grid-like pattern on the
right side of the toolbar). Ordinarily, Database Workshop will ask for the name of the database and table to display. However,
since the map window with focus is already associated with a database, it displays that one automatically. Click on the map
window to give it focus and then press the Home key to make it the original size. Then resize and move Database Workshop so
that it fits below the map window and shows all columns (it will only show a few rows).
Notice also the relationship between the title in your map window and the content of Database Workshop. The first part specifies
the database that it is associated with (MASSACHUSETTS.ACCDB); the second part indicates the table (Census 2000) and the
third part specifies the column. The column names of the table match the layer names included in the MASSTOWNS layer
collection in the Pick List in DISPLAY Launcher (including POP2000). In database terminology, each column is known as a field.
The rows are known as records, each of which represents a different feature (in this case, different towns in the state). Activate
Identify mode and click on several of the polygons in the map. Notice how the active record in Database Workshop (as indicated
D When a spatial frame is linked to a data table, each field becomes a different layer. Notice that Database Workshop has an icon
that is identical to that used for DISPLAY Launcher. If you hover over the icon with your mouse, the hint text will read Display
Current Field as Map Layer. As the icon would suggest, this can be used as a shortcut to display any of the numeric data fields. To
use it, we need to choose the layer to display by simply clicking the mouse into any cell within the column of the field of interest.
In this case, move over to the POPCH80_90 (population change from 1980 to 1990) field and click into any cell in that column.
Then click the Display Current Field as Map Layer icon on Database Workshop. As this is meant as a quick display utility, the
layer is displayed with default settings. However, they can easily be changed using the Layer Properties dialog.
There are four ways in which you can specify a vector layer for display that is part of a collection. The first is to select it from the Pick List as
we did to start. The second is to display it from Database Workshop. Thirdly, we can use DISPLAY Launcher and simply type in the name
using dot logic. Finally, we can display a part of a collection from TerrSet Explorer, very much the same way as we did in DISPLAY Launcher,
by opening up the .vlx file and displaying one of the numeric fields. Notice the names of the two layers currently displayed from the
MASSTOWNS collection (as visible both in Composer and on the Map Window banners). Each starts with a prefix equal to the collection
name, followed by a dot ("."), followed by the name of the data field from which it is derived. This same naming convention can be used to
specify any layer that belongs to a collection. You may now close the map windows and Database Workshop.
E How is a vector layer collection established? It is done with the facility in Database Workshop with the Establish Display Link
option. This can be launched from an icon in Database Workshop or from the Query menu. If it is not already open, open the
MASSTOWNS.VLX database file in Database Workshop. Make sure that the Census 2000 table is selected, then open the Establish
Display Link dialog.
Notice that a vector link file contains three componentsthe name of the vector spatial frame, the database file, and the link field.
The spatial frame is any vector file which defines a set of features using a set of unique integer identifiers. In this case, the spatial
definition of the towns in the state of Massachusetts, MASSTOWNS.
The database file can be any Microsoft Access format file. In cases where a dBASE (.dbf) file is available, Database Workshop can
be used to convert it to Access format. This vector collection uses a database file called MASSACHUSETTS.ACCDB.
The link field is the field within the database table that contains the identifiers that link (i.e., match) with the identifiers used for
features in the spatial frame. This is the most important element of the vector link file, since it serves to establish the link between
records in the database and features in the vector frame file. The Town_ID field is the link field for this vector collection. It
contains the identifiers that match the feature identifiers of the polygon features of MASSTOWNS.
Note that database files can contain multiple tables and can be relational. The VLX file also stores from which table the VLX was
created. In this case, the CENSUS2000 table is used.
Our intention here is simply to examine the structure of an existing VLX file.
Once a link has been established, we can do more than simply display fields in a database. We can also export fields and directly create stand-
alone vector or raster layers.
Notice that the toolbar in Database Workshop has an icon for rapid selection of the option to create a vector file (fifth from the
left). Similarly there is one for exporting a raster layer (fourth from the left). Again, place the cursor in the field you want to
export (in this case, choose the AREA field) and then click the Create IDRISI Raster Image icon. You will be asked to specify a
name for the new layer. You can choose the suggested name and click OK. This will then yield a new display regarding reference
parameters.
Recall that a vector link file defines the relationship between a vector file as a spatial layer frame and a database as the vector
collection of data. Because we are exporting to a raster image, we will need to define the output parameters for a different type of
spatial layer frame. After defining the output filename, you will then be prompted for the output reference parameters. By default,
the coordinate reference system and bounding rectangle will be taken from the linked vector file. What we need to define is the
number of columns and rows the image will span. In addition, we may need to make adjustments necessary to match the
bounding rectangle to the resolution of cells. However, as it turns out, we already have a raster image with the exact parameters
we need, called TOWNS. Therefore, click on the Copy from Existing File option and specify TOWNS. You will then notice that it
specifies 2971 columns and 1829 rows (i.e., 100 meter resolution). Now click OK and the image will be autodisplayed.
G Finally, with the link established, we can also import data to existing databases. From DISPLAY Launcher, display the raster image
STATEENVREGIONS, using the palette of the same name.
The state has been divided into ten state of environment regions. This designation is used primarily for state buildout
monitoring and analysis. We will now create a new field in the CENSUS2000 table and update that table to reflect each towns
environmental region code. Using the raster image, we will import this data to a new field.
With the CENSUS2000 table selected, choose Add Field from the Edit menu. Call the field ENVREGION with a data type of
integer. You will notice that it adds this new field to the far right of the table. Then from the File menu in Database Workshop, go
to Import/Field/from Raster Image. From the Import Raster dialog, enter TOWNS as the feature definition image and
STATEENVREGIONS as the image to be processed. Select Max2 as the Summary type and Update existing field for Output. For
the link field name, enter TOWN_ID and for the update field name, enter ENVREGION. Finally, click OK to have the data be
imported.
The result is added to the new field in the database. The new values contain the state environmental regions. Thus, each town in
the table now has assigned its region value in this new field.
We have just learned that collections of vector layers can be created by linking a vector spatial frame to a data table of attributes. In the next
exercise we will explore how this can facilitate certain types of analysis.
2
All of the pixels within each region have the same value, so it would seem that most of these options would yield the same result. However, to hedge against the
possibility that some pixels near the edge may partially intersect the background and be assumed to have a value of 0, the choice of Max is safest.
As we saw in the previous exercise, a vector collection is created through an association of a database of attributes and a vector spatial frame.
As a consequence, standard database management procedures can be used to query and manipulate the database, thereby offering
counterparts to the database query and mathematical operators of raster GIS.
One of the most common means of accessing database tables is through a special language known as Structured Query Language (SQL).
TerrSet facilitates your use of SQL through two primary facilities: Filter and Calculate.
Filter
A Make sure your main Working Folder is set to Using TerrSet. Then clear your screen and use DISPLAY Launcher to display the
POPCH90_00 vector layer from the MASSTOWNS vector collection. Use the Default Quantitative palette. Then open Database
Workshop, either from the GIS Analysis/Database Query menu or from its icon. Move the table to the bottom right of the screen
so that both the table and the map are in view, but with as little overlap as possible.
B Now click the Filter Table icon (the one that looks like a pair of dark sunglasses) on the Database Workshop toolbar. This is the
SQL Filter dialog. The left side contains the beginnings of an SQL Select statement while the right side contains a utility to
facilitate constructing an SQL expression.
Although you can directly type an SQL expression into the boxes on the left, we recommend that you use the utility on the right
since it ensures that your syntax will be correct.1
We will filter this data table to find all towns that had a negative population change from two consecutive censuses, 1980 to 1990
and from 1990 to 2000.
1
SQL is somewhat particular about spacinga single space must exist between all expression components. In addition, field names that contain spaces or unusual
characters must be enclosed in square brackets. Use of the SQL expression utility on the right will place the spaces correctly and will enclose all field names in
brackets.
The Where clause is the heart of the filter operation, and may contain any valid relational statement that ultimately evaluates to
true or false when applied to any record.
The Order By clause is optional and can be left blank. However, if a field is selected here, the results will be ordered according to
this field.
C Either type directly, or use the SQL expression tabs to create the following expression in the WHERE clause box: [popch80_90] < 0
and [popch90_00] < 0
When the expression completes successfully, all features which meet the condition are shown in the Map Window in red, while those that do
not are shown in dark blue. Note also that the table only contains those records that meet the condition (i.e., the red colored polygons). As a
result, if you click on a dark blue polygon using Identify mode, the record will not be found.
D Finally, to remove the filter, click the Remove Filter icon (the light glasses).
Calculate
E Leaving the database on the screen, remove all maps derived from this collection. We need to add a new data field for the next
operation and this can only be done if the data table has exclusive access to the table (this is a standard security requirement with
databases). Since each map derived from a collection is actively attached to its database, these need to be closed in order to modify
the structure of the table.
F
Go to the Database Workshop Edit menu and choose the Add Field option. Call the new field POPCH80_00 and set its data type
to Real. Click OK and then scroll to the right of the database to verify that the field was created.
G Now click on the Calculate Field Values icon (+=) in the Database Workshop toolbar. In the Set clause input box, select POP80_00
from the dropdown list of database fields. Then enter the following expression into the Equals clause (use the SQL expression tabs
or type directly):
2
Note that if the data table is actively linked to one or more maps and you only use a subset of output fields, one of these should be the ID field. Otherwise, an error
will be reported.
H Save the database and then make sure that the table cursor (i.e., the selected cell) is in any cell within the POPCH80_00 field. Then
click the Display icon on the Database Workshop toolbar to view a map of the result. Note the interesting spatial distribution.
Advanced SQL
The Advanced SQL menu item under the Query menu in Database Workshop can be used to query across relational databases. We will use
the database MASSACHUSETTS that has three tables: town census data for the year 2000, town hospitals, and town schools. Each table has
an associated vector file. The tables HOSPITALS and SCHOOLS have vector files of the same names. The table CENSUS2000 uses a vector
file named MASSTOWNS.
I Clear your screen and open a new database, MASSACHUSETTS. When it is open, notice the tabs at the bottom of the dialog. You
can view the tables, CENSUS2000, HOSPITALS, and SCHOOLS, by selecting their tabs.
J With the CENSUS2000 table in view, select the Establish Display Link icon from the Database Workshop toolbar. Select the vector
link file MASSTOWNS, the vector file MASSTOWNS, and the link field name TOWN_ID. Click OK. Once the display link has
been established, place the cursor in the POPCH90_00 field, then select the Display Current Field as Map Layer icon to display the
POPCH90_00 field as a vector layer. Examine the display to visualize those towns that have either significant increase or decrease
in population from the 1990 to the 2000 census.
We will now create a new table using information contained in two tables in the database to show only those towns that have hospitals.
From the Query menu, select Advanced SQL. Type in the following expression and click OK.
When this expression is run, you will notice a new table has been created in your database named TOWNHOSP. It contains the same
information found in the table CENSUS2000, but only for those towns that have hospitals.
Challenge
Create a Boolean map of those towns in Massachusetts where there has been positive population growth.
The database query operations we performed in this exercise were carried out using the attributes in a database. This was possible because we
were working with a single geography, the towns of Massachusetts, for which we had multiple attributes. We displayed the results of the
database operations by linking the database to a vector file of the towns IDs. As we move on to Part 2 of the Tutorial, we will learn to use the
raster GIS tools provided by TerrSet to perform database query and other analyses on layers that describe different geographies.
In an earlier exercise, we saw how we can create a new text layer by direct digitizing. In this exercise, we will explore how to create text layers
from the information in database files. In addition, well look at how we can affect the visibility of map layers according to the map scale.
A Make sure your main Working Folder is set to Using TerrSet. Then clear your screen and use DISPLAY Launcher to display the
TOWN_ID field from the MASSTOWNS vector collection. Use the Advanced Palette/Symbol Selection tab to set the data
relationship to None (Uniform). Then select the lightest yellow color (the fourth one) from the Color Logic options.
B Next, click on the Database Workshop icon to open the database associated with this collection. What we want to do is create a
vector layer from the TOWNS field. This is very easy! Click into the TOWNS column to select that field. Then click on the Create
IDRISI Vector File icon on the Database Workshop menu. All settings should be correct to immediately export the layer -- a single
symbol code of 1 will be assigned to each label. Click OK.
Notice that it not only created the layer but also added it to your composition. Also notice that it doesnt look that great -- its a
little congested! However, there is another issue to be resolved. Zoom in on the map. Notice how the features get bigger but the
text stays the same size. We have not seen this before. In previous exercises, the text layers automatically adjusted to scale
changes.
C Both problems are related to a metadata setting. Click on TerrSet Explorer icon on the main TerrSet toolbar. Select to view vector
files and the Metadata pane, then click on the text layer you created (CENSUS2000_TOWN). In the Metadata pane notice the
metadata item titled Units per Point. Only text layers have this property. It specifies the relationship between the ground units of
the reference system and the measurement unit for text -- points (there are 72 points in an inch = 28.34 points per centimeter).
Currently it reads unknown because the export procedure from Database Workshop did not know how it should be displayed.
Change the unknown to be 100. This implies that one text point equals 100 meters, given the reference system in use by this layer.
Then save the modified metadata file.
E Initially, the text may seem to be very small. However, zoom into the map. Notice how the size of the text increases in direct
proportion to the change in scale.
Layer Visibility
F Press the Home key to return the display to the original window size. Although we have adjusted the relationship of text size to
scale, it is clear that at the default map window size it is too small to properly be read. This can be controlled by setting the layer
visibility parameters.
G Make sure that CENSUS2000_TOWN is highlighted in Composer and then open Layer Properties. Click on the Visibility tab. The
Visibility tab can be used as an alternative to set the various layer interaction effects previously explored. There are also other
options. One is the order in which TerrSet draws vector features. This can be particularly important with point and line layers to
establish which symbols lie on top of others when they overlap. However, our concern is with the Scale/Visibility options.
H The Scale/Visibility options control whether a layer is visible or not. By default, layers are always visible. More specifically, they are
visible at scales from 1:0 (infinitely large) to 1:10,000,000,000 (very, very small). Change the to scale denominator from
10,000,000,000 to 500,000 (without the comma). Then click OK.
Press the Home key to be sure that youre viewing the map at its base resolution. Depending upon the resolution of your screen,
the text should now not be visible. If it is, zoom out until it is invisible and look at the RF indicator in the lower-left of TerrSet.
Then zoom in. As you cross the 500,000 scale denominator threshold, you should see it become visible.
The layer visibility option allows for enormous flexibility in the development of compositions for map exploration. You can easily set varying
layers to become visible or invisible as you zoom in or out of varying detail.
1
The use of the Quant symbol file may seem illogical here. However, since the layer was originally displayed with this symbol file, and since all text labels share the
same ID (1), it makes sense to do this.
Database Query
Map Algebra
Data for the first six exercises in this section are in the \TerrSet Tutorial\Introductory GIS folder. Data for the six Multi-Criteria Evaluation
exercises may be found in the folder \TerrSet Tutorial\MCE. The TerrSet Tutorial data can be downloaded from the Clark Labs website:
www.clarklabs.org.
Geostatistics
Data for the exercises in this section are in the \TerrSet Tutorial\Advanced GIS folder. TerrSet Tutorial data can be downloaded from the
Clark Labs website: www.clarklabs.org.
A cartographic model is a graphic representation of the data and analytical procedures used in a study. Its purpose is to help the analyst
organize and structure the necessary procedures as well as identify all the data needed for the study. It also serves as a source of
documentation and reference for the analysis.
We will be using cartographic models extensively in the Introductory GIS portion of the Tutorial. Some models will be provided for you, and
others you will construct on your own. We encourage you to develop a habit of using cartographic models in your own work.
In developing a cartographic model, we find it most useful to begin with the final product and proceed backwards in a step by step manner
toward the existing data. This process guards against the tendency to let the available data shape the final product. The procedure begins with
the definition of the final product. What values will the product have? What will those values represent? We then ask what data are necessary
to produce the final product, and we then define each of these data inputs and how they might be obtained or derived. The following example
illustrates the process:
Suppose we wish to produce a final product that shows those areas with slopes greater than 20 degrees. What data are
necessary to produce such an image? To produce an image of slopes greater than 20 degrees, we will first need an image of
all slopes. Is an image of all slopes present in our database? If not, we take one step further back and ask more questions:
What data are necessary to produce a map of all slopes? An elevation image can be used to create a slope map. Does an
elevation image exist in our database? If not, what data are necessary to derive it? The process continues until we arrive at
existing data.
The existing data may already be in digital form, or may be in the form of paper maps or tables that will need to be digitized. If the necessary
data are not available, you may need to develop a way to use other data layers or combinations of data layers as substitutes.
Once you have the cartographic model worked out, you may then proceed to run the modules and develop the output data layers. The Macro
Modeler may be used to construct and run models. However, when you construct a model in the Macro Modeler, you must know which
modules you will use to produce output data layers. In effect, it requires that you build the model from the existing data to the final product.
Hence, in these exercises, we will be constructing conceptual cartographic models as diagrams. Then we will be building models in the Macro
Modeler once we know the sequence of steps we must follow. Building the models in the Macro Modeler is worthwhile because it allows you
to correct mistakes or change parameters and then re-run the entire model without running each individual module again by hand.
The cartographic model diagrams in the Tutorial will adhere, to the extent possible, to the conventions of the Macro Modeler in terms of
symbology. We will construct the cartographic models with the final output on the right side of the model, and the data and command
elements will be shown in similar colors to those of the Macro Modeler. However, to facilitate the use of the Tutorial exercises when printed
from a black and white printer, each different data file type will be represented by a different shape in the Tutorial. (The Macro Modeler uses
Raster Imag e Files Vector Files Attribute Values Files Tabular Data
Figure 1
Modules are shown as parallellograms, with module names in bold letters, as in the Macro Modeler. Modules link input and output data files
with arrows. When an operation requires the input of two files, the arrows from those two files are joined, with a single arrow pointing to the
module symbol (Figure 3).
Figure 2 shows the cartographic model constructed to execute the example described above. Starting with a raster elevation model called
ELEVATION, the module SLOPE is used to produce the raster output image called SLOPES. This images of all slope values is used with the
module RECLASS to create the final image, HIGH SLOPES, showing those areas with slope values greater than 20 degrees.
Figure 2
Figure 3 shows a model in which two raster images, area and population, are used with the module OVERLAY (the division option) to
produce a raster image of population density.
population
overlay pop_density
area
Figure 3
For more information on the Macro Modeler, see the chapter TerrSet Modeling Tools in the TerrSet Manual. You will become quite
familiar with cartographic models and using the Macro Modeler to construct and run your models as you work through the Introductory GIS
Tutorial exercises.
In this exercise, we will explore the most fundamental operation in GIS, database query. With database query, we are asking one of two
possible questions. The first is a query by location, "What is at this location?" The second is a query by attribute, "Where are all locations that
have this attribute?" As we move the cursor across an image, its column and row position as well as its X and Y coordinates are displayed in
the status bar at the bottom of the screen. When we click on the Identify icon and then on different locations in the image, the value of the
cell, known as the z value, is displayed next to the cursor and in the Identify box to the right of the map window. As we do this, we are
querying by location. In later exercises, we will look at more elaborate means of undertaking query by location (using the modules EXTRACT
and CROSSTAB), as well as the ability to interactively query a group of images at the same time. In this exercise, we will primarily perform
database query by attribute.
To query by attribute, we specify a condition and then ask the GIS to delineate all regions that meet that condition. If the condition involves
only a single attribute, we can use the modules RECLASS or ASSIGN to complete the query. If we have a condition that involves multiple
attributes, we must use OVERLAY. The following exercise will illustrate these procedures. If you have not already done so, read the section on
Database Query in the chapter Introduction to GIS in the TerrSet Manual prior to beginning the exercise.
A First, we will set up the Working Folder that will be used in this exercise. Select TerrSet Explorer from the File menu. From the
Projects tab set the Working Folder to the Introductory GIS folder and save the project to the default project environment.1
B Use DISPLAY Launcher to display a raster layer named DRELIEF. Use the Default Quantitative palette and choose to display both
a title and legend. Autoscaling, equal intervals with 256 classes will automatically be invoked, since DRELIEF has a real data type.
Click OK. Use Identify mode to examine the values at several locations.
This is a relief or topographic image, sometimes called a digital elevation model, for an area in Mauritania along the Senegal River. The area to
the south of the river (inside the horseshoe-shaped bend) is in Senegal and has not been digitized. As a result it has been given an arbitrary
height of ten meters. Our analysis will focus on the Mauritanian side of the river.
This area is subject to flooding each year during the rainy season. Since the area is normally very dry, local farmers practice what is known as
"recessional agriculture" by planting in the flooded areas after the waters recede. The main crop that is grown in this fashion is the cereal crop
sorghum.
1
If you are in a laboratory situation, you may wish to create a new folder for your own work and choose it as your Working Folder. Select the folder containing the
data as a Resource Folder. This will facilitate writing your results to your own folder, while still accessing the original data from the Resource Folder.
In addition to water availability, soil type is an important consideration in recessional sorghum agriculture because some soils retain moisture
better than others and some are more fertile than others. In this area, only the clay soils are highly suitable for this type of agriculture.
C Display a raster layer named DSOILS. Note that the Default Qualitative palette is automatically selected as the default for this
image. TerrSet uses a set of decision rules to guess if an image is qualitative or quantitative and sets the default palette accordingly.
In this case it has chosen well. Check that both the Title and Legend options are selected and click OK. This is the soils map for the
study area.
In determining whether to proceed with the dam project, the decision makers need to know what the likely impact of the project will be. They
want to know how many hectares of land are suitable for recessional agriculture. If most of the flooded regions turn out to be on unsuitable
soil types, then increase in sorghum yield will be minimal, and perhaps another location should be identified. However, if much of the
flooded region contains clay soils, the project could have a major impact on sorghum production.
Our task, a rather simple one, is to provide this information. We will map out and determine the area (in hectares) of all regions that are
suitable for recessional sorghum agriculture. This is a classic database query involving a compound condition. We need to find all areas that
are:
To construct a cartographic model for this problem, we will begin by specifying the desired final result we want at the right side of the model.
Ultimately, we want a single number representing the area, in hectares, that is suitable for recessional sorghum agriculture. In order to get
that number, however, we must first generate an image that differentiates the suitable locations from all others, then calculate the area that is
considered suitable. We will call this image BESTSORG.
Following the conventions described in the previous exercise, our cartographic model at this point looks like Figure 1. We dont yet
know which module we will use to do the area calculation, so for now, we will leave the module symbol blank.
ha
b e s ts o r g s u ita b le
Figure 1
The problem description states that there are two conditions that make an area suitable for recessional sorghum agriculture: that the area
be flooded, and that it be on clay soils. Each of these conditions must be represented by an image. We'll call these images FLOOD and
BESTSOIL. BESTSORG, then, is the result of combining these two images with some operation that retains only those areas that meet
flood
ha
bestsorg suitable
bestsoil
Figure 2
Because BESTSORG is the result of a multiple attribute query, it defines those locations that meet more than one condition. FLOOD and
BESTSOIL are the results of single attribute queries because they define those locations that meet only one condition. The most common way
to approach such problems is to produce Boolean2 images in the single attribute queries. The multiple attribute query can then be
accomplished using Boolean Algebra.
Boolean images (also known as binary or logical images) contain only values of 0 or 1. In a Boolean image, a value of 0 indicates a pixel that
does not meet the desired condition while a value of 1 indicates a pixel that does. By using the values 0 and 1, logical operations may be
performed between multiple images quite easily. For example, in this exercise we will perform a logical AND operation such that the image
BESTSORG will contain the value 1 only for those pixels that meet both the flood AND soil type conditions specified. The image FLOOD
must contain pixels with the value 1 only in those locations that will be flooded and the value 0 everywhere else. The image BESTSOIL must
contain pixels with the value 1 only for those areas that are on clay soils and the value 0 everywhere else. Given these two images, the logical
AND condition may be calculated with a simple multiplication of the two images. When two images are used as variables in a multiplication
operation, a pixel in the first image (e.g., FLOOD) is multiplied by the pixel in the same location in the second image (e.g., BESTSOIL). The
product of this operation (e.g., BESTSORG) has pixels with the value 1 only in the locations that have 1's in both the input images, as shown
in Figure 3 below.
0 X 0 = 0
0 X 1 = 0
1 X 0 = 0
1 X 1 = 1
Figure 3
This logic could clearly be extended to any number of conditions, provided each condition is represented by a Boolean image.
2
Although the word binary is commonly used to describe an image of this nature (only 1's and 0's) we will use the term Boolean to avoid confusion with the use of the
term binary to refer to a form of data file storage. The name Boolean is derived from the name of George Boole (1815-1864), who was one of the founding fathers of
mathematical logic. In addition, the name is appropriate because the operations we will perform on these images are known as Boolean Algebra.
Similarly, to create the Boolean image BESTSOIL, we will start with an image of all soil types (DSOILS) and then we will isolate only the clay
soils. To do this, we will change the values of the image DSOILS such that only the clay soils have the value 1 and everything else has the value
0. Adding these steps to the cartographic model produces Figure 4.
drelief flood
ha
bestsorg suitable
dsoils bestsoil
Figure 4
We have now arrived at a place in the cartographic model where we have all the data required. The remaining task is to determine exactly
which TerrSet modules should be used to perform the desired operations (currently indicated with blank module symbols in Figure 4). We
will add the module names as we work through the problem with TerrSet. When we have completed the entire exercise, we will then explore
how Macro Modeler and Image Calculator might be used to do pieces of the same analysis.
First we will create the image FLOOD by isolating all areas in the image DRELIEF with elevations less than 9 meters. To do this we will use
the RECLASS module.
D Now let's examine the characteristics of the file DRELIEF. (You may need to move the DSOILS display to the side to make
DRELIEF visible.) Click on the DRELIEF display to give it focus. Once the DRELIEF window has focus, click on the Layer
Properties button on Composer. Select the Properties tab.
1 What are the minimum and maximum elevation values in the image?
E
Before we perform any analysis, lets review the settings in User Preferences. Open User Preferences under the File menu. On the
System Settings tab, enable the option to automatically display the output of analytical modules if it is not already enabled. Click
on the Display Settings tab and choose the QUAL palette for qualitative display and the QUANT palette for quantitative display.
Also select the automatically show title and automatically show legend options. Click OK to save these settings.
F Choose RECLASS from the IDRISI GIS Analysis/Database Query menu. We will reclassify an image file with the user-defined
reclass option. Specify DRELIEF as the input file and enter FLOOD as the output file. Then enter the following values in the first
row of the reclassification parameters area of the dialog box:
Continue by clicking into the second row of the reclass parameters table and enter the following:
Click on the Save as .rcl file button and give the name FLOOD. An .rcl file is a simple ASCII file that lists the reclassification limits
and new values. We dont need the file right now but we will use it with the Macro Modeler at the end of the exercise. Press OK
and to create an integer output.
Note that we entered ">" as the highest value to be assigned the new value 0. The > symbol refers to the largest possible value in
the image. Likewise, the < can be used to refer to the smallest actual value in an image.
G When RECLASS has finished, look at the new image named FLOOD (which will automatically display if you followed the
instructions above). This is a Boolean image, as previously described, where the value 1 represents areas meeting the specified
condition and the value 0 represents areas that do not meet the condition.
H Now let's create a Boolean image (BESTSOIL) of all areas with clay soils. The image file DSOILS is the soils map for this region. If
you have closed the DSOILS display, redisplay it.
2 What is the numeric value of the clay soil class? (Use the Identify tool from the tool bar.)
We could use RECLASS here to isolate this class into a Boolean image. If we did (although we won't), our sequence in specifying the
reclassification would be as follows:
RECLASS is the most general means of reclassifying or assigning new values to the data values in an image. In some cases, RECLASS is rather
cumbersome and we can use a much faster procedure, called ASSIGN, to accomplish the same result. ASSIGN assigns new values to a set of
integer data values. With ASSIGN, we can choose to assign a new value to each original value or we may choose to assign only two values, 0
and 1, to form a Boolean image.
Unlike RECLASS, the input image for ASSIGN must be either integer or byteit will not accept original values that are real. Also unlike
RECLASS, ASSIGN automatically assigns a value of zero to all data values not specifically mentioned in the reassignment. This can be
particularly useful when we wish to create a Boolean image. Finally, ASSIGN differs from RECLASS in that only individual integer values may
be specified, not ranges of values.
To work with ASSIGN, we first need to create an attribute values file that lists the new assignments for the existing data values. The simplest
form of an attribute values file in TerrSet is an ASCII text file with two columns of data (separated by one or more spaces).4 The left column
lists existing image "features" (using feature identifier numbers in integer format). The right column lists the values to be assigned to those
features.
In our case, the features are the soil types to which we will assign new values. We will assign the new value 1 to the original value 2 (clay soils)
and will assign the new value 0 to all other original values. To create the values file for use with ASSIGN we use a module named Edit.
I Use Edit from the IDRISI GIS Analysis/Database Query menu to create a values file named CLAYSOIL. (Edit also has its own
icon) We want all areas in the image DSOILS with the value 2 to be assigned the new value 1 and all other areas to be assigned a 0.
Our values file might look like this:
10
21
30
40
50
As previously mentioned, however, any feature that is not mentioned in the values file is automatically assigned a new value of
zero. Thus our values file only really needs to have a single line as follows:
21
Type this into the Edit screen, with a single space between the two numbers. From the File menu on the Edit dialog box (not the
main menu) choose Save As and save the file as an attribute values file with the name CLAYSOIL. (When you choose attribute
values file from the list of file types, the proper filename extension, .avl, is automatically added to the filename you specify.) Click
Save and when prompted, choose integer as the data type.
We have now defined the value assignments to be made. The next step is to assign these to the raster image.
3
The output of RECLASS is always integer, however, so real values will be rounded to the nearest integer in the output image. This does not affect our analysis here
since we are reclassifying to the integer values 0 and 1 anyway.
4
More complex, multi-field attribute values files are accessible through Database Workshop.
When ASSIGN has finished, BESTSOIL will automatically display. The data values now represent clay soils with the value 1 and all
We now have Boolean images representing the two criteria for our suitability analysis, one created with RECLASS and the other with
ASSIGN.
While ASSIGN and RECLASS may often be used for the same purposes, they are not exactly equivalent, and usually one will require fewer
steps than the other for a particular procedure. As you become familiar with the operation of each, the choice between the two modules in
each particular situation will become more obvious.
At this point we have performed single attribute queries to produce two Boolean images (FLOOD and BESTSOIL) that meet the individual
conditions we specified. Now we need to perform a multiple attribute query to find the locations that fulfill both conditions and are therefore
suitable for recessional sorghum agriculture.
As described earlier in this exercise, a multiplication operation between two Boolean images may be used to produce the logical AND result.
In TerrSet, this is accomplished with the module OVERLAY. OVERLAY produces new images as a result of some mathematical operation
between two existing images. Most of these are simple arithmetic operations. For example, we can use OVERLAY to subtract one image from
another to examine their difference.
As illustrated above in Figure 3, if we use OVERLAY to multiply FLOOD and BESTSOIL, the only case where we will get the value 1 in the
output image BESTSORG is when the corresponding pixels in both input maps contain the value 1.
OVERLAY can be used to perform a variety of Boolean operations. For example, the cover option in OVERLAY produces a logical OR result.
The output image from a cover operation has the value 1 where either or both of the input images have the value 1.
3 Construct a table similar to that shown in Figure 3 to illustrate the OR operation and then suggest an OVERLAY operation other
than cover that could be used to produce the same result.
L Run OVERLAY from the GIS Analysis/Database Query menu to multiply FLOOD and BESTSOIL to create a new image named
BESTSORG. Click Output Documentation to give the image a new title, and specify "Boolean" for the value units. Examine the
result. (Change the palette to QUAL if it is difficult to see.) BESTSORG shows all locations that are within the normal flood zone
AND have clay soils.
M Our next step is to calculate the area, in hectares, of these suitable regions in BESTSORG. This can be accomplished with the
module AREA. Run AREA from the GIS Analysis/Database Query menu, enter BESTSORG as the input image, select the tabular
output format, and calculate the area in hectares.
Adding the module names to the cartographic model of Figure 4 produces the completed cartographic model for the above analysis, shown in
Figure 5.
The result we produced involved performing single attribute queries for each of the conditions specified in the suitability definition. We then
used the products of those single attribute queries to perform a multiple attribute query that identified all the locations that met both
conditions. While quite simple analytically, this type of analysis is one of the most commonly performed with GIS. The ability of GIS to
perform database query based not only on attributes but also on the location of those attributes distinguishes it from all other types of
database management software.
overlay area ha
bestsorg suitable
dsoils
assign bestsoil
claysoil
edit
Figure 5
The area figure we just calculated is the total number of hectares for all regions that meet our conditions. However, there are several distinct
regions that are physically separate from each other. What if we wanted to calculate the number of hectares of each of these potential sorghum
plots separately?
When you look at a raster image display, you are able to interpret contiguous pixels having the same identifier as a single larger feature, such
as a soil polygon. For example, in the image BESTSORG, you can distinguish three separate suitable plots. However, in raster systems such as
TerrSet, the only defined "feature" is the individual pixel. Therefore since each separate region in BESTSORG has the same attribute (1),
TerrSet interprets them to be the same feature. This makes it impossible to calculate a separate area figure for each plot. The only way to
calculate the areas of these spatially distinct regions is to first assign each region a unique identifier. This can be achieved with the GROUP
module.
GROUP is designed to find and label spatially contiguous groups of like-value pixels. It assigns new values to groups of contiguous pixels
beginning in the upper-left corner of the image and proceeding left to right, top to bottom, with the first group being assigned value zero. The
value of a pixel is compared to that of its contiguous neighbors. If it has the same value, it is assigned the same group identifier. If it has a
different value, it is assigned a new group identifier. Because it uses information about neighboring pixels in determining the new value for a
pixel, GROUP is classified as a Context Operator. More context operators will be introduced in later exercises in this group.
The figure below illustrates the result of running GROUP on a simple Boolean image. Note the difference caused by including diagonals. The
example without diagonal links produces eight new groups (identifiers 0-7), while the same original image with diagonal links produces only
three distinct groups.
N Run GROUP from the IDRISI GIS Analysis/Context Operators menu on BESTSORG to produce an output image called PLOTS.
Include diagonals and uncheck the Ignore background option. Click OK. When GROUP has finished, examine PLOTS. Use
Identify mode to examine the data values for the individual regions. Notice how each contiguous group of like-value pixels now
has a unique identifier. (Some of the groups in this image are small. It may be helpful to use the category "flash" feature to see
these. To do so, place the cursor on the legend color box of the category of interest. Press and hold down the left mouse button.
The display will change to show the selected category in red and everything else in black. Release the mouse button to return the
display to its normal state.)
Three of these groups are our potential sorghum plots, but the others are groups of background pixels. Before we calculate the number of
hectares in each suitable plot, we must determine which group identifiers represent the suitable sorghum plots so we can find the correct
identifiers and area figures in the area table. Alternatively, we can mask out the background groups by assigning them all the same identifier
of 0, and leaving just the groups of interest with their unique non-zero identifiers. The area table will then be much easier to read. We will
follow the latter method.
In this case, we want to create an image in which the suitable sorghum plots retain their unique group identifiers and all the background
groups have the value 0. There are several ways to achieve this. We could use Edit and ASSIGN or we could use RECLASS. The easiest
method is to use an OVERLAY operation.
6 Which OVERLAY option can you use to yield the desired image? Using which images?
O Perform the above operation to produce the image PLOTS2 and examine the result. Change the palette to QUAL. As in PLOTS,
the suitable plots are distinguished from the background, each with its own identifier.
The figure below shows the additional step we added to our original cartographic model. Note that the image file BESTSORG was used with
GROUP to create the output image PLOTS, then these two images were used in an OVERLAY operation to mask out those groups that were
unsuitable. The model could also be drawn with duplicate graphics for the BESTSORG image.
bestsorg
ha
plots2 area suitable
per plot
group plots
Finally, we may wish to know more about the individual plots than just their areas. We know all of these areas are on clay soils and have
elevations lower than 9 meters, but we may be interested in knowing the minimum, maximum or average elevation of each plot. The lower
the elevation, the longer the area should be inundated. This type of question is one of database query by location. In contrast with the pixel-
by-pixel query performed at the beginning of this exercise, the locations here are defined as areas, the three suitable plots.
The module EXTRACT is used to extract summary statistics for image features (as identified by the values in the feature definition image).
Q Choose EXTRACT from the IDRISI GIS Analysis/Database Query menu. Enter PLOTS2 as the feature definition image and
DRELIEF as the image to be processed. Choose to calculate all listed summary types. The results will automatically be written to a
tabular output.
In this exercise, we have looked at the most basic of GIS operations, database query. We have learned that we can query the database in two
ways, query by location and query by attribute. We performed query by location with the Identify mode in the display at the beginning of the
exercise and by using EXTRACT at the end of the exercise. In the rest of this exercise we have concentrated on query by attribute. The tools
we used for this were RECLASS, ASSIGN and OVERLAY. RECLASS and ASSIGN are similar and can be used to isolate categories of interest
located on any one map. OVERLAY allows us to combine queries from pairs of images and thereby produce compound queries.
One particularly important concept we learned in this process was the expression of simple queries as Boolean images (images containing
only ones and zeros). Expressing the results of single attribute queries as Boolean images allowed us to use Boolean or logical operations with
We also saw how a Boolean image may be used in an OVERLAY operation to retain certain values and mask out the remaining values by
assigning them the value zero. In such cases, the Boolean image may be referred to as a Boolean mask or simply as a mask image.
R Choose Macro Modeler either from the Modeling menu or from its toolbar icon (third from the right). The modeling
environment then opens.
S We will proceed to build the model working from left to right from Figure 5 above. Begin by clicking on the Raster Layer icon
(seventh from the left) in the Macro Modeler toolbar and choosing the file DRELIEF. Before getting too far, go to the File menu on
the Macro Modeler and choose Save As. Give the model the name Exer2-2.
U This is the first step of the model. We can run it to check the output. Save the model by choosing Save from the Macro Modeler
File menu or by clicking the Save icon (third from the left). Then run the model by choosing Run from the menu bar or with the
Run icon (fourth from the right). You will be prompted with a message that the output layer, FLOOD2, will be overwritten if it
exists. Click Yes to continue. The image FLOOD2, which should be identical to the image FLOOD created earlier, will
automatically display.
V Continue building the model until it looks like that in Figure 9. Save and run the model after adding each step to check your
intermediate results. Each time you place a module, right-click on it and fill out the parameters exactly as you did when working
with the main dialogs. Note that the module Edit cannot be used in the Macro Modeler, but you have already created the values
file CLAYSOIL and may use it with ASSIGN. Also note that the AREA module does not provide tabular output in the Macro
Modeler. Stop with the production of BESTSORG and run AREA from its main dialog rather than from the Macro Modeler.
One of the most useful aspects of the Macro Modeler is that once a model is saved, it can be altered and run instantly. It also keeps an exact
record of the operations used and is therefore very helpful in discovering mistakes in an analysis. We will continue to use the Macro Modeler
as we explore the core set of GIS modules in this section of the Tutorial. For more information on the Macro Modeler see the chapter TerrSet
Modeling Tools in the TerrSet Manual, as well as the on-line Help System entry for Macro Modeler.
W To see how the creation of BESTSORG in this exercise could be done with Image Calculator, open it from the IDRISI GIS
Analysis/Database Query menu or choose its icon. Choose the Logical Expression operation type since we are finding the logical
AND of two criteria. Type in the output image name BESTCALC. (We will give our result here a different name so that we can
compare it to BESTSORG.) Now enter the expression by clicking on the components such that the expression is exactly as shown
below. Note that you may type in filenames or press the insert image button to choose a filename from the Pick List. If you do the
latter, brackets will automatically enclose the filenames.
Press Process Expression and when the calculation is finished, compare the result to that obtained in Step l above which we called
BESTSORG.
Note that we could not finish our analysis solely with Image Calculator because it does not include the GROUP, AREA or EXTRACT
functions. Also note that in developing our model, it is much easier to identify errors in the process if we perform each individual step with
the relevant module and examine each result. While Image Calculator may save time, it does not supply us with the intermediate images to
check our logical progress along the way. Because of this, we will often choose to use individual modules or the Macro Modeler rather than
Image Calculator in the remainder of the Tutorial.
At this point you may delete all of the files you created in this exercise. The Delete utility is found in the TerrSet Explorer under the File
menu. Do not delete the original data files DSOILS and DRELIEF.
In this exercise,1 we will introduce two other groups of analytical operations, distance and context operators. Distance operators calculate
distances from some feature or set of features. In a raster environment, they produce a resultant image where every pixel is assigned a value
representing its distance from the nearest feature. There are many different concepts of distance that may be modeled. Euclidean, or straight-
line, distance is what we are most familiar with, and it is the type of distance analysis we will use in this exercise. In TerrSet, Euclidean
distances are calculated with the module DISTANCE. A related module, BUFFER, creates buffer zones around features using the Euclidean
distance concept. In Exercise 2-5 another type of distance, known as cost distance, will be explored.
Context operators determine the new value of a pixel based on the values of the surrounding pixels. The GROUP module, which was used in
Exercise 2-2 to identify contiguous groups of pixels, is a context operator since the group identifier assigned to any pixel depends upon the
values of the surrounding pixels. In this exercise, we will become familiar with another context operator, SURFACE, which may be used to
calculate slopes from an elevation image. The slope value assigned to each pixel depends upon the elevation of that pixel and its four nearest
neighbors.
We will use these distance and context operators and the tools we explored in earlier exercises to undertake one of the most common of GIS
analysis tasks, suitability mapping, a type of multi-criteria evaluation. A suitability map shows the degree of suitability for a particular purpose
at any location. It is most often produced from multiple images, since most suitability problems incorporate multiple criteria. In this exercise,
Boolean images will be combined using the OVERLAY module to yield a final map that shows the sites that meet all the specified criteria.
This type of Boolean multi-criteria evaluation is often referred to as constraint mapping, since each criterion is defined by a Boolean image
indicating areas that are either suitable for use (value 1) or constrained from use (value 0). The map made in Exercise 2-2 of sites suitable for
sorghum agriculture is a simple example of constraint mapping. In later exercises, we will explore tools for non-Boolean approaches to multi-
criteria suitability analysis.
Our problem in this exercise is to find all areas suitable for the location of a light manufacturing plant in a small region in central
Massachusetts near Clark University. The manufacturing company is primarily concerned that the site be on fairly level ground (with slopes
less than 2.5 degrees) with at least 10 hectares in area. The local town officials are concerned that the town's reservoirs be protected and have
thus specified that no facility can be within 250 meters of any reservoir. Additionally, we need to consider that not all land is available for
development. In fact, in this area, only forested land is available. To summarize, sites suitable for development must be:
1
At this point in the exercises, you should be able to display images and operate modules such as RECLASS and OVERLAY without step by step instructions. If you
are unsure of how to fill in a dialog box, use the defaults. It is always a good idea to enter descriptive titles for output files.
Two images for this area are provided, a relief map named RELIEF, and a land use map, named LANDUSE. The study area is quite small to
help speed your progress through this exercise.
A To become familiar with the study area, run ORTHO from the Display menu with RELIEF as the surface image and LANDUSE as
the drape image. Accept the default output filename ORTHOTMP and all the view defaults. Indicate that you wish to use a user-
defined palette called LANDUSE and a legend, and choose the output resolution that is one step smaller than your Windows
display (e.g., if you are displaying at 1024 x 768, choose the 800 x 600 output).
As you can see, the study area is dominated by deciduous forest, and is characterized by rather hilly topography.
We will go about solving the suitability problem in four steps, one for each suitability criterion.
To organize our analysis for this step, we first ask what the final image will represent. SLOPEBOOL should be a Boolean image in which all
pixels with slopes less than 2.5 degrees have the value 1 and all other pixels have the value 0. To create this image, we will need to have an
image of all slope values. As an image of all slopes does not exist in the database, it must be calculated. As indicated in the introduction to this
exercise, the module SURFACE calculates a slope image from an elevation image. The elevation image we have is RELIEF. Once the image of
slopes is in our database, we can use a reclassification to isolate only those slopes that meet our criterion. (This is very similar to isolating
elevations that will be flooded from all other elevations in Exercise 2-2.)
1 Before reading ahead, fill in the cartographic model below to depict the steps described above.
module? module?
relief slopes slopebool
B Display RELIEF with the TerrSet Default Quantitative palette.2 Explore the values with the Identify tool.
2
For this exercise, make sure that your Display Preferences (under User Preferences in the File menu) are set to the default values by pressing the Revert to Defaults
Creating a slope map by hand is very tedious. Essentially, it requires that the spacing of contours be evaluated over the whole map. As is often
the case, tasks that are tedious for humans to do are simple for computers (the opposite also tends to be truetasks that seem intuitive and
simple to us are usually difficult for computers). In the case of raster digital elevation models (such as the RELIEF image), the slope at any cell
may be determined by comparing its height to that of each of its neighbors. In TerrSet, this is done with the module SURFACE. Similarly,
SURFACE may be used to determine the direction that a slope is facing (known as the aspect) and the manner in which sunlight would
illuminate the surface at that point given a particular sun position (known as analytical hillshading).
C Launch Macro Modeler from its toolbar icon or from the Modeling menu. Place the raster file RELIEF and the module SURFACE.
Link RELIEF to SURFACE. Right-click on the output image and give it the filename SLOPES. Then right-click on the SURFACE
module symbol to access the module parameters. The dialog shows RELIEF as the input file and SLOPES as the output file. The
default surface operation, slope, is correct, but we need to change the slope measurement to be degrees. The conversion factor is
necessary when the reference units and value units are not the same. In the case of RELIEF, both are in meters, so the conversion
factor may be left blank. Choose Save As from the Macro Modeler File menu and give the new model the name Exer2-3. Run the
model (click yes to all when prompted about overwriting files) and examine the resulting image.
The image named SLOPES can now be reclassified to produce a Boolean image that meets our first criterionareas with slopes less than 2.5
degrees.
D Add the module RECLASS to the model. Connect SLOPES to it, then right-click on the output image and change the image name
to be SLOPEBOOL. Right-click on the RECLASS module symbol to set the module parameters. All the default settings are correct
in this case, but as we saw in the last exercise, when run from the Macro Modeler, RECLASS requires a text file (.rcl) to specify the
reclassification values. In the previous exercise, we saved the .rcl file after filling out the main RECLASS dialog. You may create .rcl
files like this if you prefer. However, you may find it quicker to create the file using a facility in Macro Modeler.
Right-click on the input box for .rcl file on the RECLASS module parameters dialog. This brings up a list of all the .rcl files that are
in the project. At the bottom of the Pick List window are two buttons, New and Edit. Click New.
This opens an editing window into which you can type the .rcl file. Information about the format of the file is given at the top of
the dialog. We want to assign the new value 1 to slopes from 0 to just less than 2.5 degrees and the value 0 to all those greater than
or equal to 2.5 degrees. In the syntax of the .rcl file (which matches the order and wording of the main RECLASS dialog), enter the
following values with a space between each:
1 0 2.5
0 2.5 999
Note that the last value given could be any value greater than the maximum slope value in the image. Click Save As and give the
filename SLOPEBOOL. Click OK and notice that the file you just created is now listed as the .rcl file to use in the RECLASS
module parameters dialog. Close the module parameters dialog.
E Save the model then run it (click yes to all when prompted about overwriting files) and examine the result.
button.
In planning the analysis for this step, we know that we will need to calculate distance from reservoirs and to isolate a set of those distances.
Before constructing the cartographic model, however, we will need to know more details about the modules from which we may choose.
Specifically, we need to know the type of input they require and the type of output they produce.
TerrSet includes several distance operators, all located under the IDRISI GIS Analysis/Distance Operators menu. Two could be used to
produce the image we need, DISTANCE or BUFFER. Both require as input an image in which the target features from which distances should
be calculated have non-zero values and every other pixel has the value 0.
2 How could you create a Boolean image of reservoirs? From which image would you derive this? (There are two different modules
you could use.)
F Display the image named LANDUSE using the user-defined palette LANDUSE. Determine the integer land-use code for
reservoirs.
Either RECLASS or Edit/ASSIGN could be used to create a Boolean image of reservoirs. Both require a text file be created outside the Macro
Modeler. We will use Edit/ASSIGN to create the Boolean image called RESERVOIRS.
G Open Edit from the Data Entry menu or from its toolbar icon. Type in: 2 1
(the value of reservoirs in LANDUSE, a space and a 1). Choose Save As from Edits File menu, choose the Attribute Values File file
type, give the name RESERVOIRS, and save as an Integer data type. Close Edit.
H In the Macro Modeler, place the attribute values file RESERVOIRS and move it to the left side of the model, under the slope
criteria branch of the model. Place the raster image LANDUSE under the attribute values file and the module ASSIGN to the right
of the two data files. Right click on the output file of ASSIGN and change the name to be RESERVOIRS. Before linking the input
files, right click on the ASSIGN module symbol. As we saw in the previous exercise, ASSIGN uses two input files, a raster feature
definition image and an attribute values file. The input files must be linked to the module in the order they are listed in the
module parameters dialog. Close the module parameters dialog and link the input raster feature definition image LANDUSE to
ASSIGN then link the attribute values file RESERVOIRS to ASSIGN. This portion of the model should appear similar to the
cartographic model below (although the values file symbol in the Macro Modeler is rectangular rather than oval). Note that the
placement of the raster and values file symbols for the ASSIGN operation could be reversedit is the order in which the links are
made and not the positions of the input files that determine which file is used as which input. Save and run the model. Note that
the slope branch of the model runs again as well and both terminal layers are displayed.
reservoirs
assign reservoirs
landuse
The output images from DISTANCE and BUFFER are quite different. DISTANCE calculates a new image in which each cell value is the
shortest distance from that cell to the nearest feature. The result is a distance surface (a spatially continuous representation of distance).
BUFFER, on the other hand, produces a categorical, rather than continuous, image. The user sets the values to be assigned to three output
classes: target features, areas within the buffer zone and areas outside the buffer zone.
We would normally use BUFFER, since our desired output is categorical and this approach requires fewer steps. However, to become more
familiar with distance operators, we will take the time to complete this step using both approaches. First we will run DISTANCE and
RECLASS from their main dialogs, then we will add the BUFFER step to our model in Macro Modeler.
I Run DISTANCE from the IDRISI GIS Analysis/Distance Operators menu. Give RESERVOIRS as the feature image and
RESDISTANCE as the output filename. Examine this image. Note that it is a smooth and continuous surface in which each pixel
has the value of its distance to the nearest reservoir.
J Now use RECLASS to create a Boolean buffer image in which pixels with distances less than 250 meters from reservoirs have the
value 0 and pixels with distances greater than or equal to 250 meters have the value 1. Call the resulting image DISTANCEBOOL.
3 What values did you enter into the RECLASS dialog box to accomplish this?
4 Examine the result to confirm that it meets your expectations. It may be useful to display the LANDUSE image as well. Does
DISTANCEBOOL represent (with 1's) those areas outside a 250m buffer zone around reservoirs?
The image DISTANCEBOOL satisfies the buffer zone criterion for our suitability model. Before continuing on to the next criterion, we will
see how the module BUFFER can also be used to create such an image.
In Macro Modeler, add the module BUFFER to the right of the image RESERVOIRS and connect the image and module. Right
K click to set the module parameters for BUFFER. Assign the value 0 for the target area, 0 for the buffer zone and 1 for the areas
outside the buffer zone. Enter 250 as the buffer width. Right click on the output image and change the image name to be
BUFFERBOOL. The second branch of your model will now be similar to the cartographic model shown below.
reservoirs
landuse
Figure 3
5 Describe the contents of the final image for this criterion. You are already familiar with two methods for producing such an image.
Draw the cartographic model showing the steps and call the final image FORESTBOOL.
L You first must determine the numeric codes for the two forest categories (do not consider orchards or forested wetlands) in the
LANDUSE image. This can be done in a variety of ways. One easy method is to click on the LANDUSE file symbol in the model,
then click on the Describe icon (first icon on right) on the Macro Modeler toolbar. This opens the documentation file for the
highlighted layer. Scroll down to see the legend categories and descriptions. Then follow the cartographic model you drew above
to add the required steps to the model to create a Boolean map of forest lands (FORESTBOOL). Save and run the model. Note that
you may use the LANDUSE layer that is already placed in the model to link into this forest branch of the model. However, if you
wish you may alternatively add another LANDUSE raster layer symbol for this branch. (If you become stuck, the last page of this
exercise shows the full model.)
In this case, we want to model the Boolean AND condition. Only those areas that meet all three criteria are considered suitable. As we learned
in Exercise 2-2, Boolean algebra is accomplished with OVERLAY.
6 Which operation in OVERLAY did you use to produce COMBINED? Draw the cartographic model that illustrates the steps taken
to produce COMBINED from the three Boolean criteria images.
N Examine COMBINED. There are several contiguous areas in the image that are potential sites for our purposes. The last step is to
determine which of these meet the ten hectare minimum area condition.
O Add the module GROUP to the model. Link COMBINED as the input file and change the output file to be GROUPS. Choose to
include diagonals in the GROUP module parameters dialog. Save and run the model.
7 Look at the GROUPS image. How can you differentiate between groups that had the value 1 in COMBINED (and are therefore
suitable) and groups that had the value 0 in COMBINED (and are therefore unsuitable)?
P We will account for unsuitable groups in a moment. First add the AREA module to the model. Link GROUPS as the input file and
change the output image to be GROUPAREA. In the AREA module parameters dialog, choose to calculate area in hectares and
produce a raster image output.
In the output image, the pixels of each group are assigned the area of that entire group. Use the Identify tool to confirm this. It
may be helpful to display the GROUPS image beside the GROUPAREA image. Since the largest group has a value much larger
than those of the other groups and autoscaling is in effect, the GROUPAREA display may appear to show fewer groups than
expected. The Identify tool will reveal that each group was assigned its unique area. To remedy the display, make sure
GROUPAREA has focus (selected), then choose Layer Properties on Composer. Set the Display Max to 17. To do so, either drag
the slider to the left or type 17 into the Display Maximum input box and press Apply. The value 17 was chosen because it is just
greater than the area of the largest suitable group.
3
Note that all three images could be combined in one operation with Image Calculator. The logical expression to use would be:
[COMBINED]=[SLOPEBOOL]AND[BUFFERBOOL]AND[FORESTBOOL]
We now want to isolate those groups that are greater than 10 hectares (whether suitable or not).
8 What module is required to do this? Why isn't Edit/ASSIGN an option in this case?
Q Add a RECLASS step to the model. Use either the Macro Modeler facility or the main RECLASS dialog box to create the .rcl file
needed by the RECLASS module parameters dialog box. Link RECLASS with GROUPAREA to create an output image called
BIGAREAS.
R Finally, to produce a final image, we will need to mask out the unsuitable groups that are larger than 10 hectares from the
BIGAREAS image. To do so, add an OVERLAY command to the model to multiply BIGAREAS and COMBINED. Call the final
output image SUITABLE. Again, you may wish to link the COMBINED layer that is already in the model, or you may place
another COMBINED symbol in the model.
This exercise explored two important classes of GIS functions, distance operators and context operators. In particular, we saw how the
modules BUFFER and DISTANCE (combined with RECLASS) can be used to create buffer zones around a set of features. We also saw that
DISTANCE creates continuous distance surfaces. We used the context operators SURFACE to calculate slopes and GROUP to identify
contiguous areas.
We saw as well how Boolean algebra performed with the OVERLAY module may be extended to three (or more) images through the use of
intermediary images.
Do not delete your Exer2-3 model, nor the original images LANDUSE and RELIEF. You will need all of these for the next exercise where we
will explore further the utility of the Macro Modeler.
Up to this point, we have used cartographic modeling mostly as an organizational tool. However, the Macro Modeler is more than a layout
tool for analytical sequences, as we will explore in this exercise.
A If you have closed it, open Macro Modeler, then open the model file Exer2-31. Run the macro as it is to produce the image
SUITABLE.
B First we will see how the results change when we relax the slope criterion such that slopes less than 4 degrees are considered
suitable. Under the Macro Modeler File menu, choose Save As and give the model the new name Exer2-4a. Examine the model
and locate the step in which the slope threshold is specified. It is the RECLASS module operation that links SLOPES and
SLOPEBOOL. Right-click on the RECLASS command symbol.
1 How is the slope threshold specified in the RECLASS parameters dialog box? Review the previous exercise if you are uncertain.
Then change the slope threshold from 2.5 to 4.
1
If you dont have the Macro Modeler file from the previous exercise, it is installed in the Introductory GIS data directory in a zip file called Exer2-3.zip. Use your
Windows Explorer tools to unzip the file and extract the contents to the same directory.
SubModels
One of the most powerful features of Macro Modeler is the ability to save models as submodels. A submodel is a model that is encapsulated
such that it acts like a new analytical module.
To save your suitability mapping procedure as a submodel, select the Save Model as a SubModel option from the File menu of Macro
Modeler. You will then be presented with a SubModel Properties form. This allows you to enter captions for your submodel parameters. In
this case, the submodel parameters will be the input and output files necessary to run the model. You should use titles that are descriptive of
the nature of the inputs required since the model will now become a generic modeling function. Here are some suggestions. Alter the captions
as you wish and then click OK to save the submodel2.
D To use your submodel, you will need to add an additional Resource Folder to your project (but leave the Working Folder set as it
is). Using TerrSet Explorer, add the Resource Folder \TerrSet Tutorial\Advanced GIS folder as it contains some layers that we will
need. Then in Macro Modeler click the New icon (the farthest left on the Macro Modeler toolbar) to start a new workspace. Add
the following two layers from the Advanced GIS folder to your workspace:
DEM
LANDUSE91
2
Note that when the SubModel Parameters form comes up, the layers may not be in the order you wish. To set a specific order, cancel out of the SubModel Parameters
dialog and then click on each of the inputs, and then the outputs, in the order in which you would like them to appear. Then go back to the Save Model as a
SubModel option in the File menu.
E Click on the LANDUSE91 symbol to select it and click the Display icon on the Macro Modeler toolbar. This is a map of land use
and land cover for the town of Westborough (also spelled Westboro), Massachusetts, 1991. You may also view the DEM layer in a
similar fashion. This is a digital elevation model for the same area. The WESTRES values file simply contains a single line of data
specifying that class 5 (lakes) will be assigned the value 1 to indicate that they are the reservoirs (almost all of the lakes here are in
fact reservoirs). The WESTFOR values file also contains a single line specifying that class 7 will be assigned 1 to indicate forest.
F Now click on the SubModel icon (eighth from the right). You will notice your submodel listed in the Working Folder. Select it and
place it in your workspace. Then do a right-click onto it. Do you notice your captions? Now use the Connect tool to connect each
of your input files to your submodel and give any name you wish to your output file. Then run the model.
Submodels are very powerful because they allow you to extend the analytical capabilities of your system. Once encapsulated in this manner,
they become generic tools that you can use in many other contexts. They also allow you to encapsulate processes that should be run
independently from other elements in your model.
G To introduce DynaLinks, click on the Open model icon (second from the left) and select the model named RESIDENTIAL
GROWTH. As the name suggests, this model predicts areas of growth in residential land within existing forest land. The study
area is again Westborough, Massachusetts. First, run the model. The image that is displayed at the end shows the original areas of
residential as class 2 and new areas of growth as class 1. The logic by which it works is as follows (click on each layer mentioned to
select it and use the Display tool to view it as you go along):
the image named RESIDENTIAL91 shows the original areas of residential land in 1991.
the image named LDRESSUIT maps the inherent suitability of land for residential uses. It is based on factors such as proximity to
roads, slope and so on.
a filtering process is used to downweight the suitability of land for residential as one moves away from existing areas of residential.
The procedure uses a filter that is applied to the Boolean image of existing residential areas. The filter yields a result (PROXIMITY)
that has zeros in areas well away from existing residential areas and ones well within existing residential areas. However, in the
vicinity of the edge of existing residential areas, the filter causes a gradual transition from one to zero. This result is used as a
multiplier to progressively downweight the suitability of areas as one moves away from existing residential areas
(DOWNWEIGHT).