News

ArcUser Online


Search ArcUser

newlogo2
The Magazine for
Esri Software Users
 
Home
Subscribe
Advertise
Current Issue


Previous Issues
Submit an Article
What is ArcUser?

Modeling with
ArcView GIS

 
 
 
Using 1:250,000-Scale DEM Data
By Mike Price, Esri

Editor's Note: This article describes how to download, import, reproject, and merge 1:250,000-scale digital elevation model (DEM) data available from the USGS EROS Web site. Visit the Terrain Modeling with ArcView GIS page to read previous articles that describe how to download, convert, and model other types of data such as 1:24,000-scale DEM data, Digital Line Graph optional (DLG-O) format vector data, and Geographic Names Information System (GNIS) label point data.
    The data for the model constructed in this issue describes North Cascades National Park in Washington. Specifically, the data for this model consists of the entire Concrete, Washington, 1:250,000-scale Army Map Service (AMS) quadrangle sheet. It includes the North Cascades National Park and the famous Cascade volcanoes, Mount Baker and Glacier Peak.
    When complete, the model will be in Universal Transverse Mercator (UTM) North American Datum of 1927 (NAD27) Zone 10 projection. To create this model, you will need ArcView GIS 3.2 and ArcView Spatial Analyst.


Quick Review: Downloading and Unzipping Data
    Before downloading any files, create a directory structure to hold and process files using Windows Explorer or another file management program. Create a directory called WA at or near the root of the drive used for modeling. Under \WA, create a subdirectory called CONCRETE. Under \CONCRETE, create three subdirectories named DEMFILES, GRDFILES, and SHPFILES. Under \GRDFILES, create three subdirectories named RAW_DATA, LAT_LONG, and UTM27Z10. Under \SHPFILES, create a subdirectory named UTM27Z10. This very traditional method of creating and naming directories and files avoids problems that could occur when using grid files. Grid folder names cannot contain spaces or periods. Stay with the traditional DOS file naming convention of using eight characters for directory names and eight characters with a three-character extension for file names (8.3) to avoid problems with path names to grid data.
    FTP by GraphicThe 1:250,000-scale DEM data at the USGS site is arranged in a map series that was developed by the Army Map Service. Each map sheet spans two degrees of longitude and one degree of latitude. Each sheet is named for a major populated point or prominent topographic feature on the map. The data was developed using NAD27. Cell elevations are typically represented in meters. Downloading and modeling 1:250,000-scale DEM data creates rather large files. At least 100 MB of free space is required on the drive that will be used for modeling.
    Visit the Terrain Modeling with ArcView GIS page or use the keywords "USGS DLG" on any Internet search engine to locate the USGS EROS Web site. Once at the site, navigate to the 1:250,000-Scale Digital Elevation Model (DEM) section of the GeoData page. Choose the FTP by Graphics query method and locate the Concrete AMS sheet in northwestern Washington. The Concrete data is subdivided into two tiles. Each is a one-degree square. Download both tiles. The data is available in compressed and uncompressed forms. While the compressed data downloads faster, it requires a file compression utility such as WinZip to unzip the data. Compressed files are typically 1 MB or more in size. Uncompressed data sets are much larger, often more than 9.5 MB. Verify that there is enough room on your hard drive before downloading any data.
    Download the data for Concrete into the DEMFILES subdirectory. For uncompressed data, ignore the .GZ extension on both files and rename the east and west tiles CONCRETE.DEM and CONCRETW.DEM, respectively. This naming convention retains the first seven characters of the sheet name (CONCRET), appends a tile character (E or W), and adds the DEM extension. For compressed data, name the original files CONCRETE.GZ and CONCRETW.GZ, and use a GZ compression utility to extract the data and name the extracted files CONCRETE.DEM and CONCRETW.DEM. With Windows Explorer, check the size of the DEM files. Each file should be about 9.6 MB.

Getting the Scripts and Extension
    Before importing these DEMs into ArcView GIS, you will need to get two Avenue scripts and an ArcView GIS extension. The first script, Spatial.DEMShift (DEMSHIFT.AVE), imports USGS DEM data into decimal latitude-longitude (geographic) projection. MergeGrids (MERGGRID.AVE), the second script, merges two or more grids and smoothes them as specified by the user. The extension, Grid Projector (gridproj.avx), projects a grid of known projection into another projection. Unzip and place the scripts into the ARCVIEW\SAMPLES\SCRIPTS subdirectory and the extension in the \ARCVIEW\EXT32 subdirectory. Download several related data sets, an additional extension, and two scripts after reading the next section.

A Few Words About Grids
    ArcView Spatial Analyst and ArcView 3D Analyst can create and work with grid data sets. Each grid data set is stored in a directory called a workspace that contains the associated tables and files for that grid. Do not use operating system commands with grid data sets. Rename, copy, or delete grid data sets by using the Data Source Manager that comes with ArcView Spatial Analyst and ArcView 3D Analyst. Access the Data Source Manager from the File menu in an active view with ArcView Spatial Analyst or ArcView 3D Analyst loaded. The data used to create a grid theme can be on a local disk or accessed across a network. A grid theme merely points to the geographic data it represents--it does not contain the data itself.

Importing DEM Files as Geographically Referenced Grids
    When imported into ArcView GIS as raw data, grids are registered using decimal seconds (1/3600th of a degree) and must be reregistered and possibly reprojected for use.
  1. Start ArcView GIS and load the Grid Projector extension by choosing File>ExtensionsF. This will automatically load ArcView Spatial Analyst.
  2. Create a new view and name it 1. Raw Data by choosing View>Properties and changing the view name.
  3. Choose File>Set the Working Directory and type the path to \WA\CONCRETE\GRDFILES\RAW_DATA in the dialog.
  4. With the 1. Raw Data view active, use File>Import Data Source to import the east and west Concrete tiles one at a time. Specify USGS DEM as the import file type in the dropdown box. Navigate to \WA\CONCRETE\DEMFILES and select CONCRETE.DEM and CONCRETW.DEM.
  5. Because the working directory was reset in Step 2, the output grids will go to \WA\CONCRETE\GRDFILES\RAW_DATA by default. Name the output grids CONCRETE and CONCRETW.
Importing each grid can take several minutes. Add each grid to the 1. Raw Data view when prompted. Make both grids active and visible. Zoom out to the full extent of the active themes. Using the Identify tool, test the value of cells in each grid. The model coordinates are displayed in the upper-right corner of the view. The values shown (approximately -435,000 and 174,000) represent the number of decimal seconds (1/3600th of a degree) west of the prime meridian and north of the equator. These large numbers are very difficult to model. Close the 1. Raw Data view and remove it from the project as it is no longer needed. Name the project CONCRET1.APR and save the project file in \WA\CONCRETE.

Creating a Grid in Decimal Degrees
  1. Create a new view and name it 2. Latitude Longitude using View>Properties.
  2. While still in the View Properties dialog, set Map Units to decimal degrees and Distance Units to meters.
  3. Reset the working directory to \WA\CONCRETE\GRDFILES\LAT_LONG.
  4. Go to the main project window. Click on the Scripts icon and the New button to open a new Script window. Choose Scripts>Load Text and navigate to the ARCVIEW\SAMPLES\SCRIPTS subdirectory to load the DEMSHIFT.AVE script.
  5. Use Scripts>Properties to rename the new script A. Import DEM Lat-Long.
  6. Minimize but don't close the main project window. Compile and run the script.
  7. When prompted for DEM files to import, navigate to \WA\CONCRETE\DEMFILES, and select the CONCRETE.DEM and CONCRETW.DEM files.
  8. The default location for the output grids will be the \WA\CONCRETE\GRDFILES\LAT_LONG subdirectory if the working directory was reset per Step 3. Name the grids CONCRETE and CONCRETW.
It could take several minutes to import both grids. Add each grid to the 2. Latitude Longitude view when prompted. Close the A. Import DEM Lat Long script. Make both grids active and visible. Zoom to the full extent of the active themes. Again, using the Identify tool, test the value of several cells in each grid. The model coordinates displayed in the upper-right corner of the view are now in a geographic or decimal latitude-longitude system.
    With the Magnify tool, zoom into the north center of the model and measure the dimensions of one or more grid cells. uprojected gridsNotice that the longitude distance along a cell is slightly less than 61 meters and that the latitude dimension is approximately 92.6 meters. Now move to the bottom center of the model, zoom in, and measure a grid cell again. The southern longitude dimension is approximately 62.25 meters and the latitude dimension is still close to 92.6 meters. This DEM data is generated using a three arc-second grid. Each cell represents three arc-seconds, which is 1/20th of a minute or 1/1200th of a degree. Since longitude lines converge toward the poles, the longitude dimension of cells measured in arc-seconds decreases with travel toward the poles. The latitude dimension remains relatively constant. See the accompanying article "Measuring in Arc-Seconds" for more information about distances and coordinates measured in degrees. This is a good time to save the project.

Reprojecting Grids
    With both tiles from the Concrete AMS sheet imported into a geographic coordinate system, the Grid Projector extension can be used to reproject each tile. When the Grid Projector extension is loaded, it adds a new button with a blue square and a red parallelogram to the View GUI. The Grid Projector button will be used to reproject each tile from geographic coordinates to UTM NAD27 Zone 10.
  1. Open a new view and name it 3. UTM NAD27 Zone 10 by choosing View>Properties.
  2. While still in the View Properties dialog, set both the Map Units and Distance Units to meters.
  3. Change the working directory to \WA\CONCRETE\GRDFILES\UTM27Z10.
  4. Reopen the 2. Latitude-Longitude view. Select the CONCRETE grid and click on the Grid Projector button.
  5. Specify meters as the output units. Since the source grids are in a geographic projection, only the destination projection parameters need to be set.
  6. In the Projection Properties dialog box, accept the default choice of Standard and select UTM-1927 for the Category and Zone 10 for the Type.
  7. Click OK and specify the 3. UTM NAD27 Zone 10 view as the destination for the reprojected grids.
Be patient while ArcView GIS reprojects the first grid. Watch the lower-left corner for progress information. projected gridsWhen the first grid finishes, make the new grid visible and zoom to its extent. Choose Theme>Properties. This dialog box shows the status of the grid (temporary or permanent), the type (floating or integer), and information about the cell size. Note that the cell dimensions have been adjusted to approximately 92.66 meters in both directions and that there are many more rows than columns. The new grid is no longer square because the data, from an area located far from the equator, has been reprojected. Save this grid by choosing Theme>Save Data Set. Save this grid with the name CONCRETE in the \WA\CONCRETE\GRDFILES\UTM27Z10 subdirectory.
   By creating multiple directories and modifying the working directory, grids of varying projections can be comfortably managed. Use Theme>Properties to change the alias of the grid to Concrete East in the Table of Contents. Save the CONCRET1.APR project only after saving the grid permanently using Save Data Set.
    Return to the 2. Latitude-Longitude view and repeat the reprojection procedure for CONCRETW. Specify the same projection parameters and add the new grid to the 3. UTM NAD27 Zone 10 view. Display the new grid and make certain that it is displayed to the left of the Concrete East grid. Save the data set as CONCRETW using Theme>Save Data Set and change the Theme name to Concrete West using Theme>Properties.

Merging and Smoothing Grids
    For the final part of this exercise both UTM tiles will be merged into one large grid that will cover the total extent of the Concrete 1:250,000 AMS sheet. The MergeGrid script will be used to do this. This script was written by Philip Hooge of the USGS Glacier Bay Field Station, author the Spatial Tools extension, one of the most popular ArcView GIS extensions available from the Esri ArcScripts Web site.
  1. Go to the main project window. Click on the Scripts icon and the New button to open a new Script window. Choose Scripts>Load Text and navigate to the ARCVIEW\SAMPLES\SCRIPTS subdirectory to load the MERGGRID.AVE script. Rename the script B. Merge and Smooth Grids using Scripts>Properties.
  2. Minimize the main project window and compile the script.
  3. Save the project right now!
  4. The MERGGRID script requires that one grid is selected prior to running, so select the Concrete West grid theme from the 3. UTM NAD27 Zone 10 view. Go back to the Script view and run the Merge and Smooth Grids (MERGGRID.AVE) script.
  5. Click on Yes in the Interpolate Null Value Gaps dialog.
  6. The MERGE/MOSIAC TWO OR MORE GRIDS dialog lets you know that Concrete West, the first grid selected, will be the primary grid and the grids specified next will be added to it. Click Yes to proceed.
        In this example, Analysis Properties have not been altered so the default values can be used. Select the Concrete East grid from \WA\CONCRETE\GRDFILES\UTM27Z10 and click OK. Multiple grids may be selected by using Shift + Click. In the Mosaic Grids dialog, choose #GRID_STATYPE_MEAN as the process type for the grid. In the Neighborhood Analysis dialog, select 3 as the number of cells to use for smoothing. The number of cells chosen affects the accuracy output. Fewer cells preserves the original character of the data, while more cells smooths the terrain and helps manage irregular or missing cells. When smoothing is completed, close or minimize the Script window. Two new grids will be added to the top of the Table of Contents for the 3. UTM NAD27 Zone 10 view.
unsmoothed
   The Smoothing #1 grid is the smoothed grid. Merged Grids to concretew grid is the unsmoothed grid. Use Theme>Properties to examine both grids. Both are temporary grids with default names such as GRID1 and GRID2. The Merged Grids to concretw is an integer grid. Integer grids store cell values and have theme tables. The Smoothing #1 grid is a floating-point grid. Floating-point grids store numbers with decimal places, represent continuous data, and don't have theme tables. Saving the project now will create two permanent grids with the default names. Don't save the project yet. More descriptive names will be given to these files shortly.

Making a Thematic Legend
    Create a standard thematic legend for both grids. Select the Smoothing #1 grid and double-click on the legend to open the Legend Editor. Since both grids have similar elevation ranges (20-3,200 meters), one thematic legend can be used for both. Change the number of classes to seven and create seven 500-meter ranges that begin with 0 meters and end at 3,500 meters. Apply Elevation #1 or some other Color Ramp scheme to the legend. Set the No Data cells to transparent. While still in the Legend Editor, click Save and save the legend with the name TOPOGRD1.AVL. Double-click on the Merged Grids to concretew legend and choose Load in the Legend Editor. Navigate to the location of TOPOGRD1.AVL and click on Apply to add the classes and color ramp from the first grid to the second grid.
    To appreciate the effects of the legend, zoom into an area of complex topography in each grid. Even in two dimensions, there are noticeable differences between these two themes. Applying a hillshade to each grid will make these differences more apparent. Select the unsmoothed grid and create a hillshade by selecting Surface>Compute Hillshade from the menu and accept the default values for azimuth and altitude. Create a second hillshade for the smoothed grid, again using the default values. Zoom in and compare each shaded grid. Take a close look at the join line between the two original tiles. The boundary between the two tiles is more noticeable in the smoothed grid. Use Theme>Save Data Set to permanently save the merged-only grid as CONCMRG1 in \WA\CONCRETE\GRDFILES\UTM27Z10. Save the hillshade from the smoothed grid as CONCHLS1 using the same procedure. Delete any undesired grids from the view and save the project.
Summary
    These procedures can be used on other 1:250,000-scale DEM data sets downloaded from the USGS site. Additional vector data from the Esri sample data in ArcView GIS or from other sources can be used to enhance this model.


Contact Us | Privacy | Legal | Site Map