Spatial Analysis with Raster Datasets-1 Francisco Olivera, Ph.D., P.E. Srikanth Koka Department of Civil Engineering Texas A&M University
Map Analysis Map analysis consists of inferring information – necessary for a given engineering/scientific task – from general information contained in digital spatial datasets. In map analysis with raster datasets, the digital spatial datasets consist of grids.
Spatial Analyst To enable the raster data analysis capabilities, load the Spatial Analyst ArcGIS extension by clicking Tools/ Extensions/Spatial Analyst and then Tools/Customize/ Spatial Analyst. The Spatial Analyst adds a toolbar that contains a Spatial Analyst menu, a combo box Layer for selecting the layer, a Create contour tool and a Histogram tool.
Grid Datasets
Grid Data Structure Cellular-based data structure composed of square cells of equal size arranged in rows and columns that store the value of a terrain parameter Cells that do not store a value are assigned a NODATA code and are called NODATA cells. Number of columns Number of rows Cell size (x, y)
Grid Properties Type: Integer or Floating Point. Depending on the type of numbers the grid cells store, a grid is considered Integer if it stores integer values or Floating Point if it stores real values. Floating Point grids store the same information as an Integer grid but take significantly much more storage space. Status: Permanent or Temporary. Many grids created in ArcGIS are stored as temporary files and are subject to be erased automatically. A temporary grid can be saved as a permanent grid by right-clicking on the layer name and then on Make Permanent.
Value Attribute Table Value Attribute Tables (VATs) are tables associated with grids which have two fields: Value and Count. The Value field lists all values found in the grid and the Count field lists the number of cells that have that value. Only Integer grids have VATs. VATs are created automatically for Integer grids with less than 500 unique values or with a range of values that does not exceed 100,000.
Analysis Extent and Cell Size Analysis Extent and Cell Size are defined for a Data Frame. To define the Analysis Extent and Cell Size click on Spatial Analyst/Options and then on the Extent or Cell Size tabs. The Analysis Mask flags the cells – within the Analysis Extent – where grid values are calculated. Outside the mask, grid cells are assigned NODATA. Analysis Extent defines the size of the grid rectangle.
Analysis Extent and Cell Size Analysis Cell Size defines the length of the cell side. The Number of Rows and Number of Columns are redundant if the Analysis Extent and Cell Size have been defined already. If all the grids of a data frame have to be aligned and with their cells coinciding exactly, the analysis Extent and Cell Size must be set before any grids are created.
Feature-to-Raster Conversion Point-to-grid: Each point is converted into the grid cell where it is located. The cell value is a user-selected attribute of the point feature class. If two points coincide in the same cell, one is chosen randomly for the cell value. Coincidence of two or more points within a cell might reflect inconsistency between the resolution of the grid and point dataset. To convert a point dataset into a grid, click on Spatial Analyst/Convert/ Features to Raster in the Spatial Analyst toolbar.
Feature-to-Raster Conversion Line-to-grid: Each line is converted into the grid cells with which it intersects. The cell value is a user-selected attribute of the line dataset. If two lines coincide in the same cell, one is chosen randomly for the cell value. To convert a line dataset into a grid, in the Spatial Analyst toolbar click on Spatial Analyst/Convert/ Features to Raster.
Vector-to-Raster Conversion Polygon-to-grid: Each polygon is converted into the grid cells whose centroid it contains. The cell value is a user- selected attribute of the polygon dataset. If two polygons coincide in the same cell (overlap), one is chosen randomly for the cell value. To convert a polygon dataset into a grid, click on Spatial Analyst/ Convert/Features to Raster in the Spatial Analyst toolbar.
Raster-to-Feature Conversion Raster-to-point: Each no NODATA cell is represented by a point located in the center of the cell. The cell value is stored in an attribute Grid_Code of the polygon dataset. To convert a grid into a point dataset, click on the Spatial Analyst/Convert/Raster to Features in the Spatial Analyst toolbar. Raster-to-line: It is not an unambiguously defined process.
Raster-to-Feature Conversion Raster-to-polygon: All adjacent cells (i.e., share a side) with the same value are aggregated into a single polygon. Grids have to be Integer grids. The cell value is stored in an attribute Grid_Code of the polygon dataset. Polygon outlines are smoothed to avoid jagged edges. To convert a polygon dataset into a grid, click on the Spatial Analyst/ Convert/Raster to Features in Spatial Analyst toolbar.
Raster Functions Raster functions create output grids using input grids as arguments. Raster functions are classified into: Local functions Focal functions Zonal functions Global functions
Local Functions The value of an output grid cell depends on the value of the cells of the input grids that have the same location. Neighbor cells have no influence on the output values. Local functions can have one or many input grids as arguments. Output Input
Focal Functions The value of an output grid cell depends on the value of the cells of the input grids in the neighborhood. The neighborhood can be defined in different ways. Focal functions usually have one input grid as argument, but could have more than one. Output Input
Zonal Functions The value of an output grid cell depends on the value of the cells of the input grids of the same zone. A zones grid has to be one of the function arguments. Besides the zones grid, zonal functions usually have only one input grid as argument, but could have more than one. Output Input
Global Functions The value of an output grid cell depends on the value of all the cells of the input grids. Global functions usually have one input grid as argument, but could have more than one. Output Input