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
- 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.
- 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:
- Start the Surfer. (it's easy, isn't it?)
- 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.
- Making the grid
- Go to the "Grid" at Surfer's main toolbar
and choose "Data". It will open a dialog box.
- List your directory, and choose xyz.txt file and open
in Surfer.
- Now you are ready to interpolate the data.
- 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.
- 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.
- Now you can go for tea and relax.... (depending upon the
number of pixels, this might take a while).
- 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.
- Contour map
- 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.
- 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.
- Save your file in Surfer as "contour.srf", which
is surfer plot file.
- 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.
- Shaded relief map
- Here you will choose "Map" from the main
Surfer's menu and "Shaded relief map" Follow
the directions from contour map mentioned above.
- 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.
- 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.
- 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.
- Arrow map
- 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.
- Start with "Map" from main toolbar menu,
choose "Vector map" -> "1- Grid vector
Map".
- Choose your grid and open it.
- 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.
- 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.
- 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.
- 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.