You are on page 1of 4

Ras.2.

Raster data structure & conversion

Before we can start analyzing rasters, we need to some additional data to work with.
This exercise introduces you to how rasters are stored, and how to create raster datasets.

How raster datasets are stored


Rasters used in Spatial Analyst can come in a variety of formats – grids, various image
formats, geodatabase rasters, and others. In this part of the exercise we'll focus primarily
on the grid format, since we can use it in Spatial Analyst, ArcInfo Grid, and with Map
Algebra.

Being especially careful not to disturb anything, explore the datasets with the operating

system: Minimize ArcMap to get to the Windows desktop, then open the
temporary folder we’re using in these exercises. With either Windows Explorer or a
window from “My Computer”, open the raster\hmbarea folder, then open the folders
that correspond to various rasters you’ve created. Note that there are several *.adf files.
These are the files that together form the raster.
Set the window to display file details, so you can see how big the files are.

? Based on what is displayed, which file do you think actually contains the raster cell
values?

Navigate your way back to the hmbarea workspace, and look in the info directory. Note
that there are several files, though you can’t tell what they’re all about. These are info
database files, including several that are associated with attribute tables for rasters, and
they are accessible to you from ArcMap, ArcCatalog, ArcToolbox (and Arc/Info) but you
really shouldn’t use the operating system to mess with them.

2-1
What we’ve seen so far in this brief exercise is how a given raster is contained in a folder,
but there are also related files in the info folder. You need to have both to be able to use
the raster. The hmbarea folder is a workspace that contains: (1) grid (raster) folders, (2)
possibly Arc/Info coverage folders, (3) various related files you’ve created, and (4) an
info directory. You can use the operating system to copy, move, or rename the entire
workspace, but do not mess with individual grid folders or files within those folders or
the info folder.

The difference with rasters in geodatabases is that geodatabases are stored as single files
in the operating system, so you cannot even see the raster as an individual file or folder.
This is probably a safer way to do things.

Raster datasets in ArcCatalog


What we just did in Windows Explorer should never be done to manage our datasets.
ArcCatalog is the tool to use, and gives you all of the capability of Windows Explorer
you need to manage your GIS data. Some characteristics of this program related to grids
(and other rasters) include:
(1) the ability to display grids and other rasters (ArcGIS uses the generic name “rasters”
to refer to all raster datasets, including grids and images of various formats);
(2) the ability to manage your data, moving or copying rasters and other datasets to new
locations, something you should not do in Windows Explorer;
(3) the ability to associate a map projection coordinate system with your raster; and
(4) the ability to edit and view metadata for rasters

¾ Start up ArcCatalog from Windows or by clicking on the ArcCatalog icon from


the Standard toolbar in ArcMap, and navigate to your hmbarea folder with it.

? How does ArcCatalog represent raster datasets?

? How is this different from what you learned using Windows Explorer, and what are
the implications for copying datasets? Consider how you would copy a raster in
Windows Explorer (don't try it!), and how you would do so in ArcCatalog.

? What difference can you seen between a categorical raster (landuse) and a floating-
point raster (elev) in ArcCatalog? [Hint: look at previews – and use the pull-down
selection at the bottom that shows “Geography” or “Table”]

2-2
Setting the Coordinate System (projection)
You can also do this in ArcMap, but it’s more straightforward in ArcCatalog. All of the
datasets in the hmbarea workspace folder are stored in UTM Zone 10, NAD27, the
coordinate system used by USGS for digital elevation models. They have probably been
updated by now, but originally they did not have associated projection information (that
was new with ArcGIS 8). Make sure your data have projection information, and set it if
necessary with ArcCatalog:
¾ In ArcCatalog, right-click one of the rasters in the Hmbarea folder, bring up its
properties, and go to the Spatial Reference section. If it’s not already set, Edit this
field to start the Define Projection wizard. Continue with Next to Define the
Coordinate System Interactively. Choose UTM as the projection, then Zone 10,
then NAD 27 – CONUS as the horizontal datum, over the next few screens. When
you’re done, finish and ok your way back to ArcCatalog.
¾ Do the same for the rest of the datasets. At the Define Projection wizard screen, a
shortcut exists where you can “Define a coordinate system for my data to match
existing data…” instead of defining it interactively.

Dataset Conversion
An important requirement of raster GIS is the ability to convert data formats, especially
to convert vector to raster formats (or the reverse). ArcMap has a set of converters built
into the menu system under the Spatial Analyst menu: Convert…features to raster and
Convert…raster to features. We’ll use
these in the next exercise. Multiple types of tools
You’ll find that there are three types of tools in
There are many more conversion tools
ArcToolbox: models , scripts and system
built into Arc Toolbox. In the Arc
Toolbox Conversion Tools, have a look at tools . You can use any type. The difference is
what’s available for going to and from in how they are created: users create models with
rasters in the various sections. ModelBuilder, users create scripts with scripting
languages such as Python or AML, and system
? How would you convert a grid to a tools are created by the program developers,
geodatabase raster? [Hint: what though many models and scripts come with the
do you need first?] software.

2-3
Reading a DEM (a type of raster to raster)
Elevation models can either be raster, vector, or a combination, but the most commonly
available existing data are USGS DEM (Digital Elevation Model) format, used primarily
for storing elevation, but can actually be
used for other raster data. In this part of GRID Method:
the exercise, we’ll read a DEM from the Grid: hmbelev = demgrid(halfmoonbay.dem)
Grid: woodelev = demgrid(woodside.dem)
Half Moon Bay area we’ve been
working in.
¾ Use the DEM to Raster import tool
to import a DEM of Half Moon Bay. Navigate to the hmbarea directory and select
the file woodside.dem, and save the grid in your hmbarea directory as woodelev.
Use FLOAT as the output data type.
™ What are the z units? The horizontal (xy) units of USGS data are almost always
metres in the UTM (currently NAD27) projection. But what are the vertical (z) units?
Unfortunately USGS DEMs are sometimes stored in feet, sometimes metres. There
actually is a code in the beginning of a DEM file that identifies the units, and there
are various other bits of information in there, but you’ll need a codebook to
understand them – see USGS sources. If you know the area, however, or have a
USGS quad handy, however, it’s not too hard to use the identify tool or the legend to
see what the units are likely to be: Have a look at the elevation raster you just
created. Note that the elevation values range up to 2417. If this were metres, this part
of Santa Cruz Mountains would have to get up to 2417 m or 7930 feet in elevation,
and that just isn’t the case – 2417 feet is more like it.
¾ To fix this, and make your output raster store z units in meters, first delete the output
raster you just created (remove it from the ArcMap legend first, then use ArcCatalog
to delete it), then run the tool again, specifying 0.3048 as the Z factor.
¾ Do the same for halfmoonbay.dem, name it hmbelev, and display them together in
ArcMap.
 Create a map of your combined Woodside/Half Moon Bay area, displaying the
elevation data as a hillshade. Put a title and scale bar on it. No need for a legend.

End of Exercise 2 -- save your project to raster as ras2.mxd, your report in your
Reports folder as Smith_ras2.doc and Smith_ras2.pdf (if your last name is Smith) –
and remember to backup.

2-4

You might also like