Interpolation and Contour Mapping with Surfer

GEOG 3530: Cartography & GIS
Department of Geography/Geology, University of Nebraska at Omaha


  • Introduction
  • Import of ASCII data
  • Making  a grid
  • Contour map
  • Shaded relief map
  • Arrows map
     
    1. Introduction
      The objective of this lab is to understand some basics techniques of interpolation and visualization. The Surfer package will be used for interpolation, isarithmic (contour) mapping, and three-dimensional mapping. We will use simple [x, y, z] data to form digital elevation model - a grid of z-values. This grid can then be converted to a contour map or a three-dimensional map.
       
    2. Import of ASCII data
      The input to Surfer is an x, y, z file, where x is the coordinate in x direction, y is the coordinate at y direction and z is the elevation. First you have to create an x,y,z data file (xyz.dat), separating the numbers with commas or spaces.
          1.     Click on the x, y, z coordinates link
          2.     Select all (Ctrl+A), copy the selection
          3.     Open Notepad (Start > Programs > Accessories > Notepad)
          4.     Paste
          5.     Save the file as xyz.txt in MyDocuments
      To check out that the x,y,z values are read correctly:
      1. Start the Surfer. (it's easy, isn't it?)
      2. Check "Map" from the main Surfer's menu and "Post map" -> "New post Map". List your ASCII data and assign some nice properties in "new post map" dialogue to get the best result. Note that this map is done directly from your x,y,z file.
         
    3. Making the grid
      1. Go to the "Grid" at Surfer's main toolbar and choose "Data". It will open a dialog box.
      2. List your directory, and choose xyz.txt file and open in Surfer.
      3. Now you are ready to interpolate the data.
      4. Spend  a minute or two examining what kind of information about your ASCII file is written in the interpolation window. Interpolation is the most important part of the elevation modeling process. You can choose from different interpolation methods and you can also adjust some variables to influence the interpolation. Some interpolation methods are good for data which have a lot of data points and the region is sampled homogeneously. Some are useful for data that has just couple of data points and they don't behave as you would expect (for example the concentration of chemicals). It takes a lot of experience to determine what kind of interpolation method to use for particular problem. We will use a interpolation method called "Kriging" but you are encouraged to use some others to see how the results differ.
      5. Use an appropriate number of pixels in both directions in the interpolation dialog box called Spacing. And, assign the name of the grid you are going to compute. You will use this grid three times to produce three different maps. Use the name"sites.grd". Hit OK.
      6. Now you can go for tea and relax.... (depending upon the number of pixels, this might take a while).
      7. Once you have a grid, you don't need to interpolate the xyz data again when you want to produce aspect map, contour map or this shaded relief map.) Examine the grid values to see how they change.
         
    4. Contour map
      1. The contour map can be done in Surfer very easily. Choose "Map" -> "Contour map" -> "New contour map". List your grid and hit OK. A contour map dialog will appear. It offers a lot of options to play with, and they are easy to understand. So choose the color of the contours, interval, smoothing if neccessary and check how do they look on the screen, by hitting on the "Apply button." Label every fifth contour with an appropriately-sized label.
      2. Use Surfer's capabilities in scale processing, arrows, title,  and make a presentable map. All the tool can be accessed from main toolbar, or from "Draw" menu.
      3. Save your file in Surfer as "contour.srf", which is surfer plot file.
      4. Export your map as contour.jpg  by choosing that from "File" -> "Export", list your folder, assign the name and choose the proper extension. You need to do that because you will store the maps on your web page.
    5. Shaded relief map
      1. Here you will choose "Map" from the main Surfer's menu and "Shaded relief map" Follow the directions from contour map mentioned above.
      2. You can play with the shaded relief map properties to get the best result. Just by changing the angle of sun rays, Z - scale factor, or shading method.
      3. Once you have a nice shaded relief picture, make it a map by adding scale, title ...... you already know what the map has to have, to be a map.
      4. Save the map as shaded.srf (surfer plot file) and  export the map to appropriate raster file suitable for your browser. Give the map the name shaded.jpg.
    6. Arrow map
      1. A new feature in this version of Surfer is producing the so called "arrow map". The arrow map is designed with small arrows that points in the direction of decreasing slope. If you have grid which represents terrain the arrows will point to the "downhill direction". It's probably not the best solution to use the arrows in terrain modeling mostly because the surface of the terrain when, scaling appropriately, is readable and we can easily find the downhill or uphill direction), but you can use the methods at you final project with some other point data.
      2. Start with "Map" from main toolbar menu, choose "Vector map" -> "1- Grid vector Map".
      3. Choose your grid and open it.
      4. Check the vector map properties panel and choose some nice arrows to use for map. Remember, you can use "Apply" instead of "OK" button, and you can see the results directly on the screen. How readable the map is depends on you.
      5. You can have shaded relief map in the back of your map and a layer with arrows in the front. (It wouldn't give a big meaning to use just arrows without the background map. Arrows can help to read the plasticity of the shaded relief map).
        Don't forget to save your map as arrow.srf and export it to as arrow.jpg.
    7. Using your new found experience with the program, you should be able to create a wireframe and surface map. Be sure to choose the best angle of view.
    8. Output of this lab are four maps (File > Export), represented by contour.jpg, shaded.jpg, arrow.jpg, wire.jpg, and surface.jpg files. Store them at your home directory in the Webfolder .


    Lab updated by Eva Grund, April 2005.