# Section Three - Raster Data

Second in our list of spatial data types is raster data. In reality, raster data is any pixel-based picture data (JPG, PNG, TIFF for example) which is loaded into the software. Both a picture of your cat Mogwai and a Digital Elevation Model (DEM) are seen as raster data by the software, the only difference being that the spatial raster, the DEM, has coordinate system information attached, allowing the GIS to know where in the world to "put" when it's displayed on screen. In fact, you can add a picture of your cat to the GIS, the GIS simply won't know where it should draw the raster data.

All digital images (raster data) are comprised of a series of pixels (short for picture elements) arranged in in rows and columns to create a grid pattern. You may have seen the pixels of an image before when you try to post an picture to your social media account that was once a small sized picture and you’re trying to make it display full page. We would describe the image as pixelated, or the fact that the image pixels have become so large, that the only thing you can see is the pixel makeup of the image and not the image itself. Kind of like the cliché "you can't see the forest because of the trees", meaning that you cannot see the entire forest if you are so close, you can only see the trees.

Figure 3.6: A Pixelated Version of the Mona Lisa
In this image, we can see all the pixels a digital version of the Mona Lisa is made up of. Notice the pixels are all squares in a grid pattern.

The properties of raster data is what makes the unique compared to vector data. We learned that vector data is data is just a graphical representation of objects using vertices connected by straight lines to outline an area (polygons), mark the location of a single instance (points), or trace along linear objects (polylines). Because we can place a vertex really anywhere we want in the software, there are no "rules" about vector data beyond the vertex minimums to create points, polylines, or polygons. Vertices can be placed very close together or very far apart. They can be moved and deleted freely, and new vertices can be added to any vector feature (a single object stored in the larger shapefile or feature class, ie. the State of Colorado would be a single feature within a US_States feature class or shapefile) at any interval at any time. Rasters, however, have very strict rules. Each pixel is a defined size, both in height and width, and because each pixel is a square and all the rows and columns are coincident (have a shared boundary), by default, the center-to-center measurement, that is from the center of one pixel to the center of his direct neighbor (in straight lines, not diagonal), will be equal. You cannot delete pixels, but you can hide them from view, making them transparent. You can cut out smaller rasters from larger ones, or create a subset raster, or you can join two or more rasters together to create a larger raster in a process called mosaicking, but that is pretty much it. We can run geoprocessing tools on rasters, creating new rasters by examining the properties of the non-spatial data, but even that process doesn't destroy or modify the original raster pixels.

Figure 3.7: Raster Properties
All rasters are a series of pixels arranged in rows and columns, each with an equal height, width, and center-to-center value.

The beauty of these strict raster rules is the fact that assumptions can be made about spatial rasters that cannot be made about vectors. Since each pixel is a perfect square, we can measure the distance on the Earth's surface that is covered by that raster, basically using the edge of a raster pixel as a ruler. This is called the raster's spatial resolution the real-world measurement of one side of one pixel in a raster, ie. 30 meters. High spatial resolution would equate to small pixels while low spatial resolution would equate to large pixels , and it's one of several assumptions we can make. When we see an image of an area in a 30 meter spatial resolution the real-world measurement of one side of one pixel in a raster, ie. 30 meters. High spatial resolution would equate to small pixels while low spatial resolution would equate to large pixels raster or a 30-meter raster, we know - for a fact - that the side of each pixel covers exactly 30 meters on the ground. Since the distance one pixel covers is a known value, we can measure distances and use geoprocessing tools to infer distribution and relationship properties of that raster compared to the coordinate system the data is stored in; compared to other rasters; or compared to vector data.

All rasters, whether they are spatial rasters or pictures of your pets, have numbers - and only numbers - associated with each pixel. These numbers can represent the red, green, and blue values in the case of a color picture, or they can represent information, such as elevation the vertical distance between local mean sea level the measurement above or below the global average at a single point on the Earth's surface used for recording the elevation of topographic surface a detailed map of the surface features of land. It includes the mountains, hills, creeks, and other bumps and lumps on a particular hunk of earth. The word is a Greek-rooted combo of topos meaning "place" and graphein "to write." 's relief the difference between the highest and lowest point within a particular area while landforms are the descriptive words for individual features and a single point on the Earth's surface in the case of DEM's. The numbers within one raster can be either decimal numbers, or what we would call a float raster (float just being "coding language" for decimal) or whole numbers, called an integer raster. No raster has a combination of float and integer numbers for that is simply not allowed. If you see whole numbers represented in a float raster, they simply don't have an digits after the decimal.

Even though a picture of your cat is technically a raster (as raster is another word borrowed by GIS and used in many other computer-based arts and sciences), what sets spatial rasters apart from a picture of Grumpy Cat is the spatial information. In addition to having either RGB values (color rasters) or black levels (black and white rasters), like all rasters, spatial rasters have a coordinate system and coordinates associated, meaning that every pixel "knows" exactly where in the world it lives. Each corner of each pixel has a stored geographic or projected coordinate pair (just like vertices in vector data), making the image georeferenced, or defining and storing very specific location data about the image - aka: geo = Earth and reference = reference, so referencing the Earth (a coordinate system representing the Earth).

Properties of Rasters
1. All digital pictures are rasters
2. All raster images are made of pixels
3. Pixels are squares which are all coincident to each other
4. All raster pixels contain numbers either telling the computer how to turn the monitor lights on to make colors or what the associated data value is (ie. elevation the vertical distance between local mean sea level the measurement above or below the global average at a single point on the Earth's surface used for recording the elevation of topographic surface a detailed map of the surface features of land. It includes the mountains, hills, creeks, and other bumps and lumps on a particular hunk of earth. The word is a Greek-rooted combo of topos meaning "place" and graphein "to write." 's relief the difference between the highest and lowest point within a particular area while landforms are the descriptive words for individual features and a single point on the Earth's surface )
5. Rasters can be float rasters (contain decimal number) or integer rasters (whole numbers), never a mix within one raster
6. If text is seen in the GIS for raster data, there is an associated "lookup" table which equates the pixel value to the term (ie. 1 = Grasslands)
7. Since pixels are squares, the height and width values are equal. Because raster pixel are coincident, the center to center value is also equal. H-W=C2C
8. Rows and columns of pixels do not have to equal the same number (3x3, 4x4, etc), but all rows and columns must be complete - aka no missing pixels. Pixels can be hidden in the GIS, but the extent of the raster will always be a rectangle of some sort.

### 3.3.2: Classification Rasters

While many rasters are images, sometimes we can use classification rasters, or rasters made up of integer values which, instead of showing an actual captured image of what is on the Earth's surface, they show a colored-in picture of what the pixel represents. To classify the image, the software considers the attribute, such as water, land, building, etc., then decides how much of the cell is that item. If it is a mixed pixel, or a pixel that has two or more items in it, the software will use a decision making process to decide what to classify, or “name”, the cell. For example, if the cell is 50% or more water, the tool will classify it as water.

GIS 1040 really focuses on learning GIS software using vector data, but it's important to understand the properties of raster data.

Figure 3.8: The Classification of Raster Images
Satellite Image of a Coastline Classification Result Close-up of Classification Result Raster Values Exposed

### 3.3.3: Recognizing Raster Data

In the vector section of the reading, we noted that when we look at spatial data in the GIS, the file icons associated with each vector file are a key to recognizing what the geometry type is (based on the decoration of the icon) and if the file is a shapefile or a feature class (green vs blue). Raster data is no different, the software provides us with file icons to recognize if a file is a raster file and where the raster is stored.

For both rasters stored inside a geodatabase and those stored inside a folder, the icon is the same - a small grid with twelve "pixels". Just a small representation of the basic raster structure. Remember, all of these file icons can be looked up in the File Icon page on the wiki (link button in the top toolbar).

Figure 3.9: Raster Icons in ArcGIS Software
Rasters stored in a geodatabase have a blue raster structure looking icon. Raster images stored inside folders have a yellow file icon, with the same icon structure as the geodatabases raster icon.

### 3.3.4: Raster Types

Classification raster often have very specific names, like "Digital Elevation Models (DEM)", "Land Use", "Land Cover", "Hillshade", "Slope", or "Aspect", depending on what the coded value is showing. Land use codes usually refer to what the area is used for - urban, farming, forest, etc, while land cover codes usually refer to what is the make-up of the pixel, such as water, snow, crops, grass, etc. Aspect and slope rasters use colored values to express which way a mountain slope faces and how steep an area is, respectively.

#### Digital Elevation Model (DEM) Rasters

Digital Elevation Models or DEM is a special case of classification raster. These raster files hold fairly detailed information about the elevation the vertical distance between local mean sea level the measurement above or below the global average at a single point on the Earth's surface used for recording the elevation of topographic surface a detailed map of the surface features of land. It includes the mountains, hills, creeks, and other bumps and lumps on a particular hunk of earth. The word is a Greek-rooted combo of topos meaning "place" and graphein "to write." 's relief the difference between the highest and lowest point within a particular area while landforms are the descriptive words for individual features and a single point on the Earth's surface changes in a landscape. DEM Each pixel, whether it is 1, 10, or 30 meters (the common DEM sizes) stores the average elevation the vertical distance between local mean sea level the measurement above or below the global average at a single point on the Earth's surface used for recording the elevation of topographic surface a detailed map of the surface features of land. It includes the mountains, hills, creeks, and other bumps and lumps on a particular hunk of earth. The word is a Greek-rooted combo of topos meaning "place" and graphein "to write." 's relief the difference between the highest and lowest point within a particular area while landforms are the descriptive words for individual features and a single point on the Earth's surface for the corresponding square on the Earth’s surface. As you can see, the higher the spatial resolution the real-world measurement of one side of one pixel in a raster, ie. 30 meters. High spatial resolution would equate to small pixels while low spatial resolution would equate to large pixels , or amount of ground covered by one pixel, the more accurate the elevation the vertical distance between local mean sea level the measurement above or below the global average at a single point on the Earth's surface used for recording the elevation of topographic surface a detailed map of the surface features of land. It includes the mountains, hills, creeks, and other bumps and lumps on a particular hunk of earth. The word is a Greek-rooted combo of topos meaning "place" and graphein "to write." 's relief the difference between the highest and lowest point within a particular area while landforms are the descriptive words for individual features and a single point on the Earth's surface data. But, as you can imagine, the higher the spatial resolution the real-world measurement of one side of one pixel in a raster, ie. 30 meters. High spatial resolution would equate to small pixels while low spatial resolution would equate to large pixels , the more data it takes to store that information, and thus, the larger the storage device or the longer the time taken to download.

ArcGIS can process DEMs of all spatial resolutions, simply adjusting the accuracy of the resulting contour layer to fit the quality of the input. In most cases, however, 30 meter DEM data is more then enough to create and analyze spatial problems.

Figure 3.10: A Digital Elevation Model (DEM)
A digital elevation the vertical distance between local mean sea level the measurement above or below the global average at a single point on the Earth's surface used for recording the elevation of topographic surface a detailed map of the surface features of land. It includes the mountains, hills, creeks, and other bumps and lumps on a particular hunk of earth. The word is a Greek-rooted combo of topos meaning "place" and graphein "to write." 's relief the difference between the highest and lowest point within a particular area while landforms are the descriptive words for individual features and a single point on the Earth's surface model is a raster which stores elevation the vertical distance between local mean sea level the measurement above or below the global average at a single point on the Earth's surface used for recording the elevation of topographic surface a detailed map of the surface features of land. It includes the mountains, hills, creeks, and other bumps and lumps on a particular hunk of earth. The word is a Greek-rooted combo of topos meaning "place" and graphein "to write." 's relief the difference between the highest and lowest point within a particular area while landforms are the descriptive words for individual features and a single point on the Earth's surface data. From elevation the vertical distance between local mean sea level the measurement above or below the global average at a single point on the Earth's surface used for recording the elevation of topographic surface a detailed map of the surface features of land. It includes the mountains, hills, creeks, and other bumps and lumps on a particular hunk of earth. The word is a Greek-rooted combo of topos meaning "place" and graphein "to write." 's relief the difference between the highest and lowest point within a particular area while landforms are the descriptive words for individual features and a single point on the Earth's surface , slope, aspect The direction the developable surface a geometric shape which will not be distorted when flattened.  Used as the base shape to transfer features during projections.  Most often a cone, cylinder, or plane (azimuthal) faces in relation to the geographic coordinate system. Normal; transverse, oblique , and contour lines can all be derived mathematically.

A common product of a geoprocessing tool used on DEMs are shaded reliefs or hillshades which are a visual representation the DEM if the sun were to shine on it, shading the terrain facing away from the sun, and highlighting the areas of the terrain facing it. Hilllshades are most often used as base maps, an image which serves as a backdrop to vector and other raster data, and generally has little other use. They are basically the same product, it's just one uses shades of gray and the other uses shades of reds, greens, and yellows.

Hillshades express the relief the difference between the highest and lowest point within a particular area while landforms are the descriptive words for individual features of the topographic surface a detailed map of the surface features of land. It includes the mountains, hills, creeks, and other bumps and lumps on a particular hunk of earth. The word is a Greek-rooted combo of topos meaning "place" and graphein "to write." in a 2D image which has a 3D appearance using shades of gray. Shaded reliefs express the same relief the difference between the highest and lowest point within a particular area while landforms are the descriptive words for individual features using color.

#### Slope and Aspect Rasters

The last two common layers produced from DEMs are slope and aspect The direction the developable surface a geometric shape which will not be distorted when flattened.  Used as the base shape to transfer features during projections.  Most often a cone, cylinder, or plane (azimuthal) faces in relation to the geographic coordinate system. Normal; transverse, oblique layers. From the elevation the vertical distance between local mean sea level the measurement above or below the global average at a single point on the Earth's surface used for recording the elevation of topographic surface a detailed map of the surface features of land. It includes the mountains, hills, creeks, and other bumps and lumps on a particular hunk of earth. The word is a Greek-rooted combo of topos meaning "place" and graphein "to write." 's relief the difference between the highest and lowest point within a particular area while landforms are the descriptive words for individual features and a single point on the Earth's surface values stored in a DEM, slope and aspect The direction the developable surface a geometric shape which will not be distorted when flattened.  Used as the base shape to transfer features during projections.  Most often a cone, cylinder, or plane (azimuthal) faces in relation to the geographic coordinate system. Normal; transverse, oblique can be derived. Slope is how steep the grade of the topographic surface a detailed map of the surface features of land. It includes the mountains, hills, creeks, and other bumps and lumps on a particular hunk of earth. The word is a Greek-rooted combo of topos meaning "place" and graphein "to write." is over a defined area while aspect The direction the developable surface a geometric shape which will not be distorted when flattened.  Used as the base shape to transfer features during projections.  Most often a cone, cylinder, or plane (azimuthal) faces in relation to the geographic coordinate system. Normal; transverse, oblique is the cardinal direction the slope faces. The software examines the elevation the vertical distance between local mean sea level the measurement above or below the global average at a single point on the Earth's surface used for recording the elevation of topographic surface a detailed map of the surface features of land. It includes the mountains, hills, creeks, and other bumps and lumps on a particular hunk of earth. The word is a Greek-rooted combo of topos meaning "place" and graphein "to write." 's relief the difference between the highest and lowest point within a particular area while landforms are the descriptive words for individual features and a single point on the Earth's surface values and calculates the slope and aspect The direction the developable surface a geometric shape which will not be distorted when flattened.  Used as the base shape to transfer features during projections.  Most often a cone, cylinder, or plane (azimuthal) faces in relation to the geographic coordinate system. Normal; transverse, oblique based on the increase or decrease in value from one pixel to all eight of it's neighbors. If there is a large decrease, the slope changes quickly; if there is a small decrease, the slope changes gradually. Based on where the pixels show up slope and down slope, the software can calculate which cardinal direction(N, NE, E, SE, S, SW, W, NW) each slope faces. The slope and aspect The direction the developable surface a geometric shape which will not be distorted when flattened.  Used as the base shape to transfer features during projections.  Most often a cone, cylinder, or plane (azimuthal) faces in relation to the geographic coordinate system. Normal; transverse, oblique tools found in ArcGIS utilize this data to create new output layers colored to represent this data in an understandable and meaningful way.

Figure 3.12: Slope and Aspect Layers
Slope is the grade of the topographic surface a detailed map of the surface features of land. It includes the mountains, hills, creeks, and other bumps and lumps on a particular hunk of earth. The word is a Greek-rooted combo of topos meaning "place" and graphein "to write." . Aspect is the cardinal direction of the slope. Both layers are derived mathematically by the GIS software using elevation the vertical distance between local mean sea level the measurement above or below the global average at a single point on the Earth's surface used for recording the elevation of topographic surface a detailed map of the surface features of land. It includes the mountains, hills, creeks, and other bumps and lumps on a particular hunk of earth. The word is a Greek-rooted combo of topos meaning "place" and graphein "to write." 's relief the difference between the highest and lowest point within a particular area while landforms are the descriptive words for individual features and a single point on the Earth's surface values stored in DEMs.

### 3.3.4: Raster Pyramids

When you load raster data into ArcGIS, it will pose the question of whether or not you would like it to “build raster pyramids”. Okay, yeah, that sounds great, ArcGIS, but what is a raster pyramid?

Raster pyramids are several re-sampled, reduced resolution versions of the original data that allows you to work with raster data faster by only showing the low resolution images (longer ground distance per pixel edge) when you are zoomed out, and the higher resolution image when you are zoomed in.

The advantage of raster pyramids is a reduction of drawing time. When the software doesn’t need to draw fine-detail imagery when you are zoomed out, the software just works faster over all. Think back to the dial-up days, when your aunt would email a picture and you’d have to wait five minutes "arc minute" 1/60th of a degree. Usually denoted by " for it to load over that lightning fast connection. GIS software processes raster images much the same way, where we can equate a slow data connection with high resolution GIS images. Raster pyramids re-sample and store several images; each one will draw at cable internet speeds for a range of zoom levels - fine detail for a low zoom level (very close) and course detail for a high zoom level (very far away).

Raster pyramids are stored in an MXD (ArcMap specific save format, creating a map project document) for the exclusive use of drawing speed within that project only, and are not accessible for use in any way.

Figure 3.13: A Graphical Example of Raster Pyramid Creation
In this graphic, we can see the resampling of the raster pixels within the software. For every four pixels, in this example, the dominate color is found, then the next layer creates a pixel of that color. This process is repeated for each resampled layer.