Step 1: Export Attribute Data from AutoCAD Base Map

GY461 Computer Mapping & GIS Technology Contouring and 3D Perspective Exercise Introduction In this lab you will use topographic data from a survey of...
5 downloads 0 Views 687KB Size
GY461 Computer Mapping & GIS Technology Contouring and 3D Perspective Exercise Introduction In this lab you will use topographic data from a survey of the USA campus to develop: 1) A topographic contour map with a five foot contour interval. This contour map will be merged with the original AutoCAD base map, and then plotted. 2) A 3D perspective diagram with the color-coded contour map in (1) draped on top of a surface plot. This product will be plotted using Surfer. You will use the Golden Graphics Corp. Surfer® program to construct the diagrams.

Step 1: Export Attribute Data from AutoCAD Base Map Create the folder “C:\AcadmapData\XXX\Campus” to contain the files used in this exercise. Note that “XXX” should be your own initials. Copy to your own subdirectory the file “CampusBase.dwg” AutoCAD drawing file that may be downloaded from: http://www.usouthal.edu/geography/allison/gy461/gy461_project_resources.htm Look for the link to “CampusBase.dwg”, and then right-click on the link to save the file to your destination folder. Start AutoCadMap and load this file to verify that it was downloaded correctly. You should see a map of the USA campus. This file will contain blocks in the layer “Z_values” that have attached attributes with the topographic elevation. The relevant information is summarized below: Layer: Z_values Block name: Topoblk Attribute tag name: Elevation To process the elevation data you must first extract the elevation attribute values to a text file that Surfer can read. You will do this with Figure 1: Template file for “DDATTEXT”. the AutoCAD “ddattext” command. Before you actually execute the “ddattext” command, however, you need to first construct a template file for the attribute extraction. This file basically describes what will be extracted, and in what format the information will be written to the extract Page 1 of 8

GY461 Computer Mapping & GIS Technology Contouring and 3D Perspective Exercise file. Both the template file and the file produced by the “ddattext” command are text files that can be viewed and edited with “Notepad” or any other text editor. Start notepad at this time from the “Start > Run” menu on the desktop. Type in “Notepad” and then select the “OK” button. Figure 1 displays the “Notepad” editor window with the template file information entered. Save this file as “topoblk.txt” back to your project folder. After the template file is completed, if AutoCAD is not active, load the “CampusBase” map. You should now turn off all layers except for the “Z_Values” layer. Only the “topoblk” blocks will now be displayed. At the command prompt type:

Figure 2: Dialog activated by the “DDATTEXT” command.

command: ddattext You will then see displayed the dialog in Figure 2. Note that the extract file format is “CDF”, which means comma delimited. You should click on the “Select Objects” button to draw a selection window around all of the block objects (you should get 1077 objects slected). Also indicate the attribute template file. The name of the output file should default to “CampusBase.txt”. Make sure to click on the “Output File...” button and set the destination to your folder. Click the “OK” button to extract the attribute data.

Figure 3: First several lines of data in the extract file.

Now load the “CampusBase.txt” file into “Notepad” to have a look at the data. Figure 3 contains the first several lines of the file (there should be 1077 lines in the file).

Step 2: Grid and Contour Campus Elevation Data in Surfer The next step will move to the Surfer application to model the topographic data by formulating a mathematical grid. Any computer contouring algorithm must first have irregularly distributed Page 2 of 8

GY461 Computer Mapping & GIS Technology Contouring and 3D Perspective Exercise data interpolated into a rectangular grid of X, Y, and Z values. The surfer gridding module can easily read text files in comma delimited form. At this time start Surfer by finding its icon on the windows desktop, or by using the “Start” menu on the desktop. When the main Surfer screen is displayed, select the menu sequence “Grid > Data”. Indicate the “CampusBase.txt” file as the data file, and then fill in the dialog as in Figure 4. Leave the other tabs with default settings in this dialog. Note that the minimum and maximum X and Y extent of Figure 4: Dialog activated in Surfer by the “Data > the grid is greater than the data range because we want the contours to extend to Grid” menu sequence. the borders of the section lines. Also edit the number of grid lines to produce a 50 foot spacing in the X and Y direction. The Kriging method is widely used in the Earth Sciences because it interpolates data into smooth trends that are generally similar to the way a human would do it visually. Click the “OK” button to begin producing the grid file.

Step 3: Export Contours to AutoCAD Map You are now ready to produce a contour diagram from the grid file. This is done within Surfer by selecting the menu sequence “Map > Contour Map > New Contour Map”. You will then see a file open dialog in which the “CampusBase.grd” map will be the only option to load. After indicating this file, you will then see displayed the Figure 5 dialog. Check the “Fill Contours” and “Smooth Contours” options and then click “OK” to construct the diagram in the main Figure 5: Initial dialog for constructing a contour Surfer window. At this time experiment map in Surfer. with the “View” menu to learn how to zoom in and out of the diagram. The “Zoom > Rectangle” option is analogous to “Zoom Window” in AutoCAD. The “Fit to Window” option is similar in effect to “Zoom Extents” in AutoCAD. Page 3 of 8

GY461 Computer Mapping & GIS Technology Contouring and 3D Perspective Exercise The contour diagram will need some amount of customization. In particular we need to set the following: 1. Contour interval = 5 feet. 2. Contour labels every 5th contour at increments of 25 feet starting at sea level. Index contours should be 0.015 inches thick. 3. Color zones with lowest elevations a magenta color and higher elevations set to a cyan color (Figure 6).. 4. Turn on a color scale. 5. Format labels to nearest foot. 6. Titles 7. Turn on hachure marks for closed depressions (0.025 inches length). 8. Post original data points on map labeled by elevation. Make the symbol 0.015 inches, and the label font size 3 points. Use the default “cross” symbol for location marker. All of the above options are set by right-clicking on the Figure 6: Example of completed campus contour map. contour diagram and selecting “properties”. Alternatively, you can change properties by using the object viewer at left window. Select the “Levels” tab to find the options above. The multitude of dialogs are too numerous to include in this document, so its up to you to persistently discover the options where the above settings can be set. Take good notes when I demonstrate in class! After setting the appropriate options, your file should be saved to your folder as “Campus_2d.srf”. Leave this file on the workstation indicated by the instructor to be graded electronically. Use the Figure 6 example to compare with your map. Pay attention to details!

Step 4: Exporting to AutoCAD Page 4 of 8

GY461 Computer Mapping & GIS Technology Contouring and 3D Perspective Exercise In this step you will export the contours produced in step 3 back to the original AutoCAD file. To do this you must instruct Surfer to make a DXF file. AutoCAD “knows” how to read a DXF file to construct the contours in the original base map. To begin, start Surfer and load the “Campus_2d.srf” map if it is not already loaded. Immediately select the menu sequence “File > Save As” to save the file as “Export_2d.srf”. You now need to remove any text from the map except for the contour labels. Proceed to remove the following from the 2D contour map: 1. Delete the post map. Rightclick on it in the object window Figure 7: Export contour map. and then select “Delete”. 2. Delete the axis titles (Right-click on axis; Backspace over the XY axes titles). 3. Delete the tic marks and tic mark labels on all axes (Right-click on axis). 4. Delete the color elevation scale (Right-click on scale). 5. Make index contour lines same width as other contour lines. 6. Turn off color fills between contours Your export contour map should appear similar to the Figure 7 example. Select the contour map by right-clicking on it in the left object viewer window. The contour map should now “highlight”. Then select the “File > Export” menu sequence to activate the Figure 8 dialog box. Set the options as displayed in this figure. A second dialog equivalent to Figure 9 will then prompt for more information. Fill out this dialog as indicated in the figure. After clicking on the “OK” button you will then notice that Surfer is writing to a file. Be patient. When the file is complete minimize Surfer Figure 8: Dialog activated by the file export menu in Surfer. and load your base map into AutoCAD Map. At Page 5 of 8

GY461 Computer Mapping & GIS Technology Contouring and 3D Perspective Exercise the AutoCAD Map command prompt type the command: command: DXFIN You will then see the standard file selection dialog- indicate the “Contours.dxf” file at this time. The DXFIN command will load the contour map into a new AutoCAD window. Be sure to do a “zoom extents” so that you can actually see the contours. Check the contour map to make sure that the contours have coordinates matching the original base Figure 9: Export translation information dialog. map (Alabama SPCS- west zone). You should now import the contours into the campus base map. Switch to the base map while in AutoCAD, and then use “Insert > External reference” to overlay the contours onto the base map. The Xref should be inserted with a base point of (0,0,0), scale factor = 1.0, and no rotation (“E”). Note that the contours come in as true polylines, which means that you can easily edit them if you “explode” the Xref into the base map. Save the file with the external reference active to your folder. Check to make sure that the contours “line up” with the data points as they did in the Surfer project.

Step 5: Constructing the 3D Wireframe of the Campus Topography In this step you will create and print a 3D perspective (wireframe) diagram to display the campus topography. Start Surfer and load the “Campus_2D.srf” that you created previously. Choose “File” > “Save As” to save this file as “Campus_3D.srf”. Select the contour map by left-clicking on it, and then select the menu option “Map” > “Break Apart Overlay”. You can now right-click on the “Post” map in the object window and select “Delete” to delete the post map. Use the menu sequence “Map > Wireframe” to activate a file selection dialog. As before, indicate the “CampusBase.grd” file. You will then see the dialog in Figure 10, which sets the options for the wireframe diagram. Select “OK” to accept the defaults. You will now see a diagram that represents the campus topography in 3D perspective superimposed on the original Page 6 of 8

GY461 Computer Mapping & GIS Technology Contouring and 3D Perspective Exercise 2D contour map. Use the “Edit” > “Select All” menu option to select both maps, and then use “Map” > “Overlay Maps” to merge the diagrams together as a composite. The rest of this step consists of customizing the diagram in the following fashion: 1.With the “Map > 3D view” menu orient the diagram so that the NE corner of the map is in the foreground, and the diagram has a tilt of 45 degrees. 2. Label the X and Y axes as you did in the 2D map. Add arrows to indicate the direction of increasing easting and northing. Figure 10: Dialog generated by the wireframe menu selection in Surfer. 3. Move the color scale and color scale legend if necessary. Adjust the main title if needed. 4. Set the diagram to landscape mode on 8.5 x 11 inch paper. Note that the modifications listed above can be made by right-clicking on the diagram and then selecting the “properties” menu, or by right-clicking on the appropriate object in the object viewer menu. You should compare your diagram to the one displayed in Figure 11. As before pay careful attention to details so that your diagram is equivalent to the example. Congratulations, you are finished!

Page 7 of 8

GY461 Computer Mapping & GIS Technology Contouring and 3D Perspective Exercise Elevation (Feet) 210 205 200 195 190 185 180 175 170 165 160 155 150 145 140 135 130 125 120 115 110 105 100 95 90

USA Campus Topographic Map

Figure 11: 3D perspective diagram constructed in Surfer.

Page 8 of 8