Working with Map Algebra

Similar documents
How does Map Algebra work?

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

Map Math and StaMsMcs

ENGRG Introduction to GIS

Cell based GIS. Introduction to rasters

Module 7 Raster operations

RASTER ANALYSIS GIS Analysis Fall 2013

RASTER ANALYSIS GIS Analysis Winter 2016

Getting Started with Spatial Analyst. Steve Kopp Elizabeth Graham

Raster Data. James Frew ESM 263 Winter

GEOGRAPHIC INFORMATION SYSTEMS Lecture 24: Spatial Analyst Continued

Suitability Modeling with GIS

Watershed Sciences 4930 & 6920 GEOGRAPHIC INFORMATION SYSTEMS

Getting Started with Spatial Analyst. Steve Kopp Elizabeth Graham

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

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

4 Operations On Data 4.1. Foundations of Computer Science Cengage Learning

Basic operators, Arithmetic, Relational, Bitwise, Logical, Assignment, Conditional operators. JAVA Standard Edition

Lab 10: Raster Analyses

Field-Scale Watershed Analysis

Raster Data Model & Analysis

4 Operations On Data 4.1. Foundations of Computer Science Cengage Learning

Raster GIS applications Columns

By Colin Childs, ESRI Education Services. Catalog

Chapter 4. Operations on Data

Lab 11: Terrain Analyses

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

Masking Lidar Cliff-Edge Artifacts

Raster GIS applications

Lab 10: Raster Analyses

Lab 10: Raster Analyses

Operators. Java operators are classified into three categories:

Mapping Distance and Density

+ = 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

Lab 11: Terrain Analyses

Geographic Surfaces. David Tenenbaum EEOS 383 UMass Boston

Lab 12: Sampling and Interpolation

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

Map Analysis of Raster Data I 3/8/2018

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

Lecture 20 - Chapter 8 (Raster Analysis, part1)

Neighbourhood Operations Specific Theory

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

Watershed Sciences 4930 & 6920 GEOGRAPHIC INFORMATION SYSTEMS

Simple Java Programming Constructs 4

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

Delineating Watersheds from a Digital Elevation Model (DEM)

Data Assembly, Part II. GIS Cyberinfrastructure Module Day 4

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

JAVA OPERATORS GENERAL

Using GIS to Site Minimal Excavation Helicopter Landings

Unit 3. Operators. School of Science and Technology INTRODUCTION

Distributed Image Analysis Using the ArcGIS API for Python

Pond Distance and Habitat for use in Wildlife Modeling

Arithmetic-logic units

Watershed Sciences 4930 & 6920 ADVANCED GIS

GEOG 487 Lesson 8: Step-by-Step Activity

Exercise 2-1 Cartographic Modeling

Beyond The Vector Data Model - Part Two

Remote Sensing and GIS. GIS Spatial Overlay Analysis

Topic Notes: Bits and Bytes and Numbers

ISA 563 : Fundamentals of Systems Programming

Raster Analytics in Image Server: An Introduction. Mike Muller

Introduction. Following are the types of operators: Unary requires a single operand Binary requires two operands Ternary requires three operands

Introduction to Geographic Information Systems Dr. Arun K Saraf Department of Earth Sciences Indian Institute of Technology, Roorkee

Lab 12: Sampling and Interpolation

Raster Analysis and Image Processing in ArcGIS Enterprise

Lecture 6: GIS Spatial Analysis. GE 118: INTRODUCTION TO GIS Engr. Meriam M. Santillan Caraga State University

SECTION II: LANGUAGE BASICS

Raster Data. James Frew ESM 263 Winter

9/2/2016. Expressions are Used to Perform Calculations. ECE 120: Introduction to Computing. Five Arithmetic Operators on Numeric Types

1/31/2017. Expressions are Used to Perform Calculations. ECE 120: Introduction to Computing. Five Arithmetic Operators on Numeric Types

Chapter 7. Expressions and Assignment Statements ISBN

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

This tutorial will teach you about operators. Operators are symbols that are used to represent an actions used in programming.

I CALCULATIONS WITHIN AN ATTRIBUTE TABLE

Vector Data Analysis Working with Topographic Data. Vector data analysis working with topographic data.

Introduction to LiDAR

Geol 588. GIS for Geoscientists II. Zonal functions. Feb 22, Zonal statistics. Interpolation. Zonal statistics Sp. Analyst Tools - Zonal.

Learning the Language - V

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

layers in a raster model

Spatial Analysis (Vector) I

GEOGRAPHIC INFORMATION SYSTEMS Lecture 25: 3D Analyst

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

Topic Notes: Bits and Bytes and Numbers

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

CSC 220: Computer Organization Unit 10 Arithmetic-logic units

Stream network delineation and scaling issues with high resolution data

Expressions & Assignment Statements

Lecture 21 - Chapter 8 (Raster Analysis, part2)

Lecture 06. Raster and Vector Data Models. Part (1) Common Data Models. Raster. Vector. Points. Points. ( x,y ) Area. Area Line.

The 3D Analyst extension extends ArcGIS to support surface modeling and 3- dimensional visualization. 3D Shape Files

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

Bits, Words, and Integers

GEOG 487 Lesson 7: Step- by- Step Activity

GIS Fundamentals: Supplementary Lessons with ArcGIS Pro

Module 10 Data-action models

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Bits and Bytes and Numbers

Improved Applications with SAMB Derived 3 meter DTMs

Transcription:

Working with Map Algebra While you can accomplish much with the Spatial Analyst user interface, you can do even more with Map Algebra, the analysis language of Spatial Analyst. Map Algebra expressions are entered and evaluated in the Raster Calculator. You will learn how to use Map Algebra operators and functions to build your own expressions in the Raster Calculator. You will also learn how to perform some of the most useful tasks in Map Algebra, such as conditional processing, testing for NoData, and setting cells to NoData. How Does Map Algebra Work? Map Algebra uses math-like expressions containing operators and functions. 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. 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.

Map Algebra Operators 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. The operators are case sensitive. 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). + Addition - Subtraction * Multiplications / Division Mod Modulus 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. == Equal!= Not Equal < Less than <= Less than or equal > Greater than >= Greater than or equal 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 "greater-than" 5000 meters. ^ Logical complement & Logical And Logical Or! Logical Xor The logical operators allow you to build logical tests on a cell-by-cell basis, but are implemented with specific rules. Diff(A, 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. InList(A,[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. Over(A, 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. Diff Logical difference InList Contained in list Over Replace 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. CombinatorialAnd CombinatorialOr CombinatorialXOr Bitwise operators see the ArcGIS online help for details regarding the use of bitwise operators. Map Algebra Functions When you derive hillshade, slope, and aspect rasters, using choices on the Surface Analysis menu, you perform functions. 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. A few examples of these are as follows: 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. Equal To: 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. Greater Than: 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. Less Than: 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. Nibble: replaces areas in a grid corresponding to a mask, with the values of the nearest neighbors. Region Group: 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.

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. Putting Map Algebra to Work In the previous topic, you saw how easy it is create Map Algebra expressions using operators and functions. Now you're ready to put your new skills to work. This topic covers how to perform some of the most common Map Algebra tasks: working with NoData values, doing conditional processing, and merging multiple rasters together. Conditional Processing Conditional processing makes it possible for you to specify which action to take, depending on the conditions. You can specify the conditions that must be evaluated as true before an action should be taken, as well as specify appropriate actions to take when the conditions are evaluated as false. The traditional If-Then-Else statement is an example of a conditional statement.

Conditional processing is especially useful for creating analysis masks. For example, in a wildfire prevention and suppression analysis, high-risk areas (true) can be assigned a value of 100, while lower-risk areas (false) can be assigned a value of NoData. Working with No Data 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 a few instances, NoData will be returned when the input condition is evaluated as false. For example, the Con function will return NoData when no value is given for the false argument. Most functions or expressions simply ignore NoData cells, making it difficult to test for NoData or to assign NoData. The IsNull and SetNull functions make it possible for you to perform these two tasks in Map Algebra. The IsNull function tests the current cell to see if it contains NoData and returns either 1 or 0 (true or false). It is normally used in conjunction with the Con function to replace the NoData value with something else. The SetNull function applies a test against the current cell and, if the test is true, replaces its value with NoData. If the test is false, it writes the results of the expression to the cell. Merging Rasters Sometimes you want to analyze an area that falls on more than one raster. To analyze the entire area, you must perform the steps of your analysis multiple times, once for each raster. Such a process could be time-consuming and errorprone, especially if you have a large number of rasters or a multi-step analysis. However, by first combining the individual rasters to create a single larger raster, you'll only need to perform the analysis steps once. Perhaps you want to analyze the variety of the vegetation in a particular agricultural or wildlife management area using a vegetation raster. Your area of

interest happens to fall near the edge of the raster, so you need two different rasters to see the entire region. There are a few things you'll need to check before you combine rasters. First, the input rasters may be totally overlapping, partially overlapping, perfectly adjacent, or entirely separated, as long as they are in the same coordinate system. Second, the input rasters must be of the same type. For example, you could combine a soils raster with one or more soils rasters or an elevation raster with another elevation raster. Third, you need to know if you are combining discrete or continuous rasters because the method used to join each type differs in how it handles areas where the input rasters overlap.