Download presentation
Presentation is loading. Please wait.
1
Raster Concepts
2
Geography as raster Divides space into a matrix of equally-sized cells
Cells store a sample of geography in their area Advantages of raster over vector Simpler data model Faster processing and display Additional analytic tools Better for un-bounded phenomena (like soil pH and elevation) Disadvantages of raster Generalization Loss of feature uniqueness The raster representation of geography can be likened to draping a fishnet over the landscape, then recording for every square (cell) the predominant geographic phenomena of interest in the area it covers. For example, in a raster dataset of vegetation, each cell records the dominate plant species found inside the cell. In a raster dataset, bounded geographic features like parcels of land, roads, or water wells are represented as a collection of same-value cells organized in a matrix of rows and columns. Rasters can also represent un-bounded geographic phenomena, like rainfall or elevation, where each cell stores a potentially unique value. These are generally called surfaces. Generalization and sampling Inevitably, raster datasets generalize the landscape. For example, a cell may fall over an area that contains multiple phenomena, like on a boundary between forest and grassland. But a cell, which has area, can only record one piece of information; the whole cell must be either forest or grassland. There are various techniques used to sample the geography inside a cell in order to assign a value to it; like using the value found at the exact center of the cell, or the value that covers the greatest area of the cell. In a surface, where the area of the cell may contain an infinite number of values (like elevation) it is assumed that the assigned value is only true at the center of the cell. Raster benefits Compared to vector data models, the raster data model is very simple; in essence, it is a table of rows and columns that stores numeric values. Because of the relative simplicity of the raster data model, most processing and display tasks are much faster than their vector equivalents. Many types of analysis are only possible with raster data, like computing the visibility of a landscape. Some types of analysis are faster and easier to perform with raster data, like combining many geographic layers together a long, complicated procedure with vector overlays, but fairly simple with raster data.
3
Features lose uniqueness with raster representation
Features as raster Features lose uniqueness with raster representation (a line becomes a collection of cells, not one feature) vector Points Lines Polygons Vector data Geographic features are represented as individual points, lines, and polygons with x,y coordinates that define their shape, and topological relationships can be found between them. Vector is best for accurately delineating features and maintaining their unique identity. Raster data Raster data does not represent individual features. Instead, it represents the predominant phenomena in the area covered by a cell. As a result, a geographic feature becomes a collection of cells with the same attribute value and it loses its unique identity, and no topology other than cell neighborhoods is possible. Raster is best used for problems where the overall landscape is being analyzed, not individual features. And, raster is one of the better representations for surface phenomena, like elevation or rainfall. Points as raster As vector, a point is an explicit x,y coordinate. In raster format it is represented as a single cell. For example, it is assumed that a well occupies the entire area covered by a cell. Lines as raster As vector, a line is an ordered list of x,y coordinates. In raster format it is represented as a group of connected cells with the same value. In Spatial Analyst, cells forming a line must connect edge—to—edge to allow linear features like rivers to act as barriers; otherwise, path- finding tools may find paths that slip through the diagonal connections between cells. Polygons as raster As vector, a polygon is an ordered list of x,y coordinates that closes back on itself (i.e., the first and last coordinates are the same). In raster format it is represented as a group of connected cells with the same value — the same representation as for a line. raster
4
Raster coordinate systems
Matrix Cells located by row/column position Origin at upper-left Rows and columns always perpendicular Cartesian Cells located by x,y May register to a map projection Used in ArcMap Y-axis Matrix origin (0,0) Columns 1 2 3 1 2 3 Rows X-axis Map projection origin (0,0) A raster in ArcGIS has two coordinate systems; the row/column matrix and Cartesian x,y coordinates. The matrix coordinate system All rasters have an intrinsic matrix coordinate system where cell locations are defined by their row and column position in the matrix. The origin is the upper-left cell, at row 0, column 0. The rows and columns are always perpendicular regardless of any assigned map projection. The matrix coordinate system is used internally by all tools and raster operations. The Cartesian coordinate system ArcGIS imposes a Cartesian (x,y) coordinate system on raster data. If no projection has been defined, then the origin (0,0) is the upper-left corner of the upper-left cell (the x,y coordinates are negative over the area of the raster) and the cell size is assumed to be one unit. Users interact with raster data using Cartesian coordinates. Map projections The Cartesian coordinate system may be registered to a map projection through the process of georeferencing so that users can work with rasters using familiar projected map coordinates like UTM meters or State Plane feet. The origin becomes the origin of the projected coordinate system. ESRI grid size limit The maximum dimension of a grid dataset’s matrix of cells is 2.1 GB. You are more likely to be limited by the memory and available space on your machine than by the grid size. Other raster formats have different limits. Other raster formats have different size limits.
5
Raster resolution Rasters always generalize spatial data
A function of cell size (smaller cells = higher resolution) Impacts accuracy, processing speed, storage space An important characteristic of raster datasets is that they always generalize spatial data to the cell boundaries. Smaller cells give less generalization but result in larger datasets. The example The example shows the effect that cell size has on the representation of spatial data. The finest raster (a 12x12 matrix of 100 meter cells) best depicts the shape of the lake and most accurately reflects its area. But, it takes 144 cells to do so—16 times as many as the 400-meter raster. Choosing a cell size You may set any cell size you like when you convert vector data to raster or when you create new derivative raster datasets. However, choosing an appropriate cell size is not simple. You must balance your application’s need for resolution with practical requirements for storage, display, and processing speed. Choosing too large a cell size causes information to be lost through generalization. But, too small a cell size creates a raster which takes a lot of storage, is slow to process and display, and which implies resolution that the data do not possess. The smallest cell size that may appropriately be used is proportional to the minimum mapping unit used to compile the vector dataset, although there is no clear agreement on the exact proportion. The minimum mapping unit is the smallest area that is represented on the map at the compilation scale like no areas less than 2 acres at 1:24,000 (a square about 295 feet on a side, which is about 0.15 inches on a map at this scale). Various sources suggest minimum cell sizes ranging from half to twice the minimum mapping unit (150 to 600 feet in our example). You probably should not use a smaller cell size without a compelling reason. A reference on choosing a cell size Computer Graphics in Urban and Environmental Systems, Richard L. Phillips. Proceedings of the IEEE, Volume 62, Nov , pages Cell size 100m 200m 400m Matrix 16 x 16 5 x 5 4 x 4 Lake Cells 68 10 9
6
Raster cell coincidence
Analysis between rasters compares values for cells Rasters must be registered to a common coordinate system + + = 5 12 10 27 Raster-based coincidence analysis is fast because location is intrinsic to the data model. Unlike vector systems, which must mathematically compute the intersection of the input data, raster- based systems simply look up the same row and column positions in the input rasters. In the example above, the software finds the values of the cells found at row 3, column 2 in the two input rasters, adds them together, and writes the result to the same cell in the output raster. It really isn’t that simple In order for the analysis described above to work, all the rasters must be registered to the same coordinate system (and hence to one another) and the cells must line up between them. You may need to register your rasters with the ArcGIS georeferencing and projection tools. Differences in cell geometry are automatically accounted for by the Spatial Analyst during analysis through a process called resampling.
7
Raster registration Rasters should be registered to a map projection
Just like vector datasets Use georeferencing tools Register to a projection Set coordinates for cell locations Part of ArcGlS (do not need Spatial Analyst) Use projection tools Change projection Like vector data, raster datasets are not very useful unless they are registered (aligned) to one another through a common coordinate system. If they’re not registered, it is not possible to perform such basic operations as merging or overlaying. Registration Raster datasets may be scaled, shifted, and stretched so they “fit” one another spatially. An example might be taking two scanned images, like the left and right sides of an engineering drawing, and fitting them together into one image. Georeferencing Georeferencing is a fairly involved process that entails assigning coordinates from the desired coordinate system (usually based on a map projection) to locations on the raster dataset in its present coordinate system, then mathematically transforming the raster dataset to fit the new coordinate system. It is often easier and faster to georeference vector data, then convert it to raster format. This essential process is discussed in detail later in this class. Projecting ArcGIS and Spatial Analyst can project raster datasets on-the-fly during analysis and display, provided that the rasters have a documented projection. Tools in the ArcToolbox may be used to set the projection for rasters that are in a known projection but have not been documented. Georeferencing tools in ArcMap may be used to transform rasters in an unknown projection into a known projection. Tools in the ArcToolbox and ArcMap may be used to convert rasters from one projection to another.
8
How rasters with different cell geometries are combined
Raster resampling How rasters with different cell geometries are combined Controlled by the output raster environment Output cell center is compared to input cell centers Nearest input cell value is used (other techniques available) Cells in different but registered rasters often do not line up, either because their cells are different sizes or because their cell boundaries are shifted relative to one another. When rasters are combined, Spatial Analyst must identify, for each output cell, the corresponding cells in the input rasters. This process is called resampling. The resampling process is transparent to the user and is performed automatically whenever rasters are combined. Nearest neighbor resampling Resampling uses a vector representation of the rasters. Spatial Analyst finds the coordinates for the cell centers (centroids) of the output and input rasters. It uses the value of the input cell whose centroid is nearest to the centroid of the output cell in its calculations. This nearest- neighbor resampling technique is used automatically whenever rasters are combined. Other resampling techniques The Spatial Analyst Resample tool allows you to explicitly resample a raster dataset to change its cell size. In addition to the nearest-neighbor and search methods (which are best for discrete data), it also has bilinear and cubic convolution methods (which are best for continuous data). Note that resampling a raster to a smaller cell size does not increase its resolution it just makes more cells. Data loss Resampling may cause data loss, especially when you are resampling from small cells to large. For example, if you were to resample wells in a raster with 10-foot cells to a raster with 100- foot cells, it is likely that the centroid of an output 100-foot cell would fall in a empty 10-foot input cell, missing the well in the adjacent cell. The search method of the Resample tool corrects for this by ignoring empty input cells (those that contain the NoData value). Input raster: 4 x 4 Output raster: 2 x 2
9
Raster cell values Raster cell values
Integer or floating point — depends on raster format ESRI grid, TIF, 1MG, and ER Mapper support both See help for details Integer: Discrete data (like land use and vegetation) Floating point: Continuous data (like distance and rainfall) NoData: Special flag value Indicates no measurement for a cell Numeric value varies with format Integer 1 1 2 Vegetation 0 = Rock 1= Forest 2 = Water No data 1 1 1 no data 1 2 2 1 1 2 2 Floating All ArcGIS supported raster formats can store integer cell values, and some can also store floating point cell values — notably ESRI Grid, TIE, 1MG and ER Mapper. The range of values that may be stored depends on the bit-depth of the raster, like 8-bit unsigned integer, 32-bit floating point, and so forth. Refer to the online help topic ArcCatalog> Working with rosters in ArcCatalog> Technical specifications for raster formats for details. Integer Integer cell values are typically used for classified data, like codes for land use or vegetation types. There are exceptions; for example, elevation surfaces often have integer values. Integer bit-depths may be 1, 2, 4, 8, 16 and 32 bit (8-32 bit may be signed or unsigned). The Spatial Analyst tool Float converts integer rasters to floating point. Floating point Floating point cell values are typically used for measured data, like distance to roads or rainfall levels — although again, there are exceptions. All supported formats use 32-bit storage. The Spatial Analyst tool int converts floating point rasters to integer. NoData NoData is a special value assigned to cells that have no value. The numeric value of NoData varies with the raster format and the bit-depth of storage, but it will always be a unique, otherwise un-used value in the raster. The ESRI grid format natively supports NoData, but the concept is foreign to most other raster formats. With most non-grid formats, the areas of NoData are stored within the rasters AUX file. Spatial Analyst has tools for setting cells to NoData and for testing cells for the NoData value. Coordinates The Cartesian coordinates used to register a raster to a coordinate system are stored as 32-bit floating point values. 1.12 1.75 1.81 2.03 Rainfall (inches) 0.26 1.63 1.87 1.98 0.00 0.91 0.73 1.98 10.00 0.18 no data no data
10
Raster attribute tables
All single-band, integer rasters have “virtual” tables Created on-the-fly by ArcGIS Support ArcMap joins and relates Integer ESRI grids have real tables Support user-defined fields Use fields in analysis and queries ArcGIS constructs a “virtual” attribute table for any supported raster format that contains single-band integer data. The virtual attribute table appears in both ArcCatalog and ArcMap. Virtual tables always have fields for Value and Count (the number of cells with a value). They may have other fields as well, such as Red, Green and Blue fields for image formats that have internal color maps like the TIF image above (the fields are not shown). A table will have a record for each unique non-NoData value in the raster — up to a maximum of 65,000 records. ESRI grid attribute tables Integer grids may have a “real” attribute table stored in INFO as a table named “grid.VAT”. The VAT always contains Value and Count fields, and you may use the Workstation Arclnfo Additem and Joinitem commands to add fields to it (ArcGIS lacks these tools). Also, you may use the Merge Vat command in either the Spatial Analyst Raster Calculator or in Workstation Arclnfo to join the fields of one grid to the VAT of another. User-defined fields may be used in queries and symbol assignment, and numeric fields may be used in analysis. VAT tables are not always created for an integer grid. If the range (max mm) of the unique values is greater than 100,000 or if there are more than 500 unique values, the VAT is not automatically built — although ArcGIS will still show a “virtual” attribute table for the grid. You may force the creation of the VAT with the Build Vat command in either the Spatial Analyst Raster Calculator or in Workstation Arclnfo. The ERDAS Imagine raster format (1MG) has limited support for user-defined attribute fields. If you convert a grid to 1MG format, the user-defined fields are preserved and are stored in the 1MG files header records. However, there no tools to add or drop attribute fields for 1MG files. ArcMap joins and relates ArcMap joins and relates are supported for raster attribute tables — both virtual and real - although the joined fields may only be used for queries and symbol assignment.
11
Raster zones and regions
Organizations of cells within an integer raster Zone: All same-value cells in a raster, connected or not Part of data model — a row in the attribute table Region: A group of connected same-(unique)-value cells Not part of data model — concept only — also a zone Some Spatial Analyst tools work with zones and regions 1 1 2 Vegetation 0 = Rock 1= Forest 2 = Water No data 1 1 1 no data 1 2 2 1 1 2 2 Geographic features lose their identity when they are represented in raster format. For example, a lake becomes a collection of many same-value cells, and none of the cells “know” that they are part of a larger structure. However, there are higher-order organizations for cells. Zones All cells in an integer raster that have the same value belong to the same zone, whether they are connected to one another or not. For example, there may be many lakes in a raster, each with a different number of cells. All the cells with the “lake” value belong to the same zone. This organization is reflected by an integer rasters attribute table, where each record in the table corresponds to a zone identified by the Value field, and the number of cells belonging to that zone is stored in the Count field. Spatial Analyst has tools that work with zones, like ZonalGeometry and ZonalStatistics. Regions A group of connected cells with the same value, unique throughout the raster, is called a region. Following our example, if the cells making up each lake had the same unique value, like “lake 1”, “lake 2” and so forth, then each lake would be a region. A region is a purely conceptual organization with no representation in the data model; however, each region is also a zone, so each region/zone will have its own record in the attribute table. In many types of geographic analysis it is necessary to work with uniquely identifiable areas. The Spatial Analyst tool Region Group may be used to assign unique identifiers to groups of connected, same-value cells. Using the zones example where all lake cells in the raster have the same value, Region Group can find groups of connected lake cells and give all the cells in each group the same unique ID, allowing you to identify “lake 1”, “lake 2”, and so forth.
12
Raster formats The format is how cells are stored in a raster
ArcGlS supports dozens of raster formats Various image formats (SID, 1MG, TIF, more...) ESRI grid and grid stack ESRI ArcSDE raster ESRI raster dataset ESRI raster catalog All may be managed in ArcCatalog All may be used with Spatial Analyst tools The format of a raster is how the cells are stored inside it. Many raster formats have been developed over the years to support specialized uses; some offer high data compression, some handle color better than others, and some are designed to store geographic data. ArcGIS supports over 35 raster formats. (A comprehensive list is provided in the ArcGIS Desktop Help under ArcCatalog> Working with rasters in ArcCatalog> Supported raster formats). And, you may add support for other formats by programming with the ArcObjects. Raster support in ArcGIS Most ArcGIS and Spatial Analyst tools will accept any supported raster format as input; essentially, all are just matrices of cells that store numbers. Bands and bits Some raster formats are single-band, some are multi-band, and some support both. In single- band formats, each cell stores a single numeric value. In multi-band formats, each cell stores multiple numeric values. For example, images that contain thousands of colors usually have three bands; the amounts of red, green and blue that are mixed to produce the color for the cell. Spatial Analyst generally requires that you select one band for input to an analysis tool. Different formats allocate different amounts of storage space for cell values, which controls the range of numeric values that the cells can store. Most store values in 1, 2, 4, 8, 16 or 32 bits, and may or may not reserve a bit for a sign (positive or negative). For example, a I-bit raster can only store values of 0 and 1 (good for black-and-white images), while a 32-bit signed integer raster can store values of approximately ±2,147,483,648 (±2.15 billion).
13
Raster format essentials
• All raster formats are basically the same Cells organized in a matrix of rows and columns Content is more important than format: data or picture? Raster data Elevation • Land use codes • Population density Good for analysis Slope from elevation Good for mapping Thematic layers Derivative products (like shaded relief) Raster pictures Scanned maps Satellite images (classified) Photos of buildings Good for mapping Backgrounds Good for attributes Picture of house Bad for analysis All rasters are basically the same All rasters are a collection of equally-sized cells organized into a matrix of rows and columns. The cells contain numbers which represent data values (like feet above sea level) or colors (like 0 black, I = white). Data or picture? Rasters may contain data or pictures, although the difference between them is often blurry. The Spatial Analyst functions and operations work on any supported raster, but make sure that the operation you perform is appropriate for contents of the raster. Raster data The numeric values stored in the cells represent either measurements, like elevation above sea level, or categorical values, like land use codes. You may use data rasters in analysis or queries and get meaningful results. Raster pictures The numeric values stored in the cells (also called pixels, or “picture elements”) represent colors; simple black-and-white, or shades of gray, or colors like pale blue and so forth. Rasters that store non-geographic images like photos of buildings are useful as attributes of vector features. Rasters that store geographic images like scanned maps may be georeferenced and used as a background in cartography. But regardless of content, analysis with pictures usually isn’t meaningful other than operations intended to manipulate the image quality, of course. Disclaimer Note that our distinction between “data raster” and “picture raster” was adopted for the convenience of these course materials and is not found in common usage. In reality, “picture” rasters are data, too.
14
Image formats Often have multiple files Some are designed for pictures
Like O37076C8.TIF and O37076C8.tfw Easy to manage with ArcCatalog Some are designed for pictures Do not store spatial information like projection ArcGIS “enhances” with AUX, RRD files Some are designed for geospatial data Have built-in support for spatial information ERDAS 1MG, Lizard Tech MrSID, GeoTIFF, etc. Compression can slow analysis Spatial Analyst must de-compress first Most image formats are stored as multiple files on disk, like map l.tif and map 1.tfw. You can use operating system tools to manage image files, but you must remember to manage all of them when you do so. ArcCatalog is a more convenient management tool; it only shows one entry for an image regardless of the number of files it has and updates all of the files correctly. AUX and RRD files Some raster formats, like grids, 1MG and TIF, natively support geospatial data by storing projection and other useful geographic information. Others, like GIF and BMP, do not. To extend geospatial support to non-geospatial image formats, ArcGIS creates an auxiliary file (raster.AUX) to store geographic information like cell value statistics, color maps, projections, spatial transformations and other information that makes an image more useful to ArcGIS. To speed drawing, you may use ArcGIS to create Reduced Resolution Datasets (raster.RRD) for rasters. RRD files contain several versions of the raster with increasingly larger cell sizes (pyramids). ArcGIS draws the pyramid whose cell size most closely matches the screen resolution and display scale. RRD files are typically small (about 8% of the size of an uncompressed image), but may be larger than the original for highly compressed formats. Compression and processing speed Most raster formats use methods like LZW or run-length encoding to compress cell information so that the raster will take less room to store. Spatial Analyst must dc-compress a raster during analysis, and the more highly compressed it is, the longer the decompression takes. Converting raster formats Most Spatial Analyst tools output rasters in ESRI grid format. However, ArcGIS can export any raster to another format; ESRI ArcSDE raster, ESRI personal geodatabase raster (really 1MG), ESRI grid, ERDAS Imagine (1MG), Tagged Image File Format (TIFF), or an XML- based interchange format. Other conversion tools are found in the ArcToolbox.
15
ESRI grid format Native format for Spatial Analyst Two types:
Default output from most tools A folder containing multiple files Have associated INFO tables (manage grids with ArcCatalog only) Two types: Floating point — continuous data (usually) Integer — discrete data (usually) Integer grids may have user-defined attribute fields The default raster format Most Spatial Analyst operations output raster data in ESRI grid format. In many ways, the grid is the most flexible raster format for analytic uses. Grids store cell values as either integer or floating point numbers (32 bit, signed). Integer grids are typically used to store discrete data, like soil codes, and floating point grids typically store continuous data, like distance to roads. Grid storage A grid is stored as a folder containing multiple files. Some files store the cell values. Others store additional information about the grid like its projection, cell value statistics and user- defined attributes. Several of the files are represented in an associated U’.FO database; one database serves all the grids in a workspace. Tip: Only use ArcCatalog to manage grids to ensure that the INFO files are handled properly. Tip: Grid names are limited to 13 characters, with no blanks or special characters (INFO limit). Grid attributes Integer grids have an associated value attribute table (VAT) that contains one row for each unique value stored in the grid. The VAT always has fields for Value and Count. User-defined fields may be added to the VAT with the Addlterns command in Workstation Arclnfo. Numeric fields may be used in Map Algebra. And, grids may participate in an ArcMap join. Grid stacks A grid stack is a collection of one or more grids, implemented as an INFO file that lists the path names to all the participating grids. Grid stacks are used mostly by the Spatial Analyst multi- variate statistical analysis tools, like PrincipalComponents and ClassProbability. Stacks may be created with the CompositeBands tool in ArcToolbox, the Workstation Arclnfo MakeStack command, or when you export multi-band images to grid format.
16
The analysis environments
Control how an output raster is created Set for geoprocessing and Spatial Analyst toolbar — independent Output workspace Input raster Output raster Cell Size Most Spatial Analyst operations create a new output raster, usually in grid format. The analysis environment settings control how the output raster is created. All have defaults, but you should set them before you perform any analysis. Each is discussed in detail on the following pages. The environments • Output cell size - The size of the output cells may be specified and may be different than any of the input rasters. • Output extent - The extent of the output raster may be specified and may be different than any of the input rasters. • Snap raster - Adjusts the origin of the output extent to the closest cell corner in the snap raster. Helps ensure that output cell boundaries align with another raster. • Output projection - The projection of the output raster may be specified and may be different than any of the input rasters. • NoData mask - A mask area may be specified with a raster or vector layer to identify areas where the output cells will be set to NoData (no processing occurs for cells in the mask area). • Workspace - Specifies the folder(s) that will be searched for input data and where output data will be created by default. Set for both the Spatial Analyst toolbar and ArcToolbox The Spatial Analyst toolbar and the geoprocessing environment (ArcToolbox, command line, models and scripts) maintain their own, separate raster processing environments. That is, you may set a cell size of 30 meters in the Spatial Analyst toolbar and a cell size of 100 meters in the ArcToolbox. Rasters created with tools in the Spatial Analyst toolbar will have 30 meter cells, while those created with ArcToolbox (or scripts, etc.) will have 100 meter cells. Extent Projection Mask
17
Setting the output cell size
Rasters are resampled during analysis Combine rasters with different cell sizes, output another size Output options: Maximum of inputs (default) Minimum of inputs Same as layer As specified Maximum of Inputs = 30m 10m 30m Spatial Analyst can combine multiple rasters with different cell sizes (see the earlier discussion on resampling) and create the output raster with yet another cell size. You may specify one of the options below to control the cell size of the output raster. • Maximum of inputs (default): Creates the output raster with the largest cell size found in any of the input rasters. This option is appropriate for most cases when rasters of varying cell sizes are used together because combining low resolution data with high resolution data should result in low resolution data. • Minimum of inputs: Creates the output raster with the smallest cell size found in any of the input rasters. • Same as layer: Creates the output raster with the same cell size as the selected raster layer. The output cell size may be different than that of any of the input rasters. • As specified: Creates the output raster with the cell size you specified. You type the length of a side for the output cell (the width and height of a cell are always equal), expressed in the output (projected) coordinate system units, like feet or meters. The output cell size may be different than that of any of the input rasters. Choosing a cell size See the earlier discussion on raster resolution. Minimum of Inputs = 30m 10m 10m
18
Setting the output extent
Controls the width and height of the output raster Combine rasters with different extents, output another extent Output options: Union of inputs (default) Intersection of inputs Same as layer Same as display As specified In1 In2 Union of outputs The output extent controls the width and height of the output raster. Multiple rasters with different geographic extents may be combined, and an output raster created with yet another extent. You may specify one of the options below to control the extent of the output raster. • Union of inputs (default): Creates the output raster with an extent large enough to contain all the input rasters. Note that most Spatial Analyst tools will write NoData to cells that are not in the area common to all the input rasters. (The general processing rule is that if any of the input cells are NoData for the location of the output cell, then the output cell is set to NoData). • Intersection of inputs: Creates the output raster with an extent only large enough to contain the area that is common to all the input rasters. Note that if the input rasters have no common area, the output extent will be the same as the first input and all output cells will be NoData. • Same as layer: Creates the output raster with the same extent as the selected raster or feature layer. This option is useful for clipping a raster to another layer. • Same as display: Creates the output raster with the same extent as is visible in the ArcMap map display when the setting is made (the extent does not dynamically change as you zoom and pan on the map). This option is useful for quickly clipping a raster to an area of interest. • As specified: Creates the output raster with the extent you specified. You type the minimum and maximum x,y coordinates of the extent, expressed in the output (projected) coordinate system units, like feet or meters. This option is useful for clipping a raster to a precise area. The specified extent may be adjusted The upper-right corner of the specified extent may be slightly adjusted such that the width and height of the output extent will be even multiples of the output cell size. This is because a raster cannot contain a partial cell. The adjustment will never be larger than the output cell size. In1 In2 Intersection of outputs
19
Setting the analysis mask
Defines areas where analysis is performed Useful for clipping to irregular shapes Vector mask Only cells covered by features are output (others set to NoData) Create a feature mask with selection and export • Raster mask Only cells covered by valued cells are output (others set to NoData) Create a raster mask with several Spatial Analyst techniques Mask Input Output The analysis mask identifies areas within the output extent that will be analyzed during an operation. An analysis mask may be either a raster or feature layer. Areas in the mask that are NoData (or that are not inside a feature) are set to NoData in the output raster. Raster and feature masks If a cell in a raster mask is NoData, the corresponding output cell will be set to NoData. Non NoData cells in the mask may have any other value(s). All cells in a raster layer are used whether they have been selected or not. Point, line, or polygon features in a feature layer may be used to define a mask. Output cells that fall under a feature are processed, while output cells that do not fall under a feature are set to NoData. All features in a feature layer are used whether they have been selected or not. Using a mask Masks may be used to exclude areas from analysis. For example, before running a model you could set a mask in which water bodies are No Data (or are not covered by a feature) — the water bodies will be excluded from processing and set to NoData in the output when you run the model. Masks may also be used to clip rasters to an irregular outline. Use the input raster to set both the cell size and snap raster. Use the mask layer to set both the mask and extent. Creating a mask Raster masks are created by setting cells outside the area of interest to NoData. There are many Spatial Analyst tools that may be used to perform this task, like CON, SETNULL, and SELECT. You will use several techniques throughout this class to make raster masks. Vector masks are created by selecting the features that define the area of interest and exporting them to a new vector dataset. (In ArcMap, select the features from the layer, then right-click the layer and choose Data > Export Data from the context menu that appears). No data
20
Setting the output projection
Rasters may be projected during analysis Combine rasters in different projections, output to another Output options: Same as input Same as display Same as layer (geoprocessing only) As specified (geoprocessing only) Uses “Fast project” Best for small areas at low latitudes Spatial Analyst can combine multiple rasters in different projected coordinate systems and output the result in yet a different projection by performing a “fast” projection on the fly. You may specify one of the options below to control the projection of the output raster. • Same as input: The output rasters will be in the same projection as the input raster (or first input if multiple rasters are involved). • Same as display: The output rasters will be in the same projection as the active ArcMap data frame, regardless of the projection of the input raster (s). Set the data frame projection in the Data Frame Properties dialog on the Coordinate System tab. • Same as layer: The output rasters will be in the same projection as the specified raster or feature layer in the ArcMap Table of Contents. This option is available in the geoprocessing environment only. • As specified: The output rasters will be in the selected projection. This option is available in the geoprocessing environment only. Raster projection on-the-fly The fast projection method used by ArcGIS to project rasters on-the-fly for ArcMap display and Spatial Analyst analysis is not rigorous. It gives generally acceptable results for areas smaller than 1 degree in extent, located between 70 degrees north or south. Otherwise, you should consider projecting the rasters to a common projection using the ArcToolbox Project Raster tool (found in Data Management Tools > Projections and Transformations > Raster). Projection on the fly won’t work for rasters that have no projection information stored with them. You may use ArcToolbox to define projections for rasters, if needed. ArcGIS at release 9.0 supports datum transformations for both the ArcToolbox Project Raster tool and on-the-fly projection.
21
Setting the geoprocessing environments
The ArcGIS geoprocessor has one integrated dialog that sets processing environments for all outputs; shapefiles, rasters, geodatabase feature classes, and so forth.. The environments control how data is created using the ArcToolbox tools, the command line, scripts, and models. For Spatial Analyst tools, you normally need to make settings under the General Settings and Raster Analysis Settings pull-down controls. Note that the geoprocessing environments do not control outputs created with the Spatial Analyst toolbar. Opening the dialog Right-click anywhere in the ArcToolbox (in ArcMap or ArcCatalog) and choose Environments from the context menu that appears. Additionally, each ArcToolbox tool has a control to open the Environment Settings dialog, as does a model’s property dialog. Saving the environment In ArcCatalog, the geoprocessing environments persist between sessions. That is, if you make a setting, then close and re-open ArcCatalog, the setting will still be in effect. In ArcMap, the geoprocessing environments are reset to their defaults between sessions. That is, if you make a setting, then close and re-open ArcMap, the setting will be the default. However, if you save a map or template the settings are preserved in the .MXD or .MXT file. You may save and re-load the environments in both ArcMap and ArcCatalog. Right-click in the ArcToolbox and choose Save Settings or Load Settings from the context menu. Getting help The Show Help button on the Environment Settings dialog exposes or hides the help area, which displays a brief description of the currently selected control in the dialog. Also see the ArcGIS Desktop Help under Geoprocessing> Geoprocessing in the ArcGIS environment.
22
Setting the toolbar environments
The Spatial Analyst toolbar Options dialog only sets processing environments for raster outputs created with tools executed from the Spatial Analyst toolbar. The environment settings are organized under three tab controls on the dialog. Note that the Spatial Analyst toolbar environments do not control outputs created with the geoprocessing tools. Opening the dialog On the Spatial Analyst toolbar, click the Spatial Analyst drop-down and choose Options from the menu that appears. Saving the environment In ArcMap, the Spatial Analyst toolbar environments are reset to their default values between sessions. However, if you save a map or template the environments are preserved in the .MXD or .MXT file. You cannot save the environments in a separate file. Getting help See the ArcGIS Desktop Help under Extensions> Spatial Analyst> Performing analysis in Spatial Analyst.
23
Exercise 3 overview Explore the analysis environment Cellsize
Extent and snap raster Mask Projection Clipping with the analysis environment With the extent (rectangular shape) With the extent and mask (irregular shape)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.