17
GY461/GEO461 Computer Mapping & GIS Technology Merging of DEM and Geology Raster Images Page 1 of 17 Introduction In this exercise you will merge the geology color fills created for the quadrangle geologic map, with a “hill-shade” image produced from a digital elevation model (DEM) of the quadrangle. This merged image displays the relationship between geology and topography. Some quadrangles will display this relationship more strongly than others, nevertheless, there is usually some correlation between the topography and geology. For example, a sandstone composed of predominantly quartz will be a ridge-former simply because it weathers more slowly than surrounding rocks. STEP 1: Creating the DEM Hillshade raster image A raster image is simply a bit map. The DEM data that will be downloaded is simply a matrix of (X,Y,Z) values representing a grid of elevation measurements. This grid can be mathematically “shaded” as if the sun were shining upon it to produce a “hillshade” raster image. You will first download the DEM file from the following web site: www.gisdatadepot.com From this web site follow the links for downloading DEM 1:24,000 data files. You will need to determine which county your quadrangle falls in to find the DEM file. When the file is downloaded create a folder for your quadrangle- in this example I will use the Millerville, Alabama, quadrangle. Copy the DEM compressed ZIP file to this folder: c:\USGS_DEM\Millerville\ And then extract the files with the WINZIP utility program. You will see a number of DDF files now in the folder. Now you will use the application Surfer to create a hillshade raster image of the DEM. Start Surfer by double-clicking on its icon on the desktop (it should be installed already on your workstation). Select the menu sequence “Map > Shaded relief map” and indicate the path to the DEM files you just downloaded. Figure 1 displays the file open dialog using Millerville data as an example. The dialog in Figure 2 follows immediately after the file open dialog- simply accept the defaults by clicking the “OK” button. You should now see displayed a hillshade map of your quadrangle area based on the DEM. Figure 3 displays the hillshade map for the Millerville quadrangle. The next step will be to export the hillshade created in Surfer to a raster TIFF file. Use the menu sequence in Surfer “File > Export” to bring up the dialog in Figure 4. Note that the image should

GY461/GEO461 Computer Mapping & GIS Technology Merging of DEM and

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: GY461/GEO461 Computer Mapping & GIS Technology Merging of DEM and

GY461/GEO461 Computer Mapping & GIS TechnologyMerging of DEM and Geology Raster Images

Page 1 of 17

Introduction

In this exercise you will merge the geology color fills created for the quadrangle geologic map,with a “hill-shade” image produced from a digital elevation model (DEM) of the quadrangle. Thismerged image displays the relationship between geology and topography. Some quadrangles willdisplay this relationship more strongly than others, nevertheless, there is usually some correlationbetween the topography and geology. For example, a sandstone composed of predominantlyquartz will be a ridge-former simply because it weathers more slowly than surrounding rocks.

STEP 1: Creating the DEM Hillshade raster image

A raster image is simply a bit map. The DEM data that will be downloaded is simply a matrix of(X,Y,Z) values representing a grid of elevation measurements. This grid can be mathematically“shaded” as if the sun were shining upon it to produce a “hillshade” raster image. You will firstdownload the DEM file from the following web site:

www.gisdatadepot.com

From this web site follow the links for downloading DEM 1:24,000 data files. You will need todetermine which county your quadrangle falls in to find the DEM file. When the file isdownloaded create a folder for your quadrangle- in this example I will use the Millerville,Alabama, quadrangle. Copy the DEM compressed ZIP file to this folder:

c:\USGS_DEM\Millerville\

And then extract the files with the WINZIP utility program. You will see a number of DDF filesnow in the folder. Now you will use the application Surfer to create a hillshade raster image of theDEM. Start Surfer by double-clicking on its icon on the desktop (it should be installed already onyour workstation). Select the menu sequence “Map > Shaded relief map” and indicate the path tothe DEM files you just downloaded. Figure 1 displays the file open dialog using Millerville dataas an example. The dialog in Figure 2 follows immediately after the file open dialog- simplyaccept the defaults by clicking the “OK” button. You should now see displayed a hillshade map ofyour quadrangle area based on the DEM. Figure 3 displays the hillshade map for the Millervillequadrangle.

The next step will be to export the hillshade created in Surfer to a raster TIFF file. Use the menusequence in Surfer “File > Export” to bring up the dialog in Figure 4. Note that the image should

Page 2: GY461/GEO461 Computer Mapping & GIS Technology Merging of DEM and

GY461/GEO461 Computer Mapping & GIS TechnologyMerging of DEM and Geology Raster Images

Page 2 of 17

be sent to your AutoCAD Map folder, in this example “E:\Acadmapdata\XXX” is used. The nameof the file should begin with the quadrangle abbreviation, in this example MI_DEM.TIF will beused. The Figure 5 dialog follows the file open dialog. Accept the default values by clicking the“OK” button. You should now have raster image of the DEM hillshade in TIF file format.

STEP 2: Exporting the Geology Color Fills from AutoCAD Map to a RasterImage

The next step consists of exporting the geologic color fills to a raster image file (TIF file). At thistime load your AutoCAD Map quadrangle geologic map and turn off all layers except for the“LithologicPolygons” layer. Figure 6 uses the Millerville quadrangle as an example. Select themenu sequence “File > Export” form the main menu. You should export this file in the rasterBMP format to your AutoCAD directory. Figure 7 displays the export file dialog set upappropriately. Note that the BMP raster file type is selected, and that the file path is pointing backto the “XXX” example AcadmapData directory. At this point AutoCAD will prompt you to selectthe features to export with a standard selection tool. I recommend selecting all of the color fillswith a “crossing” window (cr). At this point you should now have two raster images in your home“AcadmapData” folder. One is a hillshade map based on DEM, the other consists of the colorgeology fills. Both are bitmaps- i.e. raster files.

STEP 3: Re-sizing the raster files

The Hillshade and Geology raster image files must first be sized so that they dimensionally matcheach other. This requires the use of a raster image editor application. We will use Paint Shop Pro7 (PSP), but other applications could also be used. Start PSP from the desktop and then used themenu sequence “File > Browse” to point to your AutoCAD home folder. After a few momentsyou should see “thumbnail” images of the two recently created raster image files. Load eachimage into PSP by double-clicking on each thumbnail image. After viewing each image you willnote that there are “margins” of unwanted information around each image file. In fact we willneed to trim this unwanted information from both files. For both files use the selection rectangle(dashed rectangle tool) to carefully draw a cropping rectangle around one of the images. Notethat the image is tilted anticlockwise in this case so it is best to anchor from the NW to SE corner.Use the zoom tool “zoom in” and precisely record the (x,y) coordinates of the corner points ofthe image. For example, for the geology color fills the corner coordinates are”

X YNW: 252 15SW : 257 788NE: 899 8

Page 3: GY461/GEO461 Computer Mapping & GIS Technology Merging of DEM and

GY461/GEO461 Computer Mapping & GIS TechnologyMerging of DEM and Geology Raster Images

Page 3 of 17

SE: 908 780

Therefore, the NW corner of the cropping rectangle would be (252, 8), and the SE croppingcorner would be (908,788). Use the selection rectangle to set these diagonal corners of acropping rectangle, and then select “Image > Crop to selection” to trim the image. Save the imageat this time after inspecting it to make sure the cropping operated correctly. Do the same for thehillshade image and also save it at this time.

Comparison of the dimensions of the two files in PSP will reveal that the raster files are notequivalent in size. For example, when the geology raster file is loaded into PSP, the applicationreports the image size as 660x782 (see lower right status line). The hillshade raster is 1509x1793.With the geology raster active, select the “Image > resize” menu option. Figure 8 displays thecorresponding dialog for this example. Note that the “maintain aspect ratio” is checked (on).Selecting the “OK” button will proceed to resize the entire image. Note that the y dimension ofthe geology raster is slightly different than that of the hillshade, but not greatly so. Save theresults. Now the two raster files are essentially the same dimensions (or nearly so).

STEP 4: Performing the Merge Operation

Now the two raster images will be “merged” by performing bit-wise arithmetic on the two rasterfiles. In this case PSP is used, but other raster editor programs could be used to do the sameprocedure. Make sure both raster images are loaded, and then select “Image > Arithmetic”.Figure 9 displays the corresponding dialog. Note that the “averaging” option is selected. Afterclicking “OK” a third image is generated that is the “averaged” result of the original two. Note thecorrespondence of geology with ridges. Note how the fault truncates the quartzite ridges. Figure10 displays the merged results of the Millerville quadrangle.

STEP 5: Importing Merged Image back into AutoCAD Map File

The newly created merged geology and hillshade image is most useful if it can be imported backinto the original AutoCAD Map drawing file. When imported the raster file can then serve as a“background” raster layer on top of which other line work is plotted. Load your originalquadrangle map into autoCAD Map and create a new layer named “DEM_Geology_Composite”.Make this the current layer. Make sure that the current units are inches. From the menu select“Insert > Raster”, which will activate the dialog in Figure 11. Locate the path of the newlycreated merged raster image using this file open dialog. After selecting the “OK” button, anotherdialog is displayed as in Figure 12. Set the options as in this example and then click the “OK”button. You will next need to set an insertion point with the mouse, at which time the image willappear in the AutoCAD edit window. The location of where you click does not matter because

Page 4: GY461/GEO461 Computer Mapping & GIS Technology Merging of DEM and

GY461/GEO461 Computer Mapping & GIS TechnologyMerging of DEM and Geology Raster Images

Page 4 of 17

the image will need to be moved and scaled regardless.

Zoom window around the SW corner of the newly inserted composite image. Draw a point withthe “point” command on top of this corner. Zoom in to make the point as accurate as possible. Dothe same fro the NE corner of the inserted image. Now zoom extent so you can see all of the file.Start the move command and select the image and the SW and NE points. When the movecommand requests a base point, use a “node” snap to specify the exact center of the SW corner ofthe image. For the destination use a “end” snap to specify the exact SW corner of your originalAutoCAD quadrangle. You should now see that the SW corner of the image file and the border ofthe quadrangle coincide. Use the menu sequence “Tools > Display Order > Move to back” tomove the image behind the line work.

The final procedure is scaling the image to match the original (correct) dimensions. To do this wewill use LISP statements to store measurements and make calculations (although you could do thesame thing by hand). The statement:

(Setq d1 (getdist))

will store in the variable “d1" the distance between the two point indicated after this statement isentered, so enter the above statement and use a “node” snap mode to select the SW and NEcorners of the image. Use a similar statement to set the contents of “d2" to the distance betweenthe SW and NE corners of the original map (use “end” snap). The statement:

(Setq sf (/ d2 d1))

calculates the ratio of the diagonal of the original map to that of the image map. This is in fact therequired scale factor needed to scale the image to the same size of the original map. Now start the“scale” command. Select the SW and NE points of the image and the image itself as the objects toscale. For the base point indicate the SW corner of the image file using a “node” snap mode.When prompted for the scale factor use “!sf” to recall the calculated scale factor. Zoom to the NEcorner of the quadrangle to verify that the scaling worked properly. Remember that you will nothave a perfect match, but the image file should agree to within approximately 100 meters. Figure13 displays the final results.

Page 5: GY461/GEO461 Computer Mapping & GIS Technology Merging of DEM and

GY461/GEO461 Computer Mapping & GIS TechnologyMerging of DEM and Geology Raster Images

Page 5 of 17

Figure 1: File open dialog for loading DEM data into Surfer.

Page 6: GY461/GEO461 Computer Mapping & GIS Technology Merging of DEM and

GY461/GEO461 Computer Mapping & GIS TechnologyMerging of DEM and Geology Raster Images

Page 6 of 17

Figure 2: Dialog for creating a hillshade raster image from DEM datawithin Surfer.

Page 7: GY461/GEO461 Computer Mapping & GIS Technology Merging of DEM and

GY461/GEO461 Computer Mapping & GIS TechnologyMerging of DEM and Geology Raster Images

Page 7 of 17

Figure 3: Hillshade image of DEM data created within Surfer.

Page 8: GY461/GEO461 Computer Mapping & GIS Technology Merging of DEM and

GY461/GEO461 Computer Mapping & GIS TechnologyMerging of DEM and Geology Raster Images

Page 8 of 17

Figure 4: Exporting hillshade from Surfer to a TIFF raster image file.

Page 9: GY461/GEO461 Computer Mapping & GIS Technology Merging of DEM and

GY461/GEO461 Computer Mapping & GIS TechnologyMerging of DEM and Geology Raster Images

Page 9 of 17

Figure 5: Default values for creating TIFF file of DEM datawithin Surfer.

Page 10: GY461/GEO461 Computer Mapping & GIS Technology Merging of DEM and

GY461/GEO461 Computer Mapping & GIS TechnologyMerging of DEM and Geology Raster Images

Page 10 of 17

Figure 6: AutoCAD geologic map with only color fills layer turned on.

Page 11: GY461/GEO461 Computer Mapping & GIS Technology Merging of DEM and

GY461/GEO461 Computer Mapping & GIS TechnologyMerging of DEM and Geology Raster Images

Page 11 of 17

Figure 7: File export dialog within AutoCAD Map.

Page 12: GY461/GEO461 Computer Mapping & GIS Technology Merging of DEM and

GY461/GEO461 Computer Mapping & GIS TechnologyMerging of DEM and Geology Raster Images

Page 12 of 17

Figure 8: Resize image dialog within Paint Shop Pro 7.

Page 13: GY461/GEO461 Computer Mapping & GIS Technology Merging of DEM and

GY461/GEO461 Computer Mapping & GIS TechnologyMerging of DEM and Geology Raster Images

Page 13 of 17

Figure 9: Image arithmetic dialog within Paint Shop Pro 7.

Page 14: GY461/GEO461 Computer Mapping & GIS Technology Merging of DEM and

GY461/GEO461 Computer Mapping & GIS TechnologyMerging of DEM and Geology Raster Images

Page 14 of 17

Figure 10: Merged hillshade and geology raster image.

Page 15: GY461/GEO461 Computer Mapping & GIS Technology Merging of DEM and

GY461/GEO461 Computer Mapping & GIS TechnologyMerging of DEM and Geology Raster Images

Page 15 of 17

Figure 11: Dialog activated by the AutoCAD map “insert > raster” menu sequence.

Page 16: GY461/GEO461 Computer Mapping & GIS Technology Merging of DEM and

GY461/GEO461 Computer Mapping & GIS TechnologyMerging of DEM and Geology Raster Images

Page 16 of 17

Figure 12: Dialog for inserting a raster image in AutoCAD Map.

Page 17: GY461/GEO461 Computer Mapping & GIS Technology Merging of DEM and

GY461/GEO461 Computer Mapping & GIS TechnologyMerging of DEM and Geology Raster Images

Page 17 of 17

Figure 13: Final results of merged image imported back into AutoCAD Map.