How does Map Algebra work?

Similar documents
Working with Map Algebra

Lesson 4A overview. Introduction to Map Algebra (4A) Map Algebra functions (4B)

Map Math and StaMsMcs

RASTER ANALYSIS GIS Analysis Winter 2016

Module 7 Raster operations

ENGRG Introduction to GIS

RASTER ANALYSIS GIS Analysis Fall 2013

Cell based GIS. Introduction to rasters

GEOGRAPHIC INFORMATION SYSTEMS Lecture 24: Spatial Analyst Continued

Watershed Sciences 4930 & 6920 GEOGRAPHIC INFORMATION SYSTEMS

RASTER ANALYSIS S H A W N L. P E N M A N E A R T H D A T A A N A LY S I S C E N T E R U N I V E R S I T Y O F N E W M E X I C O

Getting Started with Spatial Analyst. Steve Kopp Elizabeth Graham

Getting Started with Spatial Analyst. Steve Kopp Elizabeth Graham

Using GIS to Site Minimal Excavation Helicopter Landings

Geographic Information Systems (GIS) Spatial Analyst [10] Dr. Mohammad N. Almasri. [10] Spring 2018 GIS Dr. Mohammad N. Almasri Spatial Analyst

Raster Data. James Frew ESM 263 Winter

Field-Scale Watershed Analysis

Raster Data Model & Analysis

Suitability Modeling with GIS

Combine Yield Data From Combine to Contour Map Ag Leader

Lab 10: Raster Analyses

By Colin Childs, ESRI Education Services. Catalog

Lecture 20 - Chapter 8 (Raster Analysis, part1)

Lab 12: Sampling and Interpolation

ArcGIS Enterprise Building Raster Analytics Workflows. Mike Muller, Jie Zhang

Delineating Watersheds from a Digital Elevation Model (DEM)

Making Yield Contour Maps Using John Deere Data

+ = Spatial Analysis of Raster Data. 2 =Fault in shale 3 = Fault in limestone 4 = no Fault, shale 5 = no Fault, limestone. 2 = fault 4 = no fault

Masking Lidar Cliff-Edge Artifacts

Map Analysis of Raster Data I 3/8/2018

Lab 11: Terrain Analyses

Raster GIS applications Columns

Lab 12: Sampling and Interpolation

GEOG 487 Lesson 8: Step-by-Step Activity

GeoEarthScope NoCAL San Andreas System LiDAR pre computed DEM tutorial

Pond Distance and Habitat for use in Wildlife Modeling

What s New in Imagery in ArcGIS. Presented by: Christopher Patterson Date: September 12, 2017

Lab 10: Raster Analyses

Beyond The Vector Data Model - Part Two

Raster GIS applications

Spatial Analysis with Raster Datasets

Basics of Using LiDAR Data

Mapping Distance and Density

Lab 10: Raster Analyses

Introduction to the Image Analyst Extension. Mike Muller, Vinay Viswambharan

GEOG 487 Lesson 7: Step- by- Step Activity

Data Assembly, Part II. GIS Cyberinfrastructure Module Day 4

17/07/2013 RASTER DATA STRUCTURE GIS LECTURE 4 GIS DATA MODELS AND STRUCTURES RASTER DATA MODEL& STRUCTURE TIN- TRIANGULAR IRREGULAR NETWORK

Raster Analysis and Functions. David Tenenbaum EEOS 465 / 627 UMass Boston

Distributed Image Analysis Using the ArcGIS API for Python

Lecture 21 - Chapter 8 (Raster Analysis, part2)

CRC Website and Online Book Materials Page 1 of 16

Exercise 4: Extracting Information from DEMs in ArcMap

Lab 11: Terrain Analyses

Geoprocessing and georeferencing raster data

Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Part 6b: The effect of scale on raster calculations mean local relief and slope

Raster Analysis and Image Processing in ArcGIS Enterprise

RiparianZone = buffer( River, 100 Feet )

Using GIS To Estimate Changes in Runoff and Urban Surface Cover In Part of the Waller Creek Watershed Austin, Texas

GEOGRAPHIC INFORMATION SYSTEMS Lecture 25: 3D Analyst

THE TOOLS OF AUTOMATED GENERALIZATION AND BUILDING GENERALIZATION IN AN ArcGIS ENVIRONMENT

Creating raster DEMs and DSMs from large lidar point collections. Summary. Coming up with a plan. Using the Point To Raster geoprocessing tool

GEO 465/565 - Lab 7 Working with GTOPO30 Data in ArcGIS 9

Blacksburg, VA July 24 th 30 th, 2010 Georeferencing images and scanned maps Page 1. Georeference

Ex. 4: Locational Editing of The BARC

Tutorial 18: 3D and Spatial Analyst - Creating a TIN and Visual Analysis

v Working with Rasters SMS 12.1 Tutorial Requirements Raster Module Map Module Mesh Module Time minutes Prerequisites Overview Tutorial

Improved Applications with SAMB Derived 3 meter DTMs

Geographic Surfaces. David Tenenbaum EEOS 383 UMass Boston

A Second Look at DEM s

Automating Distributed Raster Analysis using the Image Server REST API. Jie Zhang Zikang Zhou Demo Theater 2 - Oasis 1

Lab 18c: Spatial Analysis III: Clip a raster file using a Polygon Shapefile

Raster Analytics in Image Server: An Introduction. Mike Muller

Stream network delineation and scaling issues with high resolution data

Spatial Calculation of Locus Allele Frequencies Using ArcView 3.2

Hillshade Example. Custom product generation with elevation data

BASICS OF SPATIAL MODELER etraining

Operators. Java operators are classified into three categories:

Chapter 4. Operations on Data

Terms and definitions * keep definitions of processes and terms that may be useful for tests, assignments

Unit 3. Operators. School of Science and Technology INTRODUCTION

Final project: Lecture 21 - Chapter 8 (Raster Analysis, part2) GEOL 452/552 - GIS for Geoscientists I

GIS LAB 8. Raster Data Applications Watershed Delineation

Tools, Tips, and Workflows Exporting Final Product LP360

Reality Check: Processing LiDAR Data. A story of data, more data and some more data

Surface Analysis. Data for Surface Analysis. What are Surfaces 4/22/2010

LAB #7 Creating TIN and 3D scenes (ArcScene) GISC, UNIVERSITY OF CALIFORNIA BERKELEY

IF YOU SAVED THE ArcMAP PROJECT FROM LAB#2 OPEN IT!

Raster Analysis. Overview Neighborhood Analysis Overlay Cost Surfaces. Arthur J. Lembo, Jr. Salisbury University

Layer Variables for RSF-type Modelling Applications

Terrain Analysis. Using QGIS and SAGA

Class #2. Data Models: maps as models of reality, geographical and attribute measurement & vector and raster (and other) data structures

Raster: The Other GIS Data

v SMS Tutorials Working with Rasters Prerequisites Requirements Time Objectives

Lecture 9. Raster Data Analysis. Tomislav Sapic GIS Technologist Faculty of Natural Resources Management Lakehead University

The Reference Library Generating Low Confidence Polygons

Raster Data. James Frew ESM 263 Winter

Python - Raster Analysis

I CALCULATIONS WITHIN AN ATTRIBUTE TABLE

Transcription:

Map Algebra

How does Map Algebra work? Map Algebra uses math-like expressions containing operators and functions with raster data. Map Algebra operators, which are relational, Boolean, logical, combinatorial, and bitwise, work with one or more inputs to develop new values. Functions perform specialized tasks, such as computing slope from elevation, and they usually return numeric values. You don't have to be a programmer to know how to use operators and functions effectively, you just have to be taught how to use them.

Map Algebra Map Algebra is an analysis language based loosely on the map algebra concepts presented by Dr. Dana Tomlin in his book entitled Geographic Information Systems and Cartographic Modeling (Tomlin, 1990). Map Algebra is a high-level computational language used for performing cartographic spatial analysis using raster data. Simply put, Map Algebra is math applied to rasters, a practice that's possible because rasters are geographically referenced arrays of numbers. If you stack rasters on top of each other as if they were a mathematical sandwich, you can perform simple arithmetic to the most sophisticated algorithms with them. You probably know more about Map Algebra operators than you think. Map Algebra operators are generally the same operators found on scientific calculators. The operators used most often (arithmetic, relational, Boolean, and logical) are also the simplest. Two less commonly used operators are combinatorial and bitwise.

Map Algebra Arithmetic operators Arithmetic operators allow addition, subtraction, multiplication, and division. For example, three rasters measuring three different types of fire risk could be added to create an overall risk analysis raster. Arithmetic operators can also be used to convert values from one measurement to another (e.g., feet x 0.3048 = meters). 1 3 = 2 4 x 2 2 4 6 8

Map Algebra Relational operators Relational operators allow you to build logical tests, returning values of true (1) and false (0). For example, this type of operator can be used to find vegetation "equal to" Sierra-type mixed coniferous forest. You can ether use the Relational Operator (=,<,>) of the Abbreviation (EQ,LT, GT) 1 3 = 2 4 EQ 4 0 0 0 1

Map Algebra Boolean operators Boolean operators such as "and", "or", and "not" allow you to chain logical tests. Like relational operators, Boolean operators return values of true and false. For example, you could find all slopes that are "greater-than" 45 degrees "and" that have an elevation that is "greaterthan" 5000 meters. Slope 65 21 55 46 = AND 1 0 1 0 Elevation 5500 6500 7500 4000

Map Algebra Logical operators The logical operators DIFF, IN, and OVER, also allow you to build logical tests on a cell-by-cell basis, but are implemented with specific rules. A DIFF B: If a cell value in raster A and raster B are different, the cell value in raster A is returned. If the cell values are the same, the value zero is returned. A IN {value list): If a cell value in raster A is in the value list, the cell value in raster A is returned. Otherwise, NoData is returned. A OVER B: If a cell value in raster A is not equal to zero, the cell value is raster A is returned. Otherwise, the cell value in raster B is returned. 1 3 A = 2 4 DIFF 1 0 0 4 5 3 B 2 5

Understanding logical values Logical values simply keep track of the values, true and false. In Map Algebra, any non-zero input value is considered to be a logical true, and zero is considered a logical false. Some Map Algebra operators and functions evaluate input cell values and return logical 1 values (true) and logical 0 values (false). The relational and Boolean operators all return logical values. In this example, cells are evaluated as to whether their value is greater than 15. The value 1, or logical true, is assigned to those cells that are greater than 15. The value 0, or logical false, is assigned to all other cells.

Map Algebra Combinatorial Combinatorial operators combine the attributes of multiple input rasters. These operators find all unique combinations of values and assign a unique ID to each, which is then returned to the output grid. The output VAT will have the Value fields from all the input grids. operators

CAND Operator

Map Algebra Functions The term "functions" might sound like programmers' speak, but whether you realize it or not, you've probably already used them. In the previous module, you derived hillshade, slope, and aspect rasters using choices on the Surface Analysis menu. These choices are simply dialogs that implement Map Algebra functions programs that perform specific tasks, such as calculating slope. While you can do a lot through the Spatial Analyst user interface, many more functions are available through Map Algebra. Functions are the major element of the Map Algebra language, and there are over a hundred of them. The ArcGIS online help system provides a listing of all of the functions and a help topic for each. Here is where you can find a description of what the function does, as well as its syntax. Most of the functionality available from the Spatial Analyst toolbar are also available as Map Algebra functions.

Map Algebra Functions Examples ASPECT: identifies the direction of maximum rate of change in z value from each cell. BOUNDARYCLEAN: smoothes the boundary between zones by expanding and shrinking the boundary. CON: performs one or more conditional if/else evaluations. EQUALTO: evaluates, on a cell-by-cell basis, the number of times in an argument list that the input grid values are equal to the value specified by the first argument. GREATERTHAN: evaluates, on a cell-by-cell basis, the number of times in an argument list that the input grid values are greater than the value specified by the first argument. HILLSHADE: creates a shaded relief grid from a grid by considering the sun illumination angle and shadows. INT: converts input floating-point values to integer values through truncation. ISNULL: returns 1 if the input value is NODATA, and 0 if it is not. LESSTHAN: evaluates, on a cell-by-cell basis, the number of times in an argument list that the input grid values are less than the value specified by the first argument. MEAN: uses multiple input grids to determine the mean value on a cell-by-cell basis. MERGE: merges multiple, possibly non-adjacent input grids into a single grid based upon order of input. MOSAIC: merges multiple adjacent continuous grids and performs interpolation in the overlapping areas. NIBBLE: replaces areas in a grid corresponding to a mask, with the values of the nearest neighbors. REGIONGROUP: records for each cell in the output the identity of the connected region to which it belongs. A unique number is assigned to each region. SETNULL: returns NODATA if the evaluation of the input condition is TRUE ; if it FALSE, returns the value specified by the second input argument. SLICE: slices (or changes) a range of values of the input cells by specified ranges, zones of equal area, or zones with equal intervals. SLOPE: identifies the rate of maximum change in z value from each cell. ZONALAREA: calculates the area of each zone in the input grid.

Building Map Algebra Expressions You build expressions in the Raster Calculator by typing directly into the expression box, clicking layers in the Layers list, and clicking buttons on the keypad. When you click an element it is added to the expression in the expression box. If you specify an output grid name in your expression (e.g., NewElev = ), a permanent grid will be created in your working directory. If you do not specify an output name, a grid will be written to your working directory, but the grid will be temporary. Output grids are either integer or floating point, depending on the expression

Raster Calculator

Building Expressions Help

Building Map Algebra Expressions

Building Map Algebra Expressions

Building Map Algebra Functions

Building Map Algebra Functions

Working with NoData Similar to logical values, NoData values also influence the evaluation of expressions. The NoData value is the only non-zero value that is not interpreted as a true condition. This special value indicates that there is no information associated with the cell. In general, a Map Algebra expression will return NoData for a cell if any of the corresponding input cells have NoData. In general, Map Algebra expressions assign the value NoData to the output cell if any corresponding input cell is NoData.

Summary While you can do a lot from the Spatial Analyst user interface, most of the power of the Spatial Analyst is found within Map Algebra, which you can access through the Raster Calculator dialog. You can construct a Map Algebra expression using the dialog buttons and controls, or by typing directly into the expression box. The expression processes when you click Evaluate. Map Algebra is the analysis language for Spatial Analyst. It has a simple syntax similar to any algebra. The inputs to an expression may be as simple as a single raster layer or shapefile, or as complex as a compound expression using many operators, functions, and input data. With Map Algebra, not only can you access functions not available in the user interface, you can also build complex expressions and process them as a single command. For instance, you can calculate the sine of an input raster dataset or raster layer and add that to two other input raster datasets or raster layers. Like all languages, Map Algebra is defined by rules. By understanding the basic rules, you will be able to use Spatial Analyst in new ways.