Map algebra

Last updated

Map algebra is an algebra for manipulating geographic data, primarily fields. Developed by Dr. Dana Tomlin and others in the late 1970s, it is a set of primitive operations in a geographic information system (GIS) which allows one or more raster layers ("maps") of similar dimensions to produce a new raster layer (map) using mathematical or other operations such as addition, subtraction etc.

Contents

History

Prior to the advent of GIS, the overlay principle had developed as a method of literally superimposing different thematic maps (typically an isarithmic map or a chorochromatic map) drawn on transparent film (e.g., cellulose acetate) to see the interactions and find locations with specific combinations of characteristics. [1] The technique was largely developed by landscape architects and city planners, starting with Warren Manning and further refined and popularized by Jaqueline Tyrwhitt, Ian McHarg and others during the 1950s and 1960s. [2] [3] [4]

In the mid-1970s, landscape architecture student C. Dana Tomlin developed some of the first tools for overlay analysis in raster as part of the IMGRID project at the Harvard Laboratory for Computer Graphics and Spatial Analysis, which he eventually transformed into the Map Analysis Package (MAP), a popular raster GIS during the 1980s. While a graduate student at Yale University, Tomlin and Joseph K. Berry re-conceptualized these tools as a mathematical model, which by 1983 they were calling "map algebra." [5] [6] This effort was part of Tomlin's development of cartographic modeling, a technique for using these raster operations to implement the manual overlay procedures of McHarg. Although the basic operations were defined in his 1983 PhD dissertation, Tomlin had refined the principles of map algebra and cartographic modeling into their current form by 1990. [7] [8] Although the term cartographic modeling has not gained as wide an acceptance as synonyms such as suitability analysis, suitability modeling and multi-criteria decision making, "map algebra" became a core part of GIS. Because Tomlin released the source code to MAP, its algorithms were implemented (with varying degrees of modification) as the analysis toolkit of almost every raster GIS software package starting in the 1980s, including GRASS, IDRISI (now TerrSet), and the GRID module of ARC/INFO (later incorporated into the Spatial Analyst module of ArcGIS).

This widespread implementation further led to the development of many extensions to map algebra, following efforts to extend the raster data model, such as adding new functionality for analyzing spatiotemporal and three-dimensional grids. [9] [10]

Map algebra operations

Like other algebraic structures, map algebra consists of a set of objects (the domain) and a set of operations that manipulate those objects with closure (i.e., the result of an operation is itself in the domain, not something completely different). In this case, the domain is the set of all possible "maps," which are generally implemented as raster grids. A raster grid is a two-dimensional array of cells (Tomlin called them locations or points), each cell occupying a square area of geographic space and being coded with a value representing the measured property of a given geographic phenomenon (usually a field) at that location. Each operation 1) takes one or more raster grids as inputs, 2) creates an output grid with matching cell geometry, 3) scans through each cell of the input grid (or spatially matching cells of multiple inputs), 4) performs the operation on the cell value(s), and writes the result to the corresponding cell in the output grid. [7] Originally, the inputs and the output grids were required to have the identical cell geometry (i.e., covering the same spatial extent with the same cell arrangement, so that each cell corresponds between inputs and outputs), but many modern GIS implementations do not require this, performing interpolation as needed to derive values at corresponding locations. [11]

Visual comparison of different types of map algebra operations MapAlgebra.png
Visual comparison of different types of map algebra operations

Tomlin classified the many possible map algebra operations into three types, to which some systems add a fourth: [12]

Local Operators
Operations that operate on one cell location at a time during the scan phase. A simple example would be an arithmetic operator such as addition: to compute MAP3 = MAP1 + MAP2, the software scans through each matching cell of the input grids, adds the numeric values in each using normal arithmetic, and puts the result in the matching cell of the output grid. Due to this decomposition of operations on maps into operations on individual cell values, any operation that can be performed on numbers (e.g., arithmetic, statistics, trigonometry, logic) can be performed in map algebra. For example, a LocalMean operator would take in two or more grids and compute the arithmetic mean of each set of spatially corresponding cells. In addition, a range of GIS-specific operations has been defined, such as reclassifying a large range of values to a smaller range of values (e.g., 45 land cover categories to 3 levels of habitat suitability), which dates to the original IMGRID implementation of 1975. [13] A common use of local functions is for implementing mathematical models, such as an index, that are designed to compute a resultant value at a location from a set of input variables.
Focal Operators
Functions that operate on a geometric neighborhood around each cell. A common example is calculating slope from a grid of elevation values. Looking at a single cell, with a single elevation, it is impossible to judge a trend such as slope. Thus, the slope of each cell is computed from the value of the corresponding cell in the input elevation grid and the values of its immediate neighbors. Other functions allow for the size and shape of the neighborhood (e.g. a circle or square of arbitrary size) to be specified. For example, a FocalMean operator could be used to compute the mean value of all the cells within 1000 meters (a circle) of each cell.
Zonal Operators
Functions that operate on regions of identical value. These are commonly used with discrete fields (also known as categorical coverages), where space is partitioned into regions of homogeneous nominal or categorical value of a property such as land cover, land use, soil type, or surface geologic formation. Unlike local and focal operators, zonal operators do not operate on each cell individually; instead, all of the cells of a given value are taken as input to a single computation, with identical output being written to all of the corresponding cells. For example, a ZonalMean operator would take in two layers, one with values representing the regions (e.g., dominant vegetation species) and another of a related quantitative property (e.g., percent canopy cover). For each unique value found in the former grid, the software collects all of the corresponding cells in the latter grid, computes the arithmetic mean, and writes this value to all of the corresponding cells in the output grid.
Global Operators
Functions that summarize the entire grid. These were not included in Tomlin's work, and are not technically part of map algebra, because the result of the operation is not a raster grid (i.e., it is not closed), but a single value or summary table. However, they are useful to include in the general toolkit of operations. For example, a GlobalMean operator would compute the arithmetic mean of all of the cells in the input grid and return a single mean value. Some also consider operators that generate a new grid by evaluating patterns across the entire input grid as global, which could be considered part of the algebra. An example of these are the operators for evaluating cost distance. [14]

Implementation

Several GIS software packages implement map algebra concepts, including ERDAS Imagine, QGIS, GRASS GIS, TerrSet, PCRaster, and ArcGIS.

In Tomlin's original formulation of cartographic modeling in the Map Analysis Package, he designed a simple procedural language around the algebra operators to allow them to be combined into a complete procedure with additional structures such as conditional branching and looping. [8] However, in most modern implementations, map algebra operations are typically one component of a general procedural processing system, such as a visual modeling tool or a scripting language. For example, ArcGIS implements Map Algebra in both its visual ModelBuilder tool and in Python. Here, Python's overloading capability [15] allows simple operators and functions to be used for raster grids. For example, rasters can be multiplied using the same "*" arithmetic operator used for multiplying numbers. [16]

Here are some examples in MapBasic, the scripting language for MapInfo Professional:

# demo for Brown's Pond data set # Give layers #  altitude #  development – 0: vacant, 1: major, 2: minor, 3: houses, 4: buildings, 5 cement #  water – 0: dry, 2: wet, 3: pond  # calculate the slope at each location based on altitude slope = IncrementalGradient of altitude  # identify the areas that are too steep toosteep = LocalRating of slope   where 1 replaces 4 5 6   where VOID replaces ...  # create layer unifying water and development occupied = LocalRating of development   where water replaces VOID  notbad = LocalRating of occupied and toosteep   where 1 replaces VOID and VOID   where VOID replaces ... and ...  roads = LocalRating of development   where 1 replaces 1 2   where VOID replaces ...  nearread = FocalNeighbor of roads at 0 ... 10  aspect = IncrementalAspect of altitude  southface = LocalRating of aspect   where 1 replaces 135 ... 225   where VOID replaces ...  sites = LocalMinimum of nearroad and southface and notbad  sitenums = FocalInsularity of sites at 0 ... 1  sitesize = ZonalSum of 1 within sitenums  bestsites = LocalRating of sitesize   where sitesize replaces 100 ... 300   where VOID replaces ... 

Related Research Articles

Brainfuck is an esoteric programming language created in 1993 by Urban Müller.

<span class="mw-page-title-main">Geographic information system</span> System to capture, manage and present geographic data

A geographic information system (GIS) is a type of database containing geographic data, combined with software tools for managing, analyzing, and visualizing those data. In a broader sense, one may consider such a system to also include human users and support staff, procedures and workflows, body of knowledge of relevant concepts and methods, and institutional organizations.

<span class="mw-page-title-main">Hash function</span> Mapping arbitrary data to fixed-size values

A hash function is any function that can be used to map data of arbitrary size to fixed-size values. The values returned by a hash function are called hash values, hash codes, digests, or simply hashes. The values are usually used to index a fixed-size table called a hash table. Use of a hash function to index a hash table is called hashing or scatter storage addressing.

<span class="mw-page-title-main">Raster graphics</span> Matrix-based data structure

In computer graphics and digital photography, a raster graphic represents a two-dimensional picture as a rectangular matrix or grid of square pixels, viewable via a computer display, paper, or other display medium. A raster is technically characterized by the width and height of the image in pixels and by the number of bits per pixel. Raster images are stored in image files with varying dissemination, production, generation, and acquisition formats.

A GIS file format is a standard of encoding geographical information into a computer file. They are created mainly by government mapping agencies or by GIS software developers.

MapReduce is a programming model and an associated implementation for processing and generating big data sets with a parallel, distributed algorithm on a cluster.

Affine arithmetic (AA) is a model for self-validated numerical analysis. In AA, the quantities of interest are represented as affine combinations of certain primitive variables, which stand for sources of uncertainty in the data or approximations made during the computation.

<span class="mw-page-title-main">Spatial analysis</span> Formal techniques which study entities using their topological, geometric, or geographic properties

Spatial analysis or spatial statistics includes any of the formal techniques which studies entities using their topological, geometric, or geographic properties. Spatial analysis includes a variety of techniques, many still in their early development, using different analytic approaches and applied in fields as diverse as astronomy, with its studies of the placement of galaxies in the cosmos, to chip fabrication engineering, with its use of "place and route" algorithms to build complex wiring structures. In a more restricted sense, spatial analysis is the technique applied to structures at the human scale, most notably in the analysis of geographic data or transcriptomics data.

<span class="mw-page-title-main">Field (geography)</span> Property that varies over space

In the context of spatial analysis, geographic information systems, and geographic information science, a field is a property that fills space, and varies over space, such as temperature or density. This use of the term has been adopted from physics and mathematics, due to their similarity to physical fields such as the electromagnetic field or gravitational field. Synonymous terms include spatially dependent variable (geostatistics), statistical surface, and intensive property and crossbreeding between these disciplines is common. The simplest formal model for a field is the function, which yields a single value given a point in space

<span class="mw-page-title-main">Cerebellar model articulation controller</span>

The cerebellar model arithmetic computer (CMAC) is a type of neural network based on a model of the mammalian cerebellum. It is also known as the cerebellar model articulation controller. It is a type of associative memory.

<span class="mw-page-title-main">Karnaugh map</span> Graphical method to simplify Boolean expressions

The Karnaugh map is a method of simplifying Boolean algebra expressions. Maurice Karnaugh introduced it in 1953 as a refinement of Edward W. Veitch's 1952 Veitch chart, which was a rediscovery of Allan Marquand's 1881 logical diagram aka Marquand diagram but with a focus now set on its utility for switching circuits. Veitch charts are also known as Marquand–Veitch diagrams or, rarely, as Svoboda charts, and Karnaugh maps as Karnaugh–Veitch maps.

A geographic data model, geospatial data model, or simply data model in the context of geographic information systems, is a mathematical and digital structure for representing phenomena over the Earth. Generally, such data models represent various aspects of these phenomena by means of geographic data, including spatial locations, attributes, change over time, and identity. For example, the vector data model represents geography as collections of points, lines, and polygons, and the raster data model represent geography as cell matrices that store numeric values. Data models are implemented throughout the GIS ecosystem, including the software tools for data management and spatial analysis, data stored in a variety of GIS file formats, specifications and standards, and specific designs for GIS installations.

In computing, especially computational geometry, a real RAM is a mathematical model of a computer that can compute with exact real numbers instead of the binary fixed point or floating point numbers used by most actual computers. The real RAM was formulated by Michael Ian Shamos in his 1978 Ph.D. dissertation.

Charles Dana Tomlin is an author, professor, and originator of Map Algebra, a vocabulary and conceptual framework for classifying ways to combine map data to produce new maps. Tomlin's teaching and research focus on the development and application of geographic information systems (GIS). He is currently a professor at the University of Pennsylvania School of Design and an adjunct professor at the Yale School of Forestry and Environmental Studies, having also taught at the Harvard Graduate School of Design and the Ohio State University School of Natural Resources. His coursework in Landscape Architecture has extensively included GIS and cartographic modeling applications.

A truth table is a mathematical table used in logic—specifically in connection with Boolean algebra, boolean functions, and propositional calculus—which sets out the functional values of logical expressions on each of their functional arguments, that is, for each combination of values taken by their logical variables. In particular, truth tables can be used to show whether a propositional expression is true for all legitimate input values, that is, logically valid.

<span class="mw-page-title-main">DE-9IM</span>

The Dimensionally Extended 9-Intersection Model (DE-9IM) is a topological model and a standard used to describe the spatial relations of two regions, in geometry, point-set topology, geospatial topology, and fields related to computer spatial analysis. The spatial relations expressed by the model are invariant to rotation, translation and scaling transformations.

<span class="mw-page-title-main">Array DBMS</span> System that provides database services specifically for arrays

Array database management systems provide database services specifically for arrays, that is: homogeneous collections of data items, sitting on a regular grid of one, two, or more dimensions. Often arrays are used to represent sensor, simulation, image, or statistics data. Such arrays tend to be Big Data, with single objects frequently ranging into Terabyte and soon Petabyte sizes; for example, today's earth and space observation archives typically grow by Terabytes a day. Array databases aim at offering flexible, scalable storage and retrieval on this information category.

In mathematics and mathematical logic, Boolean algebra is a branch of algebra. It differs from elementary algebra in two ways. First, the values of the variables are the truth values true and false, usually denoted 1 and 0, whereas in elementary algebra the values of the variables are numbers. Second, Boolean algebra uses logical operators such as conjunction (and) denoted as ∧, disjunction (or) denoted as ∨, and the negation (not) denoted as ¬. Elementary algebra, on the other hand, uses arithmetic operators such as addition, multiplication, subtraction and division. So Boolean algebra is a formal way of describing logical operations, in the same way that elementary algebra describes numerical operations.

In spatial analysis and geographic information systems, cost distance analysis or cost path analysis is a method for determining one or more optimal routes of travel through unconstrained (two-dimensional) space. The optimal solution is that which minimizes the total cost of the route, based on a field of cost density that varies over space due to local factors. It is thus based on the fundamental geographic principle of Friction of distance. It is an optimization problem with multiple deterministic algorithm solutions, implemented in most GIS software.

Vector overlay is an operation in a geographic information system (GIS) for integrating two or more vector spatial data sets. Terms such as polygon overlay, map overlay, and topological overlay are often used synonymously, although they are not identical in the range of operations they include. Overlay has been one of the core elements of spatial analysis in GIS since its early development. Some overlay operations, especially Intersect and Union, are implemented in all GIS software and are used in a wide variety of analytical applications, while others are less common.

References

  1. Steinitz, Carl; Parker, Paul; Jordan, Lawrie (1976). "Hand-Drawn Overlays: Their History and Prospective Uses". Landcape Architecture. 66 (5 (September)): 444–455.
  2. Manning, Warren (1913). "The Billerica Town Plan". Landscape Architecture. 3: 108–118.
  3. Tyrwhitt, Jaqueline (1950). "Surveys for Planning". In APRR (ed.). Town and Country Planning Textbook. Architectural Press.
  4. McHarg, Ian (1969). Design with Nature. p. 34. ISBN   0-471-11460-X.
  5. Tomlin, C. Dana; Berry, Joseph K. (1979). "A mathematical structure for cartographic modelling in environmental analysis". Proceedings of the 39th Symposium. American Congress on Surveying and Mapping. pp. 269–283.
  6. Tomlin, C. Dana (1983). "A map algebra". Harvard Computer Graphics Conference. Cambridge, MA.
  7. 1 2 Tomlin, C. Dana (1983). Digital Cartographic Modeling Techniques in Environmental Planning (PhD dissertation). Yale University. ProQuest   303197020.
  8. 1 2 Tomlin, C. Dana (1990). Geographic information systems and cartographic modelling. Prentice Hall.
  9. Frank, Andrew U. (2005). "Map algebra extended with functors for temporal data". In Akoka, Jacky (ed.). Perspectives in Conceptual Modeling: International Conference on Conceptual Modeling, Lecture Notes in Computer Science V.3770. Lecture Notes in Computer Science. Vol. 3770. Springer-Verlag. pp. 194–207. doi:10.1007/11568346_22. ISBN   978-3-540-29395-8.
  10. Mennis, Jeremy; Viger, Roland; Tomlin, C. Dana (2005). "Cubic Map Algebra Functions for Spatio-Temporal Analysis". Cartography and Geographic Information Science. 32 (1): 17–32. doi:10.1559/1523040053270765. S2CID   16174172.
  11. Esri. "Cell size and resampling in analysis". ArcGIS Pro Documentation. Retrieved 7 November 2021.
  12. Longley, Paul A.; Goodchild, Michael F.; Maguire, David J.; Rhind, David W. (2011). Geographic Information Systems and Science (3rd ed.). John Wiley & Sons, Inc. pp. 414–7. ISBN   978-0-470-72144-5.
  13. Bremer, Walter D. (1977). The IMGRID Computer System for Land Use Studies: Testing and Documentation for Utah State University (MLA thesis). Utah State University. doi:10.26076/9bf4-b33e.
  14. de Smith, Michael J.; Goodchild, Michael F.; Longley, Paul (2021). "Operations on Single and Multiple Grids". Geospatial Analysis: A Comprehensive Guide to Principles, Techniques, and Software Tools (6th revised ed.).
  15. "3.4. Special method names¶". The Python Language Reference. Retrieved 3 May 2015.
  16. Esri. "An overview of the rules for Map Algebra". ArcGIS Pro Documentation. Retrieved 7 November 2021.