Surfer 10 Manual
Surfer 10 Manual
Mapping for
Scientists & Engineers
User’s Guide
Surfer® Registration Information
For future reference, write your serial number on the line below.
_________________________________
®
Surfer User’s Guide
Contouring and 3D Surface Mapping
for Scientists and Engineers
The Surfer® User’s Guide is furnished under a single user license agreement. Only a
single user may use a single user’s guide. With the purchase of the Surfer User’s
Guide, the user is entitled to download the user’s guide content to one (1) electronic
medium and print one (1) hardcopy. No part of this document or the related files may
be reproduced or transmitted in any form, by any means (electronic, photocopying,
recording, or otherwise) thereafter. Contents are subject to change without notice.
Surfer is a registered trademark of Golden Software, Inc. All other trademarks are the
property of their respective owners.
January 2010
Contents
i
Surfer
Chapter 2 - Tutorial
Introduction to the Tutorial ............................................................................ 25
Basic Tutorial Lessons ................................................................................ 25
Advanced Tutorial Lessons .......................................................................... 26
Surfer Flow Chart .......................................................................................... 27
Using Surfer ................................................................................................. 28
Lesson 1 – Viewing and Creating Data ............................................................. 29
Opening an Existing Data File ...................................................................... 29
Creating a New Data File ............................................................................ 30
Saving the Data File ................................................................................... 31
ii
Table of Contents
iii
Surfer
iv
Table of Contents
v
Surfer
vi
Table of Contents
Chapter 5 - Variograms
Introduction to Variograms ........................................................................... 205
The Variogram............................................................................................. 206
Kriging and Variograms ............................................................................. 206
Variogram Grid ......................................................................................... 207
Variogram Model ...................................................................................... 210
Creating a Variogram ................................................................................... 211
New Variogram Dialog .................................................................................. 212
Data Page ................................................................................................ 212
General Page............................................................................................ 213
Variogram Properties .................................................................................... 215
The Experimental Page .............................................................................. 216
The Model Page ........................................................................................ 221
The AutoFit Page ...................................................................................... 225
Variogram Model Graphics ............................................................................ 228
Variogram Model Components .................................................................... 229
The Statistics Page.................................................................................... 232
The Plot Page ........................................................................................... 233
Default Linear Variogram .............................................................................. 235
Exporting a Variogram .................................................................................. 236
Using Variogram Results in Kriging ................................................................. 236
vii
Surfer
viii
Table of Contents
ix
Surfer
x
Table of Contents
xi
Surfer
Chapter 12 - 3D Wireframes
Introduction to 3D Wireframes....................................................................... 359
Creating a 3D Wireframe .............................................................................. 360
Adding a Map Layer...................................................................................... 360
Editing an Existing 3D Wireframe ................................................................... 360
3D Wireframe Properties ............................................................................... 361
General Page............................................................................................ 361
Z Levels Page ........................................................................................... 364
Editing Z Levels Zones............................................................................... 365
Color Zones Page ...................................................................................... 366
Color Filled Wireframe .................................................................................. 368
Specifying the Lines to Draw on a Wireframe................................................... 369
Line Property Precedence .............................................................................. 369
Line Properties ......................................................................................... 370
Wireframe Base ........................................................................................... 370
Smoothing a Wireframe ................................................................................ 371
Wireframe Blanking ...................................................................................... 371
Chapter 13 - 3D Surfaces
Introduction to 3D Surfaces .......................................................................... 373
Creating a 3D Surface .................................................................................. 373
Adding a Map Layer...................................................................................... 373
Editing an Existing 3D Surface ....................................................................... 374
3D Surface Properties ................................................................................... 375
General Page............................................................................................ 375
Mesh Page ............................................................................................... 378
Lighting Page ........................................................................................... 380
xii
Table of Contents
xiii
Surfer
xiv
Table of Contents
Chapter 16 - Axes
Introduction to Axes ..................................................................................... 469
Editing Axes ................................................................................................ 470
Axis Visibility ............................................................................................... 470
Axis Position ................................................................................................ 470
Ticks .......................................................................................................... 470
Selecting an Axis ......................................................................................... 471
Other Axis Features...................................................................................... 471
Adding Additional Axes to Map ....................................................................... 471
Axis Properties ............................................................................................ 472
General Page............................................................................................ 472
Ticks Page ............................................................................................... 475
xv
Surfer
xvi
Table of Contents
xvii
Surfer
xviii
Table of Contents
xix
Surfer
xx
Table of Contents
xxi
Surfer
xxii
Table of Contents
xxiii
Surfer
xxiv
Table of Contents
xxv
Surfer
xxvi
Table of Contents
Index
Index ......................................................................................................... 790
xxvii
Surfer
xxviii
Chapter 1
Introducing Surfer
Introduction to Surfer®
Surfer is a powerful contouring, gridding, and surface mapping package for scientists,
engineers, educators, or anyone who needs to generate maps quickly and easily.
Producing publication quality maps has never been quicker or easier. Maps can be
displayed and enhanced in Surfer. Adding multiple map layers, customizing the map
display, and annotating with text create publication quality maps. Virtually all aspects
of your maps can be customized to produce exactly the presentation you want.
Surfer is a grid-based mapping program that interpolates irregularly spaced XYZ data
into a regularly spaced grid. Grids may also be imported from other sources, such as
the United States Geological Survey (USGS). The grid is used to produce different
types of maps including contour, vector, image, shaded relief, 3D surface, and 3D
wireframe maps. Many gridding and mapping options are available allowing you to
produce the map that best represents your data.
The grid files themselves can be edited, combined, filtered, sliced, queried, and
mathematically transformed. For example, you can create an isopach map from two
grid files. You will need the original surface grid file and the surface grid file after a
volume of material was removed. Subtract the two surfaces to create an isopach map.
The resulting map displays how much material has been removed in all areas.
The ScripterTM program, included with Surfer, is useful in creating, editing, and
running script files that automate Surfer procedures. By writing and running script
files, simple mundane tasks or complex system integration tasks can be performed
precisely and repetitively without direct interaction. Surfer also supports ActiveX
Automation using any compatible client, such as Visual BASIC. These two automation
capabilities allow Surfer to be used as data visualization and map generation post-
processor for any scientific modeling system.
1
Surfer
New Features
This is an overview of some of Surfer 10's new features. The new features are also
summarized:
Online at: www.GoldenSoftware.com/products/surfer/surfernew.shtml
In the program: click Help | Contents and click on the New Features page in the
Introduction book
User Friendly
• Install 32-bit or 64-bit version of Surfer 10.
• Access and change properties for all objects in the always available Property
Manager.
• Updated to modern Windows look.
• Use the mouse scroll wheel in the Object Manager.
• View | Reset Windows returns the managers to the default location and size.
• Tools | Options can be accessed from any open window.
• Blanked nodes displayed in Grid Node Editor window as different color and shape.
Map Features
• Import maps in projected coordinates.
• Change the projection of maps.
• Overlay maps from different coordinate systems with all maps appearing at the
correct location.
• Save time! Grid | Math and Grid | Function save the equation used between
Surfer sessions. Up to 10 functions are saved in the drop down box.
• Reverse any color map.
• Due to popular demand, Map | Overlay Maps command is again available.
2
Chapter 1 - Introducing Surfer
• Option to automatically delete empty map layers when dragging and dropping
maps.
• Save a data file from any post or classed post map.
• Extract a grid file from any grid based contour, image, shaded relief, vector,
wireframe, or surface map.
• Increase post map label distance to 4 inches in either direction.
• Specify starting and ending rows for post map data files.
• Status bar option shows XYZ value for selected map layer.
• Export contour lines to XYZ data file using Map | Export Contours.
• Export to Google KML and KMZ file formats.
• Set contour map levels using either the Simple or Advanced contour level method.
Data Features
• Surfer now supports Access ACCDB file format.
• Import queries from Access MDB and ACCDB files.
• Assign a coordinate system to a data file. Save the coordinate system information
to an external file.
Grid Features
• Combine as many grid files as desired in the Grid | Math process.
• Define how to treat blank nodes using Grid | Math command. Either blank the
output or remap to a value. You determine what value to use for each grid
individually.
• New Grid | Grid Info command determines information about a grid without first
creating a map.
• More convenient! Grid line geometry settings are remembered when changing
gridding method or properties in the Grid Data dialog.
• When using a Data Exclusion Filter for Grid | Data, Grid | Variogram, or in a
worksheet using Data | Spatial Filter, data can be excluded based on numeric
information in any column.
3
Surfer
• New sum overlap method for Grid | Mosaic allows overlapping grids to be added
together.
• Assign a coordinate system to a grid file. Save the coordinate system to an
external file.
Automation
• Load .CLR file for a contour map from a script.
• Reverse any color map from a script.
• Change the grid file for a surface map and wireframe map from a script.
• Show or hide the position/size toolbar from a script.
System Requirements
The minimum system requirements for Surfer are:
• Windows XP SP2 or higher, Vista, 7 or higher
• 512MB RAM minimum for simple data sets, 1GB RAM recommended
• At least 100MB free hard disk space
• 1024 x 768 or higher monitor resolution with a minimum 16-bit color depth
Installation Directions
Installing Surfer 10 requires logging onto the computer with an account that has
Administrator rights. Golden Software does not recommend installing Surfer 10 over
any previous versions of Surfer. Surfer 10 can co-exist with older versions (i.e.
Surfer 9) as long as they are installed in different directories, which is the default. For
detailed installation directions, see the Readme.rtf file.
Installing Surfer
To install Surfer from a CD:
1. Insert the Surfer CD into the CD-ROM drive. The install program automatically
begins on most computers. If the installation does not begin automatically,
double-click on the Autorun.exe file located on the Surfer CD.
2. Choose Install Surfer (32-bit) or Install Surfer (64-bit) to begin the
installation.
4
Chapter 1 - Introducing Surfer
Updating Surfer
To update Surfer, open the program and click the Help | Check for Update
command. This will launch the Internet Update program which will check Golden
Software’s servers for any updates. If there is an update for your version of Surfer
(i.e. Surfer 10.0 to Surfer 10.1), you will be prompted to download the update.
Before using this command, make sure your computer is connected to the internet.
Follow the directions in the dialog to complete the update if an update is available.
Advanced Settings
Internet Update connects to the Golden Software server to obtain the information
necessary to update your existing product files to the latest versions available. Some
users on corporate networks may need to specify certain Advanced Settings, but most
users will not. We recommend you first try using the default settings and only if you
encounter connection problems with the Golden Software server should you modify
any of the settings.
5
Surfer
When connection is restricted on computers that are not part of your organization's
private network (such as the Golden Software server), you may need to set the
advanced settings to update Surfer. One way to do this is to implement a "proxy
server" on your private network that must authenticate you (using an ID and a
password) before allowing access to the outside computer. Your network administrator
will know if this is the case and, if so, the address and port number of your proxy
server. Tell your network administrator you need access to the HTTP server located at
www.GoldenSoftware.com.
Automatic Update
When Surfer is initially launched, the Surfer dialog appears, allowing you to specify
your automatic update preference. This preference can be adjusted at any time using
the Tools | Options command. Automatic updates allow the program to periodically
check for an available update. Enabling automatic updates will allow your copy of
Surfer to always automatically stay up-to-date.
Uninstalling Surfer
Windows XP: To uninstall Surfer, go to the Control Panel and double-click
Add/Remove Programs. Select Surfer 10 (32-bit) or Surfer 10 (64-bit) from the
list of installed applications. Click the Remove button to uninstall Surfer 10.
6
Chapter 1 - Introducing Surfer
Vista and 7: To uninstall Surfer when using Regular Control Panel Home, click
Uninstall a program. Select Surfer 10 (32-bit) or Surfer 10 (64-bit) from the list of
installed applications. Click the Uninstall button to uninstall Surfer 10.
Vista: To uninstall Surfer when using Classic View Control Panel, double-click
Programs and Features. Select Surfer 10 (32-bit) or Surfer 10 (64-bit) from the
list of installed applications. Click the Uninstall button to uninstall Surfer 10.
Upgrading Surfer
For your convenience, you can purchase an upgrade (i.e. Surfer version 9 to Surfer
version 10), at Golden Software’s website, www.GoldenSoftware.com. For additional
information, contact Golden Software at [email protected].
Various font styles are used throughout the Surfer documentation. Bold text indicates
menu commands, dialog names, window names, and page names. Italic text indicates
items within a dialog such as group box names, options, and field names. For
example, the Save As dialog contains a Save as type drop-down list. Bold and italic
text occasionally may be used for emphasis.
In addition, menu commands appear as File | Open. This means, “click the File menu
at the top of the Surfer window and click the Open command on the File menu list.”
The first word is the menu name, followed by the command within the menu list.
7
Surfer
This is the Surfer plot window with the Object Manager and Property Manager displayed on
the left, the worksheet and grid node editor tabs on the top of the horizontal ruler.
8
Chapter 1 - Introducing Surfer
The following table summarizes the function of each component of the Surfer layout.
Title Bar The title bar lists the program name plus the saved Surfer .SRF
file name, if any. An asterisk (*) after the file name indicates the
file has been modified since it was last saved.
Menu Bar The menu bar contains the commands used to run Surfer.
Toolbars The toolbars contain Surfer tool buttons, which are shortcuts to
menu commands. Move the cursor over each button to display a
tool tip describing the command. Toolbars can be customized with
the Tools | Customize command. Toolbars can be docked or
floating.
Tabbed Multiple plot windows, worksheet windows, and grid windows can
Windows be displayed as tabs. Click on the tab to display that window.
Object Manager The Object Manager contains a hierarchical list of the objects in
a Surfer plot window. These objects can be selected, added,
arranged, edited, and renamed in the Object Manager. The
Object Manager is initially docked on the left side above the
Property Manager. Changes made in the Object Manager are
immediately reflected in the plot window. The Object Manager
can be dragged and placed at any location on the screen.
Property The Property Manager allows you to edit any of the properties
Manager of a selected object. Multiple objects can be edited at the same
time by selecting all of the objects and changing the shared
properties. Changes made in the Property Manager are
immediately reflected in the plot window.
Status Bar The status bar displays information about the activity in Surfer.
The status bar is divided into five sections. The sections display
basic plot commands and descriptions, the name of the selected
object, the cursor map coordinates, the cursor page coordinates,
and the dimensions of the selected object.
9
Surfer
Opening Windows
Click the File | Open command to open any of the three window types, depending on
the type of file selected. The File | New | Plot command creates a new plot window.
The File | New | Worksheet command creates a new worksheet window.
Plot Document
Plot windows contain the commands for creating and modifying grid files, and for
creating all types of maps. When you first start Surfer you are presented with an
empty plot window.
This is the Surfer plot window with the Object Manager and Property Manager on the
left, the plot, worksheet, and grid node editor tabs at the top of the horizontal ruler.
10
Chapter 1 - Introducing Surfer
Worksheet Document
Worksheet windows are a view of the data file and are designed to display, edit, enter,
and save data. The worksheet windows have several useful and powerful editing,
transformation, and statistical operations available. Several import and export options
are available for opening data files from other spreadsheet programs.
This is the Surfer worksheet document with the Object Manager and
Property Manager in auto hide mode onthe left, and the plot document
and grid node editor tabs at the top of the worksheet.
11
Surfer
This is the Surfer grid node editor with the Object Manager and Property
Manager in auto hide mode on the left and the plot document and
worksheet document tabs at the top of the grid node editor.
12
Chapter 1 - Introducing Surfer
Docking Managers
Surfer has a docking mechanism feature that allows for easy docking of managers.
Left-click the title bar of a manager and drag it to a new location while holding down
the left mouse button. The docking mechanism displays arrow indicators as you move
the manager around the screen. When the cursor touches one of the docking
indicators in the docking mechanism, a blue rectangle shows the window docking
position. Release the left mouse button to allow the manager to be docked in the
specified location.
Object Manager
When Surfer starts, the Object Manager is visible in the plot window by default. It
contains a hierarchical list of the objects in the Surfer plot window. The Object
Manager is initially docked at the left side of the window, giving the window a split
appearance; however, it can be dragged and placed anywhere on the screen. The
Object Manager can also be hidden as a tab, or displayed as a floating dialog.
Property Manager
When Surfer starts, the Property Manager is visible in the plot window by default. It
contains all the properties of the selected object in multiple tabs to quickly and easily
access and change properties. The Property Manager is initially docked at the left
side of the window, below the Object Manager, giving the window a split
appearance; however, it can be dragged and placed anywhere on the screen. The
Property Manager can also be hidden as a tab, or displayed as a floating dialog.
13
Surfer
Toolbars
All window types in Surfer include toolbars that contain buttons for many common
commands. The toolbars are initially docked, but they can be dragged and placed
anywhere on the screen, or displayed as floating dialogs. Toolbars can be customized
to add or remove buttons with the new View | Toolbars | Customize command.
Tab View
The plot, worksheet, and grid node editor windows are displayed as tabbed
documents. When more than one window is open, tabs appear at the top of the
document, allowing you to click on a tab to switch to a different window. The tabs may
be dragged to reorder them. When a document contains unsaved changes, an asterisk
(*) appears next to its tabbed name. The asterisk is removed once the changes have
been saved.
Three-Minute Tour
We have included several example files so that you can quickly see some of Surfer’s
capabilities. Only a few example files are discussed here, and these examples do not
include all of Surfer’s many map types and features. The Object Manager is a good
source of information as to what is included in each file.
CoordinateSystems.srf
The coordinate systems sample file contains a map
with multiple map layers. The image map layer is
color filled and in a State Plane coordinate system.
The two base map layers show land areas and
rivers and contain polylines and polygons in a UTM
coordinate system. The target coordinate system,
as shown by the axes, is in latitude and longitude.
The CoordinateSystems.srf shows
a map with multiple layers from
different coordinate systems.
14
Chapter 1 - Introducing Surfer
Transparent.srf
The transparent sample file contains two map
layers: a contour map layer and a base map
layer.
Using Scripter
Tasks can be automated in Surfer using Golden Software’s Scripter program or any
ActiveX Automation-compatible client, such as Visual BASIC. A script is a text file
containing a series of instructions for execution when the script is run. Scripter can
be used to perform almost any task in Surfer. You can do practically everything with a
script that you can do manually with the mouse or from your keyboard. Scripts are
useful for automating repetitive tasks and consolidating a sequence of steps. Scripter
is installed in the same location as Surfer. Refer to the Surfer Automation help book
in the online help for more information about Scripter. We have included several
example scripts so that you can quickly see some of Scripter’s capabilities.
15
Surfer
Map Types
Several different map types can be created, modified, and displayed with Surfer. A
description and example of each map is listed below.
Base Map
Base maps display boundaries on a map and can contain
areas, curves, points, text, images, or metafiles. Base maps
can be overlaid with other map layers to provide details
such as roads, buildings, streams, city locations, areas of no
data, and so on. Base maps can be produced from several
file formats. Individual base map objects can be edited,
moved, reshaped, or deleted. Refer to Chapter 7 – Base
Maps for more information.
Contour Map
Contour maps are two-dimensional representations of three-
dimensional data. Contours define lines of equal Z values
across the map extents. The shape of the surface is shown
by the contour lines. Contour maps can display the contour
lines and colors or patterns between the contour lines. Refer
to Chapter 6 – Contour Maps for more information.
16
Chapter 1 - Introducing Surfer
Image Map
Image maps are raster images based on grid files. Image
maps assign colors based on Z values from a grid file.
Blanked regions on the image map are shown as a separate
color or as a transparent fill. Pixels can be interpolated to
create a smooth image. Refer to Chapter 9 – Image Maps
for more information.
Vector Map
Vector maps display direction and magnitude data using
individually oriented arrows. At any grid node on the map,
the arrow points in the downhill direction of the steepest
descent and the arrow length is proportional to the slope
magnitude. Vector maps can be created using information in
one grid file (i.e. a numerically computed gradient) or two
different grid files (i.e. each grid giving a component of the
vectors). Refer to Chapter 11 – Vector Maps for more
information.
17
Surfer
3D Surface Map
3D surface maps are color three-dimensional
representations of a grid file. The colors, lighting, overlays,
and mesh can be altered on a surface. Multiple 3D surface
maps can be layered to create a block diagram. Refer to
Chapter 13 – Surface Maps for more information.
3D Wireframe Map
3D wireframe maps are three-dimensional representations
of a grid file. Wireframes are created by connecting Z
values along lines of constant X and Y. Refer to Chapter 12
– Wireframe Maps for more information.
Map Layers
It is possible to combine several maps to create one map object with multiple layers.
The Map | Add command allows you to add a map layer to the selected map. Most
combinations of map types can be combined. You can add any combination of contour,
base, post, image, shaded relief, vector, or 3D surface maps. You can add any
combination of contour, base, post, and vector maps with 3D wireframe maps.
A Map uses a single set of X, Y, and Z axes. Individual map layers are positioned
according to the map layer’s coordinate system. If two or more map layers have the
exact same X and Y values, the two layers will occupy the same map space. If two
layers cover adjacent X and Y areas, the two layers will overlay next to each other in
the correct relative position. Layered maps become a single Map object and are moved
and scaled together. The opacity of each map layer can be adjusted individually to
make a layer transparent or semi-transparent.
18
Chapter 1 - Introducing Surfer
Coordinate Systems
A coordinate system is a method of defining how a file’s point locations display on a
map. Different types of coordinate systems exist that control how the coordinates are
shown on the map. In Surfer, a map can be in local coordinates, in a geographic
latitude and longitude system, or in a known projection and datum.
In Surfer, data, grids, map layers, and maps can have an associated coordinate
system. All coordinate systems defined by the data, grids, and map layers are
converted “on the fly” to the map’s target coordinate system. This allows maps with
different coordinate systems to be easily combined in Surfer.
It is recommended that you do not use projected coordinate systems if you do not
need to convert between coordinate systems or if all your data are in the same
coordinate system.
19
Surfer
3D surface maps and wireframe maps do not have a coordinate system associated
with them. When a map with a coordinate system is overlaid onto either of these map
types, the map coordinate system is removed and the maps are displayed in the
Cartesian coordinates.
This map has multiple map layers that share axes. The map object controls the
limits and scale. The individual map layers display the state and county boundaries,
the county labels, and the image map showing elevation.
20
Chapter 1 - Introducing Surfer
Getting Help
Surfer comes with a quick start guide that provides a quick way to learn the basics of
Surfer. There are other sources of help, including this full length guide, that will help
you learn Surfer.
Online Help
Use the Help | Contents command in the program to access the detailed online help.
Information about each command and feature of Surfer is included in the online help.
Automation Help
Use the Help | Automation Help command to display the Introduction to Scripter
help page and open the Scripter help book with all of the Surfer Automation help
information.
press the F1 key. Alternatively, click the button. The cursor will appear as ,
and you can select the item for which help is desired with the modified pointer and a
help window appears. This method will produce a detailed help page for the item of
interest.
In addition, most dialogs contain a help button. Click the button in the dialog title
bar to obtain help for that dialog or click the Help button at the bottom of the dialog.
Internet Help
Golden Software’s website is located at www.GoldenSoftware.com. The website
contains information about Surfer and other Golden Software products. In addition,
there is a knowledge base and a user support forum on the website.
21
Surfer
Find answers to your technical questions and interact with our technical support staff
and fellow Golden Software users through the online Surfer forum.
Use the Help | Golden Software on the Web | Knowledge Base command to
connect to Golden Software’s knowledge base. Open a connection to the internet
before selecting this command. The knowledge base page is located at
www.GoldenSoftware.com/activekb/.
22
Chapter 1 - Introducing Surfer
If you encounter problems with Surfer, you are welcome to send an email message to
Golden Software using the Help | Feedback | Problem Report command. This
message is delivered directly to [email protected]. Report the steps
you perform when the problem occurs and include the full text of any error messages
that are displayed. You are welcome to attach a .ZIP file (10 MB maximum) containing
the .SRF file and other files that illustrate the problem. Larger files may be uploaded to
our FTP site at ftp://ftp.GoldenSoftware.ws/incoming/Surfer/.
Telephone: 303-279-1021
Fax: 303-279-0909
Email: [email protected]
Web: www.GoldenSoftware.com (includes FAQs, knowledge base, support forum,
training videos, newsletters, downloads, and more!)
Mail: Golden Software, Inc., 809 14th Street, Golden, Colorado 80401-1866, USA
23
Surfer
24
Chapter 2
Tutorial
The sample files used in the tutorial lessons are located in the Surfer SAMPLES folder.
The SAMPLES folder is located by default at C:\Program Files\Golden Software\Surfer
10\Samples. Note, if you are running the 32-bit version of Surfer on a 64-bit version
of Windows, the SAMPLES folder is located at C:\Program Files (x86)\Golden
Software\Surfer 10\Samples, by default.
Once you complete the basic tutorial lessons, you might contemplate moving to the
advanced tutorials, which covers different other useful facets of Surfer. Alternatively,
you may skip that part for the time being and start with the other chapters, before
coming back again to the advanced tutorials. The Advanced Tutorial lessons help you
master some advanced features of Surfer.
25
Surfer
Lesson 7 - Adding Transparency, Color Scales, and Titles shows you how to add
transparency, color scales, and map titles to your maps.
Lesson 8 - Creating Maps from Different Coordinate Systems shows you how to
create a map with multiple map layer and change the coordinate system for the
entire map.
Lesson 9 - Custom Toolbars and Keyboard Commands shows you how to create
custom toolbars and keyboard shortcuts to improve your efficiency in Surfer.
Lesson 10 - Overlaying Map Layers shows you the three methods to overlay map
layers.
Lesson 11 - Blank a Grid File shows you how to create a blanking file and use the
Grid | Blank command to create a grid file with an irregular boundary.
Lesson 12 - Using a Didger TerraServer Image in Surfer shows you how to
download a USGS TerraServer image in Didger 4 (sold separately) and easily
send the image to Surfer as a base map.
Lesson 13 - Changing the Projection in the Worksheet shows you how to change
the projection of a data set in the Surfer worksheet.
Lesson 14 - Creating a Cross Section shows you how to create a cross section line
on a contour map, extract the XY data along the line, and plot the cross section as
a base map.
26
Chapter 2 - Tutorial
This flow chart illustrates the relationship between XYZ data files,
grid files, post maps, contour maps, and 3D surface maps.
27
Surfer
Using Surfer
The most common application of Surfer is to create a grid-based map from an XYZ
data file. The Grid | Data command uses an XYZ data file to produce a grid file. The
grid file is then used by most of the Map menu commands to produce maps. Post
maps and base maps do not use grid files.
The general steps to progress from a XYZ data set to a finished, grid-based map are
as follows:
4. To create a map, select the map type from the Map | New menu commands.
Select the grid file from step two. Grid-based maps include contour, image,
shaded relief, vector, 3D surface, and 3D wireframe maps.
28
Chapter 2 - Tutorial
29
Surfer
30
Chapter 2 - Tutorial
1. Click the File | Save command, click the button, or press CTRL+S on the
keyboard. The Save As dialog is displayed if you have not previously saved the
data file.
2. In the Save as type list, choose the DAT Data (*.dat) option.
3. Type the name of the file into the File name box.
4. Click the Save button and the Data Export Options dialog opens.
5. Accept the defaults in the Data Export Options dialog by clicking OK.
6. The file is saved in the Data .DAT format with the file name you specified. The
name of the data file appears at the top of the worksheet window and on the
worksheet tab.
31
Surfer
2. In the plot window, click the Grid | Data command, or click the button in the
grid toolbar. The Open Data dialog is displayed.
3. In the Open Data dialog, click the file TUTORWS.DAT (located in Surfer's
SAMPLES folder). You can select the file in the file list section or in the Open
worksheets section of the dialog by clicking once on the file name. The name
appears in the File name box below the list of data files. Click Open. Alternatively,
double-click on the data file name.
4. The Grid Data dialog is displayed. The Grid Data dialog allows you to control the
gridding parameters. Take a moment to look over the various options in the
dialog. Do not make changes at this time, as the default parameters create an
acceptable grid file.
32
Chapter 2 - Tutorial
Use the Grid Data dialog to set gridding preferences and create a grid file.
• The Data Columns section is used to specify the columns containing the X and
Y coordinates, and the Z values in the data file.
• The Filter Data button is used to filter your data set.
• The View Data button is used to see a worksheet preview of your data.
• The Statistics button is used to open a statistics report for your data.
• The Grid Report option is used to specify whether to create a statistical report
for the data.
• The Gridding Method option is used to specify the interpolation gridding
method.
• The Advanced Options button is used to specify advanced settings for the
selected Gridding Method.
• The Cross Validate button is used to assess the quality of the gridding method.
• The Output Grid File displays the path and file name for the grid file.
• The Grid Line Geometry section is used to specify the XY grid limits, grid
spacing, and number of grid lines (also referred to as rows and columns) in
the grid file.
33
Surfer
5. Click OK. In the status bar at the bottom of the window, a display indicates the
progress of the gridding procedure. By accepting the defaults, the grid file uses
the same path and file name as the data file, but the grid file has a .GRD
extension.
6. By default, a Surfer dialog appears after gridding the data with the full path and
file name of the grid file that was created. Click OK in the Surfer dialog. The
TutorWS.GRD grid file is created.
7. If Grid Report was checked in the Grid Data dialog, a report is displayed. You can
minimize or close this report. This report contains detailed information about the
gridding process.
Contour maps are used for a variety of applications. You can contour any Z value of
data. If you had multiple Z values for your X, Y values, you could create multiple
contour maps. For example, you could create a contour map for X, Y, Z (elevation) to
show the topography of your study area. You could then create a contour map for X,
Y, Z (concentration) to show the concentration values across your study area. The Z
value could be temperature, concentration, frequency, or any other numeric column of
data.
1. Click the Map | New | Contour Map command, or click the button in the
map toolbar.
2. The Open Grid dialog is displayed. Select the grid file you created in Lesson 2
(TUTORWS.GRD) by clicking once on its name. The file name is entered in the File
name box.
3. Click Open. The map is created using the default contour map properties.
34
Chapter 2 - Tutorial
4. If you want the contour map to fill the window, click the View | Fit to Window
35
Surfer
36
Chapter 2 - Tutorial
3. The Colormap dialog allows you to select colors to assign to specific Z values.
Click the color next to Presets. Select the Grayscale from the list.
4. Click on the left node below the color spectrum. This selects the minimum color
node. Click on the button next to Color and select the color Blue in the color
37
Surfer
palette. The color scale now ranges from Blue to White. Alternatively, you could
select a color spectrum from the Presets drop-down list, or by clicking the Load
button.
5. (Optional) If you would like the color fill to be transparent, change the Opacity
value by clicking and dragging the slider next to Opacity.
6. (Optional) If you want the color fill to be opposite, with white on the left minimum
value and blue on the right at the maximum value, click the Reverse button.
7. Click OK and the contour map is redrawn with the blue to white fill.
38
Chapter 2 - Tutorial
4. Click the Edit Levels button next to Contour levels to open the advanced
Properties dialog.
5. Click on the column header buttons to make bulk changes at regular intervals.
This provides a way to emphasize contours.
39
Surfer
40
Chapter 2 - Tutorial
41
Surfer
edit mode. The contour labels have rectangular boxes around them in edit mode.
4. To delete a label, click on the label and press the DELETE key on the keyboard. For
example, left-click on one of the center 65 labels and press the DELETE key on
your keyboard.
5. To add a label, press and hold the CTRL key on the keyboard and left-click the
location on the contour line where you want the new label to be located. The
cursor changes to a black arrowhead with a plus sign to indicate you are able
to add a new label. Add several contour labels to the solid and dashed red lines.
6. To move a contour label, left-click on the label, hold down the left mouse button,
and drag the label. Release the left mouse button to complete the label
movement.
7. To duplicate a label, hold the CTRL key on the keyboard while holding the left
mouse button on an existing label. Drag the label to a new location along the line.
8. To exit the Edit Contour Labels mode, press the ESC key.
42
Chapter 2 - Tutorial
4. If you cannot see the axis title, click the View | Zoom | Selected command. The
map automatically increases its size to fill the plot window.
43
Surfer
Saving a Map
When you have completed the map in the plot window, you can save the map to a
Surfer .SRF file. Surfer .SRF files contain all the information necessary to reproduce
the project. When you save a map as a .SRF file, all the scaling, formatting, and map
properties are preserved in the file. An asterisk (*) next to the file name in the title
bar and tab indicates the file has been modified and the modifications have not yet
been saved.
To save a map:
1. Choose the File | Save command, or click the button. The Save As dialog is
displayed because the map has not been previously saved. Set the Save in
directory to any directory on your computer.
2. In the File name box, type TUTORWS.
3. Make sure that the Save as type is set to Surfer Files (*.srf).
4. Click Save and the file is saved to the current directory with a .SRF extension. The
saved map remains open and the title bar changes to reflect the name change.
There is no longer an asterisk next to the file name.
Posting data points on a map can be useful in determining the distribution of data
points, as well as placing data or text information at specific points on the map. Data
files contain the X, Y coordinates used to position the points on the map. Data files can
also contain the labels associated with each point.
44
Chapter 2 - Tutorial
If two maps already existed, a map layer can be dragged to a different map object in
the Object Manager. Alternatively, select both maps and click the Map | Overlay
Maps command. All selected map layers are moved to a single map object.
To delete a map layer, select the layer in the Object Manager and press the DELETE
key. To remove a map layer from a map object, right-click the layer and select Break
Apart Map Layer.
45
Surfer
If the post map is not visible, ensure that the post layer is on top of the contour layer
in the Object Manager. The order the layers are listed in a map object is the order
the map layers are drawn in the plot window. To move a map layer, left-click and drag
up or down in the map object. Alternatively, select the map layer and use the
Arrange | Order Objects command or right-click and select Order Objects.
46
Chapter 2 - Tutorial
However, you can also select the layer in the plot window with the mouse. Whenever
two or more objects occupy the same position in the plot window, use the CTRL key
and the left mouse button to select the desired object. The CTRL key allows you to
cycle through the selection of overlapping objects. For example, if you want to select a
contour map layer behind a post map layer, hold down the CTRL key and click until the
contour map layer is selected. You can use the status bar to help you to determine
which object is selected.
The status bar at the bottom of the Surfer window indicates the selected object in the plot
window. In this example, the status bar reports that the Map: Contours is selected.
47
Surfer
To add labels:
1. Click on the "Tutorial Post Map" layer
in the Object Manager.
2. In the Property Manager, click on
the Labels tab. Next to Worksheet
column, click the word None. A drop-
down list displaying all of columns in
TUTORWS.DAT is displayed. Select
Column C: Elevation from the list.
3. Click the next to Label Format to
open the Label Format section.
4. Change the Type to Fixed. Add labels to post maps in the Property
Manager on the Labels tab.
5. Change the Decimal digits value to
zero and press ENTER on the keyboard.
6. The post map layer is automatically redrawn with labels on each of the data
points.
48
Chapter 2 - Tutorial
The cursor will change to a to indicate you are now in post label editing mode.
3. Left-click on a label, hold the left mouse button down, and drag the label to a new
location. With the left mouse button held down, the arrow keyboard keys can be
used to nudge the label location. Release the left mouse button to place the label
in the new location. A leader line will be added from the point location to the new
label location by default. The leader line visibility and line properties are controlled
on the Labels page in the Property Manager when the post map is selected.
4. Press the ESC key to exit the post label editing mode.
Before moving on to the next lesson, be sure to save your progress with the File |
Save command. Your TUTORWS.SRF file will be saved to include all the additions from
Lesson 5.
49
Surfer
Adding a Mesh
Mesh lines can be applied to surfaces.
3D surface maps have more capability
than 3D wireframe maps because
surfaces can be combined with more
map types and can have the map
limits changed. Adding mesh lines to a
3D surface map simulates a 3D
wireframe map.
50
Chapter 2 - Tutorial
Changing Colors
Changing color schemes on 3D surfaces is similar to changing colors on other map
types such as image maps or contour maps. A Colormap is used to load previously
defined color schemes, or to create your own color schemes.
You can continue to experiment with the colors by selecting other color spectrums
from the drop-down list next to Upper. Or, click the Custom button in the drop-down
list and make changes in the Colormap dialog. You can experiment with selecting
custom node locations and colors.
51
Surfer
Next, add a planar 3D surface map You can overlay two or more 3D surfaces.
layer: Depending on each surface's XYZ ranges, the
surfaces may overlap or intersect each other.
1. With the TUTORWS map selected,
This example shows intersection of the
use the Map | Add | 3D Surface TUTORWS.GRD and TUTORPL.GRD sample files.
Layer command, or right-click the
surface map and select Add | 3D
Surface Layer.
2. In the Open Grid dialog, open Surfer's SAMPLES folder and select the planar
grid, TUTORPL.GRD. Click Open, and the surface map layer is created using the
default settings.
52
Chapter 2 - Tutorial
3. Right-click on the new 3D surface in the Object Manager and select Rename
Object. Change the text to TUTORPL and click OK. This will make it easier to
distinguish the two map layers in the Object Manager list. A planar surface is
now layered with the original 3D surface.
4. Click on the TUTORPL surface map in the Object Manager.
5. In the Property Manager, open the Material Color section and click on the color
next to Upper. Select Rainbow in the drop-down list to match the TUTORWS color
fill.
6. Before moving on to the next lesson, be sure to save your progress with the File |
Save command. Type a new File name, such as TUTORWS-SURFACE.SRF. Click
Save and the new file will be saved to include all the steps from Lesson 6.
Reducing the opacity of an object allows the ability to see through the object to other
objects. This may be useful when wanting to create a semi-transparent map or object.
For example, you may want to display a semi-transparent contour map over a base
map of a satellite image. Being able to set the Opacity of entire layers is especially
useful when you have multiple layers with filled objects and you need to see all of the
layers.
1. Click the File | New | Plot command, or click the button. A new empty plot
window is displayed.
2. Click the Map | New | Contour Map command.
3. Select the grid file TUTORWS.GRD from the list of files in the Open Grid dialog
and click Open. The map is created using the default settings. The TUTORWS.GRD,
created in Lesson 2 - Creating a Grid File, is located in Surfer's SAMPLES folder.
53
Surfer
Color Scales
Color scales are available for contour, 3D wireframe, 3D surface, image, and vector
maps. Color scales are legends that show the fill assigned to each contour level on a
filled contour map, the colors assigned to levels in a 3D wireframe, the colors used in
an image map, or 3D surface, and the fill assigned to vector symbols.
Having a completed map with multiple layers, color scale legends, and titles allow you
to provide well organized and easily understandable publication quality maps. Let us
create a contour map and add these features to it.
54
Chapter 2 - Tutorial
55
Surfer
two objects are selected, use the Arrange | Group command to create a
composite object. Items in a grouped object can be individually edited, but they
are moved together. To move the items individually, use the Arrange | Enter
Group command.
6. Rename the composite object to "Tutorial Color Scale".
The shaded relief map is visible behind the partially transparent contour map.
56
Chapter 2 - Tutorial
3. Press the button to open the Multiline Text dialog. This dialog allows
multiple lines of text to be created.
4. After Map, press the ENTER key on the keyboard. On the second line, we will use a
dynamic predefined math text instruction to insert the current date. In this case
we will use the term "\date " to display the current date. Be sure to add a space at
the end of "\date ". Failure to put a space after "\date " will result in a math text
instruction error. Click OK.
5. Click the next to Font Properties to open the Font Properties section. Check
the box next to Bold.
6. Change the Size (points) to 14 and click ENTER on the keyboard.
7. The map is automatically updated with the new map title.
57
Surfer
Map layers from different coordinate systems can be created in the same map object.
Surfer converts the source coordinate system for each map layer to the target
coordinate system for the entire map. The axes display the target coordinate system.
58
Chapter 2 - Tutorial
State Plane 1927 - California III (Meters), as shown in the Name field.
The two maps are displayed side by side with very different coordinates displayed on the axes.
59
Surfer
7. In the Object Manager, click and drag the Post map layer into the Map object
that contains the Contours map layer.
8. The two map layers are now overlaid. You can see the posted symbols are located
on the contour lines, despite the different coordinate systems.
60
Chapter 2 - Tutorial
4. On the Coordinate System tab, the map now has a different coordinate system
than either of the map layers. Notice that the axes are now showing latitude and
longitude values, as well.
You have completed the Surfer tutorial lessons one through eight.
The remaining tutorial lessons are optional advanced lessons. It is recommended that
you complete the optional lessons, because these lessons provide additional
information about how Surfer works.
61
Surfer
The Help | Keyboard Map command displays a list of the current keyboard
commands. The Category drop-down list contains the menu commands for the
selected accelerator. The Show Accelerator for drop-down list allows you to view the
keyboard commands for the Plot Document, Grid Document, or Worksheet.
62
Chapter 2 - Tutorial
In this example, we will create a custom keyboard shortcut for the commonly used
Grid | Data command.
63
Surfer
Before we start, it is important to understand the difference between a map object and
a map layer. The Object Manager is the easiest place to see the difference between a
map object and a map layer.
• A map object is listed in the Object Manager as Map. A map object consists of
axes and an optional map layer or map layers. Click on the Map object to open the
map properties in the Property Manager, where the View, Scale, Limits, Frame,
and Coordinate System are controlled.
• A map layer is listed in the Object Manager as the map type name (i.e.
Contours). A single map layer or multiple map layers can be part of a map object.
Click on the map layer (i.e. Contours) to open the properties for the selected map
type (i.e. contour map properties) in the Property Manager. The specific
properties related to the map type are controlled separately from the entire map
properties.
64
Chapter 2 - Tutorial
The contour map layer and the post map layer are displayed in separate map
objects in the Object Manager and the plot window.
6. Click on the Post map layer in the Object Manager. Hold down the left mouse
button and drag the Post map layer to the map that contains the Contours map
layer. When the cursor changes to a horizontal arrow , release the left mouse
button, and the map layer is added to the new map frame. The post map will now
be overlaid on the contour map with a single Map object.
7. Additional map layers from other map objects can be overlaid on this map object
using any of the three methods.
65
Surfer
Click on the post map layer (left). Drag the post map layer to the
other map object. When the cursor is a horizontal arrow (middle), release the
mouse button to drop the map layer in the new location (right).
The post map layer was dragged to overlay on top of the contour map layer.
The Map object now has two map layers (Post, Contours).
66
Chapter 2 - Tutorial
67
Surfer
68
Chapter 2 - Tutorial
the button. The Open Grid dialog appears. Select the new
Demogrid_Blanked.grd file and click Open.
10. The contour map is updated with the blanked grid file.
In this tutorial, we will download a satellite image of Golden, Colorado, send the image
to Surfer, and add a semi-transparent contour map layer to the base map image.
69
Surfer
3. In the TerraServer Image Download dialog, click the Location Search button in the
Select Center Location Coordinate section.
4. In the Location Search dialog, enter Golden in the Place Name field.
5. Select CO from the State drop-down list.
6. Click the Search button.
7. From the Select Location list, select the entry that has a Place Name of Golden, a
Longitude of -105.22, and a Latitude of 39.75 and click OK. The coordinates for
Golden, CO are now entered into the Select Center Location Coordinate box.
8. In the Tiles to Download section, enter 20 for the X and Y direction. This specifies
a 20 x 20 tile download. Selecting too few tiles to download will result in too small
of an area in the final map. Selecting too many tiles results in a long download
time.
9. In the TerraServer Image Type section, select Digital Ortho Quadrangle - 2 Meters
Per Pixel from the Select Type drop-down list.
10. Click the Download Tiles button. The tiles will download and appear in the Preview
Tiles section.
11. Once the tiles are fully
downloaded, click the
Load button.
70
Chapter 2 - Tutorial
A common example of when you would use the New Projected Coordinates
command would be if your base map is in latitude/longitude but your data file is in
UTM. You can use this command to convert the data file from UTM to
latitude/longitude so that you can overlay it with your base map.
In this example, we will convert a grid file to a data file. Once we have a data file, we
will import the data file into the Surfer worksheet and change the UTM coordinates to
latitude/longitude.
71
Surfer
4. Click the button to set the Source Coordinate System (the current projection
of the source data). The Assign Coordinate System dialog opens.
5. In the Assign Coordinate System dialog, click the + button to the left of
Predefined.
6. Click the next to Projected Systems.
7. Click the next to UTM.
8. Scroll down and click the button to the left of North America.
9. Scroll down and select North America NAD83 UTM zone 13N. If you will use this
projection often, click the Add to Favorites button to save this projection to your
Favorites list to help easily locate North America NAD83 UTM zone 13N in the
future.
10. Once the projection is selected, click the OK button. The Source Coordinate
System is updated with the selected projection in the New Projected
Coordinates dialog.
11. Specify the Target Columns (the columns you want the reprojected data to go
into) to X: Column D, Y: Column E.
12. Click the button to set the Target Coordinate System (the projection you want
the data to be projected to). The Assign Coordinate System dialog opens.
13. In the Assign Coordinate System dialog, click the button to the left of
Predefined.
14. Click the button next to Geographic (lat/lon).
72
Chapter 2 - Tutorial
15. Scroll down and select World Geodetic System 1984. If you will use this projection
often, click the Add to Favorites button to save this projection to your favorites list
to help easily locate World Geodetic System 1984 in the future.
16. Once the projection is selected, click OK. The Target Coordinate System is updated
with the selected projection in the New Projected Coordinates dialog.
17. Click the OK button in the New Projected Coordinates dialog. The new longitude
and latitude data is displayed in the target columns specified (column D and E).
18. Use the File | Save command to save the updated data file.
19. In the Data Export Options dialog, set the Delimiter to Comma and the Text
Qualifier to None. Click OK. The updated file is saved.
20. Click the File | Close command to close the worksheet window. Alternatively,
click on the Plot1 tab to switch back to the plot window.
21. In the plot window, click the Grid | Data command to create a grid file from the
new data file.
22. In the Open Grid dialog, select the data file and click the Open button to open the
Grid Data dialog.
23. In the Grid Data dialog, change the Data Columns to X: Column D, Y: Column E,
and Z: Column C. Select Kriging for the Gridding Method. Leave the Output Grid
File, and Grid Line Geometry groups set to the defaults. Uncheck the Grid Report
option.
24. Click the OK button to create the grid file. A Surfer dialog appears with the full
location and name of the created grid file.
25. Use the Map | New | Contour Map command to open the Open Grid dialog.
73
Surfer
26. Select the grid file and click the Open button to create a contour map from the
new grid file.
In this example, the coordinate data was used to create a grid file.
The grid file was used to create two contour maps. The map on the left was
created from the original coordinates (NAD83 UTM zone 13N). The map on the
right was created from the new projected coordinates (Latitude/Longitude WGS 1984).
When you slice a grid file, you have the option to create a boundary or data file from
the slice. To display the results in Surfer, the sliced information will be saved to a
data file. The resulting data file is modified and used to create a base map. If you have
one slice (i.e., a topological profile), then you are done. If you have more than one
slice (i.e., different surfaces at different depths), a base map can be created from each
slice. The base maps are then overlaid to create a cross section.
To start off, you must first have a grid file of your surface data and a .BLN file defining
the line of section. If you do not have a .BLN file, one can be digitized.
74
Chapter 2 - Tutorial
record the XY coordinates. The cursor changes to a to indicate that you are in
the digitize mode.
6. Click on the contour map near the (0,4) and (9,4) coordinate locations. The exact
coordinates of the cursor are displayed in the status bar for reference. The
digitized locations are displayed in the Digitized Coordinates window. The
coordinates can be manually adjusted in the window if needed.
7. In the Digitized Coordinates window, click File | Save As.
8. In the Save As dialog, specify a location to save the blanking file, enter
"DemogridCrossSection.BLN" as the File name, and select Boundary Files (*.bln)
as the Save as type. Click the Save button to save the blanking file.
9. Close the Digitized Coordinates window by clicking the X in the upper right of
the window.
10. Press the ESC key on the keyboard to end digitizing mode.
4. In the Grid Slice dialog, click on the button to the right of Output DAT File.
5. In the Save As dialog, enter "CrossSectionSlice.DAT" as the File name.
6. Click the Save button and the Grid Slice dialog is updated with the Output DAT
File information.
7. Click the OK button and the .DAT file is created.
75
Surfer
76
Chapter 2 - Tutorial
77
Surfer
78
Chapter 3
Data Files and the Worksheet
Introduction to Data Files
Data files contain the raw information used to create a grid file, perform residual
calculations, or produce post maps. Each record in a data file occupies a single row
and is comprised of at least two values (X, Y) for post maps and at least three values
for gridding (X, Y, Z). The X, Y, and Z values are each placed in separate columns. The
X and Y coordinates define the position of the point on the map, and the Z value
defines the value assigned to the specific X, Y location. Common examples of X, Y
coordinates include longitude and latitude, easting and northing, or UTM (Universal
Transverse Mercator) coordinates. The Z data might be topographic elevation, water
depth, chemical concentration, temperature, or any other quantity amenable to
mapping.
Data files can be created in the Surfer worksheet, a text editor, or any program that
can produce files in one of the supported file formats. Regardless of the program used
to create your data files, you must save the file on disk prior to performing any Surfer
operation requiring a data file, including the gridding operation. Surfer reads data
only from a data file in one of the recognized formats.
It is not necessary to open a data file in the worksheet in order to use the data file for
a command (i.e. Grid | Data). If you want to view or alter the data in a data file, you
can use the File | Open command to gain access to the worksheet data.
Surfer requires the use of decimal degree values when using Latitude and Longitude
data.
79
Surfer
Portions of two simple data files are shown below. The order of the data in the file is
not important. When text appears in Row 1 of a column, this text appears in list boxes
in various Surfer dialogs as column titles. The two examples below on the right
contain descriptive headers in Row 1 of each column. Such information is helpful but
not required by Surfer to create a grid file. If a number resides in Row 1, it is not
incorporated into the dialogs, and instead, the column heading (such as column B) is
displayed.
This is a simple XYZ data file. This is another example of an XYZ data
file with header information in row 1 of
each column in the data file.
Missing Entries
Rows with non-numeric entries (empty cells or
text) in any of the X, Y, or Z columns are
excluded when performing various tasks,
including gridding or transforming data in the
worksheet. If there is no Z information for a
particular XY location, you can leave the Z cell
blank for that row. In the example shown here,
there are two data records without Z values.
These records are not considered during the
gridding operation.
Blank Z column cells are ignored
when gridding a data file.
80
Chapter 3 – Data Files and the Worksheet
Multiple Columns
Data files can contain up to one billion columns. Since you can specify the columns to
be gridded, the X, Y, and Z values can occupy any three columns. This allows you to
have columns containing other information particular to each point. The data file can
contain several Z columns, so you can produce several contour maps using the same
XY coordinates. For example, you might have concentrations of different contaminants
at each sample location. All the contaminant concentration data can be placed in the
same data file.
Additional Information
Data files may contain information in addition to the X, Y, and Z values. For example,
while posting data with the Map | New | Post Map command, additional columns can
be used to specify the symbol, the rotation angle, labels, etc. The following is an
example of such a data file. Columns A, B, and C contain the X, Y, and Z data used to
produce a contour map of depth to the water table. Columns D, E, and F contain
information used to create an overlaying post map.
A data file used to create a post map or a classed post map can contain several
columns of data. Each column can have a different effect on the posted data points.
81
Surfer
By default, numeric data is right justified in a cell, and text is left justified. Cell entries,
numeric or text, can be justified by specifying the desired alignment using the options
on the Alignment page of the Format | Cell Properties command.
Worksheet Window
Worksheet windows are a view of the data file and are designed to display, edit, enter,
and save data. The worksheet windows have several useful and powerful editing,
transformation, and statistical operations available. Several import and export options
are available for opening data files from other spreadsheet programs.
82
Chapter 3 – Data Files and the Worksheet
The plot, worksheet, and grid node editor windows are displayed as tabbed
documents. When more than one window is open, tabs appear at the top of the
document, allowing you to click on a tab to switch to a different window. The tabs may
be dragged to reorder them. When a document contains unsaved changes, an asterisk
(*) appears next to its tabbed name. The asterisk is removed once the changes have
been saved.
83
Surfer
84
Chapter 3 – Data Files and the Worksheet
There are two basic modes in the worksheet. Normal mode is when the active cell can
be moved throughout the worksheet. Edit mode allows the contents of a single cell to
be edited in the active cell edit box. Only one mode may be active at a given time.
ESC, ENTER, or clicking on another cell can be used to exit edit mode and return to
normal mode.
Selecting Cells
The keyboard and the mouse may be used to select cells. Selected cells are indicated
by reverse video (white background becomes black, etc.). Hidden cells are selected if
their columns or rows are within a selected block of cells. Single cells, a rectangular
block of cells, one or more rows, one or more columns, or the entire worksheet can be
selected.
85
Surfer
To enter new data and delete the old, position the active cell and begin typing. Edit
mode is entered automatically and the old data is deleted. Pressing the ENTER, Up or
Down ARROWS, TAB, SHIFT+TAB, PAGE UP, or PAGE DOWN keys causes the edit
changes to be recorded permanently in the cell. After pressing F2 or highlighting the
cell edit box use the HOME, END, BACKSPACE, DEL, and ARROW keys to edit the cell.
Pressing ESC while editing a cell cancels the changes and restores the original data.
86
Chapter 3 – Data Files and the Worksheet
Width or Format | Row Height commands can also be used to set column widths or
row heights.
Move the cursor to the label bar near the dividing line until the cursor changes to a
between columns, and a between rows. The cursor must be within
approximately a character's width of the dividing line and it must be on the label bar.
Click and hold the left mouse button and drag the dividing line as described for hiding
or displaying hidden columns or rows or for setting column width and row height.
Active Cell
The active cell is displayed with a heavy border surrounding the cell. The contents of
this cell are displayed in the cell edit box. You can enter or edit data in the active cell.
To edit existing data, activate the desired cell and press the F2 key or highlight the
information in the cell edit box. You can designate any worksheet cell as the active cell
by left-clicking on it with the mouse.
The following table shows the Special Key Functions when editing a worksheet:
87
Surfer
88
Chapter 3 – Data Files and the Worksheet
DOWN edit box in the active cell and move one page up or down.
HOME HOME moves the active cell to the first occupied cell in
the current column. Pressing HOME again moves the
active cell to the top row in the current column.
CTRL+HOME CTRL+HOME moves the active cell to the top cell of the
left most column in the worksheet (A1).
END END moves the active cell to the last occupied row in the
current column. Pressing END again moves the active cell
to the bottom row of the worksheet.
CTRL+END CTRL+END moves the active cell to the bottom occupied
row of the last occupied column in the worksheet.
TAB TAB stores the contents of the cell edit box in the active
cell and move the active cell to the left.
SHIFT+TAB SHIFT+TAB stores the contents of the cell edit box in the
active cell and moves the active cell to the right.
If the worksheet already contains data, additional data can be merged into the
worksheet using the File | Import command. The contents of the new file are merged
into the worksheet at the active cell so it is imperative that the cell be positioned at
the edge of the existing data. Any cells in the existing worksheet that lie to the right
and below the active cell will be overwritten with the contents of the merging file.
Multiple files can be opened at one time into the same worksheet with File | Import
using the SHIFT or CONTROL keyboard keys while selecting files in the Merge dialog.
You can view, enter, or modify data in the worksheet document.
89
Surfer
• Click the button in the toolbar. In the Open dialog, select a data file.
• Select the File | Open, File | Import, or File | Import Database command in
the worksheet and then select a data file.
• If there is an open worksheet window, return to it at any time by clicking the
desired worksheet tab.
• If there is an open worksheet window, return to it at any time by choosing the
worksheet from the Window menu. The window menu contains a list of all the
windows open during the current session.
Pasting Data
If data are copied to the clipboard from another software application, the contents of
the clipboard can be pasted into the worksheet. If the source application is Microsoft
Excel, some formatting information is retained. When pasting data into the worksheet,
select a cell and use Edit | Paste (CTRL+V). Any data to the right or below the active
cell is overwritten, so be sure to locate the active cell carefully. When data are copied
to the clipboard, special formatting information is also copied. The Edit | Paste
Special command determines the format in which the contents are pasted into the
worksheet.
Paste Special
When data are copied to the clipboard, special formatting information is also copied.
The Paste Special dialog
determines the format in which
the contents are pasted into the
worksheet. The Paste Special
command can also be used to
remove text formatting.
90
Chapter 3 – Data Files and the Worksheet
copied from the Surfer worksheet may yield different options than data copied from
Excel.
Look In
The Look in field
shows the current
directory. Click the
down arrow to see the
directory structure and
click on the folders to
change directories.
File List
Specify files to import into the Surfer
The File list displays files in worksheet using the Merge dialog.
the current directory. The
current directory is listed in the Look in field. The Files of type field controls the display
of the file list. For example, if DAT Data (*.dat) is listed in the Files of type field only
*.DAT files appear in the files list.
91
Surfer
File Name
The File name field shows the name of the selected file. Alternatively, type a path and
file name into the box to open a file.
Files of Type
The Files of type field controls the display of the file list. For example, if DAT Data
(*.dat) is listed in the Files of type field only *.DAT files appear in the files list.
The All Recognized Types (*...) format type is selected by default. This displays all the
common file formats in the navigation pane. If a different format type is selected,
Surfer will remember the setting until the end of the current session. When Surfer is
restarted, the default format type will be used.
To see all files in the directory, choose All Files (*.*) from the Files of type list.
Double-click on a file to open it or single-click the file and then click the Open button.
The All Files (*.*) option shows all of the file formats in the current directory, even if
the file type is not appropriate for the action chosen. For example, a .GRD file may be
displayed, even though a .GRD file cannot be imported into the worksheet.
Load Database
Click the Load Database button in the Merge dialog to open the Data Link
Properties dialog and import a database.
The Data Import Options dialog may appear when importing tabular data from
delimited text files (i.e. .TXT). These file formats are assumed to have one record per
line in which each record contains a fixed number of numeric data fields.
92
Chapter 3 – Data Files and the Worksheet
Delimited
Choose Delimited (fields are separated by tabs or other characters) if the imported
data uses delimiters (tab, semicolon, comma, space, other) to separate data fields.
The Delimiters group is used to specify how the fields are separated if Delimited (fields
are separated by tabs or other characters) is the selected Field Format.
Fixed
Choose Fixed (each field is a fixed number of characters wide) if the imported data
uses a fixed width to separate data fields.
Delimiters
Choose the desired delimiters to be used during the import process by checking the
box next to Tab, Comma, Semicolon, or Space. You may also enter a custom delimiter
in the Other box. More than one delimiter may be checked.
93
Surfer
Text Qualifiers
Specify Double Quote or Single Quote in the Text Qualifiers group to indicate the
correct qualifier to identify text values in the data file.
Check the box next to Double Quote to specify that everything between those marks
should be interpreted as a single value, and any delimiter characters between any two
quote characters are not treated as a delimiter.
For example, if Space is chosen as the delimiter and Double Quote is chosen as the
text qualifier, the string "Aspen Park" is treated as a single data value due to the
double quotes surrounding it, and the space delimiter between the words is treated as
part of the value.
Check the box next to Single Quote to specify that everything between those marks
should be interpreted as a single value, and any delimiter characters between any two
quote characters are not treated as a delimiter.
For example, if Space is chosen as the delimiter and Single Quote is chosen as the text
qualifier, the string 'Aspen Park' is treated as a single data value due to the single
quotes surrounding it, and the space delimiter between the words is treated as part of
the value.
Preview
The parsed data are shown in the Preview section.
94
Chapter 3 – Data Files and the Worksheet
Importing Databases
You can open database files in Surfer with the File | Import Database command in
the plot or worksheet window.
The data linking provides a method to link virtually any database supported by
Microsoft via an OLE DB Provider, ODBC,
or some other supported format. Since the
data link provides access to many types of
databases that vary by computer, and
since this link is provided by Microsoft,
only general information is provided here.
95
Surfer
Clear
The Edit | Clear command removes data from selected worksheet cells. The cells
become empty when the data are removed. To shift the data from unselected cells
into the selected cell locations, use the Delete command instead.
Insert
The Edit | Insert command inserts a single blank cell or a block of blank cells in the
worksheet. Select cells in the area in which you wish to insert cells and then click Edit
| Insert, or right-click and select Insert from the context menu. The Insert dialog
appears. Specify how you want the original displaced contents moved when the blank
cells are inserted.
96
Chapter 3 – Data Files and the Worksheet
Delete
The Edit | Delete command deletes the selected worksheet cells and shifts cells up or
to the left to fill in the gap. After selecting Edit | Delete, the Delete dialog appears.
Specify the desired behavior of the cells and click OK. The selected cells are deleted
and the contents of cells below or to the right are moved to fill the deleted block.
To leave the selected cells empty when the data are removed, use the Edit | Clear
command, press the DEL key, or use the Edit | Cut command.
The Edit | Find Next command is used to find the next instance of a particular
number, word, or phrase in the worksheet. If the Edit | Find command was not used
initially, the Find and Replace dialog opens so that you can define your search
criteria.
97
Surfer
The Edit | Find and Edit | Find Next commands open the Find page of the Find and
Replace dialog.
Find
To find objects, type the text you
want to search for in the Find field.
Click the arrow at the right to
select from a list of the most
recently used text strings.
An asterisk * finds any number of characters at the specified location. For example,
*01 finds 601, 1201, c01, etc.
In
Next to In, choose the parameters of the search from the list. Choices include The
column where active cell is, The row where active cell is, and The entire limits.
Select The column where active cell is to search only the column (i.e. column B) of the
active cell (i.e. cell B2) for the information listed in the Find field.
Select The row where active cell is to search only the row (i.e. row _2) of the active
cell (i.e. cell B2) for the information listed in the Find field.
Select The entire limits to search the entire worksheet for the information listed in the
Find field.
98
Chapter 3 – Data Files and the Worksheet
Search Order
The Search order controls the direction of
the search. Search down in a column by
selecting By column. When the bottom of
the column is reached, the search moves
on to the next column.
Match Case
If you have case sensitive characters in the Find text string, check the Match case
check box. Selecting Match case distinguishes between uppercase and lowercase
characters. For example, a search for "Elevation" with the Match case option selected
will not find entries for "elevation", but will find entries for "Elevation".
Method
Choose the search Method from the list to determine how the search is performed. The
examples assume "Golden, CO" is in the Find field.
Select Cell matches target exactly to require that the exact criteria in the Find box is
present in a cell before it is selected. For example, only cells that have exactly
"Golden, CO" will be selected.
Select Cell contains target phrase to require that the phrase in the Find box is present
in a cell before it is selected. For example, cells that has "Golden CO", "Golden
Company", or "Golden Colorado" will be selected.
99
Surfer
Select Cell contains all of the target words to require that all of the Find criteria words
are present in a cell before it is selected. For example, cells that have "Golden" and
"CO" somewhere in the cell (i.e. "Golden is the best city in Colorado" will be selected).
Select Cell contains any of the target words to require that any of the Find criteria
words are present in a cell before it is selected. For example, cells that have "Golden is
a city" or "CO is a state" will be selected.
Find All
Click the Find All button to find all occurrences of the Find criteria in the worksheet. All
of the cells that contain the Find criteria will be highlighted.
Find Next
Click the Find Next button to find the next occurrence of the characters specified in the
Find box. This allows you to meet the criteria one at a time. The next instance of the
Find criteria will be highlighted.
Replace
The Edit | Replace command
opens the Replace page of the
Find and Replace dialog. The
Replace page has all of the Find
page fields, with the addition of the
Replace with field. The Replace
page, Method field has only two
options.
Replace With
Type the text you want to replace in
the Find box. To delete the
characters in the Find box from
your worksheet, leave the Replace
with box blank. Click the arrow at the
Use the Find and Replace dialog to replace
right to select from a list of the most numbers or text in the worksheet.
recently searched items.
Method
Choose the search Method from the list to determine how the search is performed. The
examples assume "Golden, CO" is in the Find field.
100
Chapter 3 – Data Files and the Worksheet
Select Cell matches target exactly to require that the exact criteria in the Find box is
present in a cell before it is selected. For example, only cells that have exactly
"Golden, CO" will be selected.
Select Cell contains target phrase to require that the phrase in the Find box is present
in a cell before it is selected. For example, cells that has "Golden CO", "Golden
Company", or "Golden Colorado" will be selected.
Replace
Click the Replace button to replace the selected occurrence of the criteria in the Find
box with the criteria in the Replace with box, find the next occurrence of the criteria in
the Find box, and then stop. If you want to automatically replace all occurrences of the
search criteria in the worksheet, click the Replace All button.
Replace All
Click the Replace All button to replace all occurrences of the Find criteria in your
document with the Replace with criteria. If you want to review and selectively replace
each occurrence, click the Replace button.
Find Next
The Edit | Find Next command is used to find the next instance of a particular
number, word, or phrase in the worksheet. Each cell matching the search parameters
remains selected. If the Edit | Find command was not used initially, the Find and
Replace dialog opens so that you can define your search criteria.
Track Cursor
Cursor tracking provides connections between the worksheet and post maps, and
between multiple maps in the plot window. Links are graphical connections that
connect what you see on a map to the same location on another map, and to the
original post map data in the worksheet. This can be useful for finding bad data points,
and for showing the same point on multiple maps that have the same X and Y data
range.
101
Surfer
This command is also used to link post or contour maps to the worksheet. Select a
point in the plot window and the closest point in the worksheet will be highlighted.
3D surface and 3D wireframe maps cannot be used as the source map for cursor
tracking. A 3D map can be rotated to a bird’s eye view (field of view = 45°, rotation =
45°, tilt = 90°) to see the tracked cursor in the correct location.
The contour map (left) and shaded relief map (right) were
both created with the sample file, DEMOGRID.GRD. With the
track cursor command on, clicking on one map, displays the
tracking cursor on the other map in the appropriate location.
102
Chapter 3 – Data Files and the Worksheet
Cursor tracking must be enabled, and the worksheet containing the selected row must
have the X and Y data in the current X and Y columns. By default this is column A for
the X coordinates, and column B for the Y coordinates. If your X and Y post map data
columns are not in the default columns, click the Data | Assign XYZ Columns
command to assign new columns. The coordinates in the worksheet row must be
included within the map extents for the cursor to appear in the plot window.
In the plot, click near a point. In the worksheet, the data point nearest the
clicked posted point is highlighted.
103
Surfer
Format Menu
The worksheet Format menu controls worksheet formatting. This includes setting the
cell numeric format, alignment, and background colors, setting the column height, and
setting the row width.
Cell Properties
Cell numbers, alignment, or background color can be formatted by selectin a
worksheet cell and clicking the Format | Cell Properties command. The Cell Format
dialog will open, allowing you to set various formats.
The only formats that preserve cell-formatting information are Excel or SYLK SLK.
ASCII file formats (.CSV, .TXT, .DAT, .BNA, .BLN) do not preserve file format
information.
Number Page
Use the Number page to change the
numeric data display in the
worksheet. Number formatting has
no effect on a numeric text string
(numbers entered as text). For
example, an ASCII data file might
contain the numbers "8123"
(numbers surrounded by quotes)
which are read as text and not as a
number.
Type
Set the Type for the number format.
Fixed displays numbers as d.ddd. The number to the left of the decimal can vary. Set
the number to the right of the decimal in the Decimal Digits box.
Exponential displays numbers as d.ddde+dd. Set the number of digits to the right of
the decimal in the Decimal Digits box.
104
Chapter 3 – Data Files and the Worksheet
Currency displays fixed numbers with a currency symbol such as the dollar sign ($).
Decimal Digits
If the Type is set to Fixed, Exponential, or Currency, the Decimal Digits box is
available. Set the number of digits to display after the decimal in this box. For
example, if the Decimal Digits is set to 2, the number 3518 will be displayed as
3518.00 for Fixed, 3.52E+03 for Exponential, or $3518.00 for Currency.
Thousands Separator
If the Thousands separator box is checked, a comma appears every three digits to the
left of the decimal point.
Alignment Page
Use the Alignment page to align the cell
in one of four ways. By default, imported
ASCII files automatically align numbers to
the right and text to the left.
Horizontal
The Alignment page provides four
options for aligning text.
Center aligns text and numbers with the center of the cell.
Right aligns text and numbers with the right side of the cell.
105
Surfer
Background Page
Use the Background page to set the cell
background color for the selected cell.
Color
Click the None button to remove any
previously assigned background colors.
You can change the column width of selected cells by clicking the Format | Column
Width command or by using the mouse to resize the column. The Excel XLS or SYLK
SLK file format must be used to save the column width in the file since ASCII file
formats (.CSV, .TXT, .DAT, .BNA, .BLN) do not preserve file format information.
You can hide a column by moving the cursor to the left until the next dividing line is
reached.
106
Chapter 3 – Data Files and the Worksheet
To display hidden columns, press and hold the left mouse button at the right edge of
the hidden column and move the cursor to the right to widen the column.
Row Height
You can change the row height of selected cells by clicking Format | Row Height or
by using the mouse to size the row. The Excel XLS or SYLK SLK file format must be
used to save the row height and numeric format information with the file since ASCII
file formats (.CSV, .TXT, .DAT, .BNA, .BLN) do not preserve file format information.
You can hide a row by moving the cursor up until the next dividing line is reached.
To display hidden rows, press and hold the left mouse button at the bottom of the
hidden row and move the cursor down to stretch the row height.
107
Surfer
Data Menu
Selected cells of data are sorted or transformed using the worksheet Data menu
commands. The Data menu also contains a statistics option. Various statistical results
generated from the data can be saved in the worksheet. Coordinate and projection
information is assigned with Data menu commands.
Sort
The Data | Sort command
arranges data according to rank
in user-specified sort columns.
Sorting rank is based on
numbers, ASCII characters, and
punctuation. Sort numeric data,
text, or mixed columns. Sorting
specifications are made in the
Sort dialog.
Sort First By
The Sort First By option defines the primary column on which the rows are sorted. The
positions of the sorted rows are determined by the Ascending or Descending rank in
the Sort First By column.
Secondary Sort
When two or more rows have identical entries in the Sort First By column, the Sort
Next By column can further organize the data set. Duplicates in the Sort First By
Column are then sorted according to the rank in the Sort Next By column.
108
Chapter 3 – Data Files and the Worksheet
Sort Last By
The Sort Last By column can be used when the Sort Next By column contains
duplicates.
Ignore Case
Because sorting is based on an ASCII table, upper and lowercase letters are treated
differently. For example, "A" is sorted separately from "a." If the letters are to be
treated as the same during the sort, check the Ignore case box at the bottom of the
Sort dialog. When this box is checked, "A" is considered identical to "a" in the sorting
rank.
109
Surfer
Transform
Click the Data | Transform command to apply mathematical transformations to the
data. Valid math operators include addition (+), subtraction (-), multiplication (*), and
division (/) as well as a large library of built-in mathematical functions. Parentheses
should be used to override precedence. Parentheses can also be used for clarification.
Transform With
You can apply mathematical
transformations to columns, rows, or
cells. Select Column variables, Row
variables, or Cell variables from the
Transform with drop-down list. Click the
arrow to display the Transform with list.
The equation format varies depending on
this selection. Examples are given in
parentheses in the list.
Transform Equation
Type the formula into the Transform
equation box. Formulas consist of a Use the Transform dialog to apply math
destination column, row, or cell on the functions to data. Set any equations to
left side of the equation and a apply to data in the Transform dialog.
mathematical manipulation on the right
side of the equation. Click the down arrow to use previously entered equations.
110
Chapter 3 – Data Files and the Worksheet
If the transform method is by column, the range functions (sum, avg, std, rowmin and
rowmax) take column indices only, i.e., sum(A...C). If the transform method is by
variable rows, the range functions take row indices only, i.e., sum(_1..._3). If the
transform method is by variable cells, the range functions are not supported.
When you are calculating transformations on cells, the First row, Last row, First col,
and Last col options are not available.
Functions
Click the Functions >> button to display a list of predefined mathematical functions.
Click the Functions << button again to hide the list of predefined mathematical
functions.
111
Surfer
To use a function, place the cursor in the location to add a function, select a function
from the list, click the Insert button, and then replace the X in the function with a
column letter (A); underscore and row number (_1); or cell location (A1). Also, be
sure to use proper mathematical operators (+_*/) between the function and the rest
of the equation. The definition of the function is listed when the function is selected.
Insert
When the Functions are expanded, the Insert button is visible. Click the Insert button
to add the selected function to the Transform equation box. In the Transform equation
box, manually change the variable (i.e. X or Y) in the listed functions to a column
letter, row number (_1), or cell location.
The result is inserted into cell C2 with this equation. Only numeric cells are used for
calculations, so the destination column is left blank if the cells used in the equation
contain numbers or are blank.
112
Chapter 3 – Data Files and the Worksheet
113
Surfer
Spatial Filter
The Data | Spatial Filter command can be used to spatially filter the X, Y, and Z
coordinates. This can be useful when pre-filtering data before creating a post map,
variogram, or grid file and saving the data for use in other programs in the future. The
spatial filter can be used to allow duplicate removal and arbitrary exclusion with a
mathematical expression. Spatial filter specifications are made in the Spatial Filter
dialog.
Input Columns
The Input Columns
section indicates the
original X, Y and Z
columns. Select the
Input Columns in the X,
Y, and Z drop-down lists.
Click the arrow button to
see the drop-down list.
The Z column is optional Specify options to filter data in the Spatial Filter dialog.
and can be set to None if
the operation is for 2D (X, Y) coordinates only. If the Z Input Columns is set to None,
the Z Output Columns is not available.
Output Columns
The Output Columns section indicates the location where the filtered results of the X, Y
and Z columns are written. Select the Output Columns in the X, Y, and Z drop-down
lists. Click the arrow button to see the drop-down list. If the Z Input Columns is set to
None, the Z Output Columns is not available.
Filtered results are written to the original row and new columns as specified in the
Output Columns group. New data is added to the bottom of the worksheet to ensure
that the source and target points stay aligned on the same row.
114
Chapter 3 – Data Files and the Worksheet
Duplicate Data
The Duplicate Data section contains methods for defining and handling duplicate data
points. Duplicate data are two or more data points having nearly identical X, Y
coordinates (Z values may vary for these X, Y coordinates). Select the action for
duplicate data in the To Keep drop-down list. Enter the X Tolerance and Y Tolerance. If
a point is deleted (due to duplication or exclusion), the output cell is left blank.
To Keep
Duplicates are determined by moving from the lowest X value to the highest X value.
A datum only belongs to one set of duplicates.
The To Keep options specify which duplicate data points to keep and which to delete in
each set of duplicate points. Specify All, None, First, Last, Minimum X, Maximum X,
Median X, Minimum Y, Maximum Y, Median Y, Minimum Z, Maximum Z, Median Z,
Sum, Average, Midrange, or Random from the To Keep drop-down list.
115
Surfer
X and Y Tolerance
In addition to the To Keep options there are X Tolerance and Y Tolerance options. For
example, two points, A and B are duplicates if:
Using this definition, it is possible for points A and B to be "duplicates," for point B and
C to be "duplicates," but for A and C to not be "duplicates."
To use a stored function, click the next to the current function. This will display the
ten most recent functions used. The functions are stored in the registry, so the
equations are stored between Surfer sessions. You can also start typing the function
in the function box. If the function is in the ten function history, the entire function will
auto-complete.
116
Chapter 3 – Data Files and the Worksheet
Statistics
The Data | Statistics command calculates statistical values for a group of selected
numeric cells. Select an entire column or a continuous group of cells in a column to
use the Statistics command. If a rectangular block of rows and columns are selected,
the Statistics command calculates the statistics for each column separately. A
warning message appears if a group of cells cannot be used with the Statistics
command. Non-numeric cell entries (empty cells or text) are ignored in statistics
calculations.
117
Surfer
• Mean is the arithmetic average of the data values. It is the sum of the data values
divided by the number of data values.
• Median is the middle value among the data values. Half of the data values are
larger than the median and half are smaller than the median. When there are an
even number of data values the median is the average of the two middle values.
• First quartile (25th percentile) is the value such that one-fourth of the data values
are smaller than the quartile and three-fourths of the data values are larger than
the first quartile.
• Third quartile (75th percentile) is the value such that three-fourths of the data
values are smaller than the quartile and one-fourth of the data values are larger
than the third quartile.
• Standard error of the mean
• 95% confidence interval for the mean
• 99% confidence interval for the mean
• Variance
• Average deviation
• Standard deviation
• Coefficient of variation
• Coefficient of skewness
• Coefficient of kurtosis
• Kolmogorov-Smirnov goodness of fit for normal distribution
• Critical value of K-S statistic at 90% significance level
• Critical value of K-S statistic at 95% significance level
• Critical value of K-S statistic at 99% significance level
Data
The Data section is used to select Sample or Population statistics. Select Sample or
Population statistics, depending on whether the data represent a statistical sample or
the complete set of all possible members of a population.
118
Chapter 3 – Data Files and the Worksheet
Results
The Results section is used to show the statistics report in a window or copy the
results to a new location of the worksheet. Select Show in a window to write the
statistics results to a Statistics Results window. The results in this window can be
copied to the clipboard to paste to other locations.
Select Copy to worksheet to write the statics report to a new location in the
worksheet. Use the Starting in cell box to specify the cell for the upper left corner of
the statistics report. If the destination cells contain data, a warning is displayed that
data will be overwritten. Click OK to overwrite the data, or click Cancel to set a new
Starting in cell location.
Statistics Options
Statistic Description
First input row The First input row reports the first row number in the
selection. If the Labels in First Row option is checked, the First
Input Row is the second row in the selection.
Last input row The Last input row reports the last row number containing data
in the column.
Number of The Number of values indicates the number of numeric cells in
values the column.
Number of The Number of missing values indicates the number of non-
missing values numeric cells in the selection. If columns are selected by
pressing the column letters, the number of missing values
includes blank values up to the last used row in the worksheet,
which may be different from the last-used row in the selected
column. If cells are selected by highlighting specific cells, then
only the blank cells within the selection are counted.
Sum The Sum is the sum of all numeric cells in the column.
Minimum The Minimum indicates the minimum value in the column.
Maximum The Maximum indicates the maximum value in the column.
Range The Range indicates the range of the numeric values in the
column (Maximum – Minimum).
119
Surfer
Mean The Mean is the arithmetic average of the data values. The
mean is the sum of the data values divided by the number of
data values.
1 n
x= ∑ xi
n i =1
where:
n = number of data values
xi = ith data value
Median The Median is the middle value among the data values. Half of
the data values are larger than the median and half are smaller
than the median. When there is an even number of data
values, the median is the average of the two middle values.
First quartile The First quartile (25th percentile) is the value such that one-
(25th percentile) fourth of the data values are smaller than the quartile and
three-fourths of the data values are larger than the first
quartile.
Third quartile The Third quartile (75th percentile) is the value such that
(75th percentile) three-fourths of the data values are smaller than the quartile
and one-fourth of the data values are larger than the third
quartile.
Standard error of The Standard error of the mean is an estimate of the standard
the mean deviation of means that would be found if many samples of n
items were repeatedly collected from the same population.
SE = s / n
where:
s = sample standard deviation
n = number of data values (for a sample)
120
Chapter 3 – Data Files and the Worksheet
95% and 99% If CI is the value of the confidence interval reported by the
confidence worksheet, the range of values between the sample mean
interval for the minus CI and the sample mean plus CI is expected to include
mean the true mean of the underlying population 95% of the time
(for the 95% confidence interval) or 99% of the time (for the
99% confidence interval). This formula assumes that the data
set is sufficiently large for the central limit theorem to apply.
± t (n −1),α =.05 ( SE )
± t (n −1),α =.01 ( SE )
where:
tv, α = the value of the Student’s t distribution with v degrees
of freedom such that difference between the cumulative
probability function evaluated at t(v,α) and -t(v,α) is equal to
1- α
SE = standard error of the mean
Variance The population Variance is the average of the squared
deviations from the mean. The sample variance is the sum of
the squared deviations from the mean divided by one less than
the number of data values.
N
∑ (x − µ)
1
σ2 = i
2
Population Variance
N i =1
1 n
s2 = ∑ ( x i − x )2
Sample Variance
n − 1 i =1
where:
121
Surfer
Average deviation The Average deviation is the average of the difference between
the absolute values of data points and the mean.
∑ (x − µ)
1
MD = i
N
∑ (x − x)
1
MD = i
N
where:
σ = σ2
s = s2
where:
122
Chapter 3 – Data Files and the Worksheet
where:
σ = population standard deviation
s = sample standard deviation
µ = population mean x = sample mean
Coefficient of Coefficient of skewness is a measure of asymmetry in the
skewness distribution. A positive skew indicates a longer tail to the right,
while a negative skew indicates a longer tail to the left. A
perfectly symmetric distribution, like the normal distribution,
has a skew equal to zero. For small data sets, this statistic is
an unreliable estimate of the population coefficient of
skewness.
N
∑ (x − µ)
1
γ1 = 3
Nσ 3
i
Population Skew i =1
∑ (x − x)
n
g1 =
3
(n − 1)(n − 2) s 3
i
Sample Skew i =1
where:
σ = population standard deviation
s = sample standard deviation
123
Surfer
Population Kurtosis
1 N
4
γ2 =
Nσ
4 ∑ (x
i =1
i − µ) − 3
Sample Kurtosis
n(n + 1) n
3(n − 1) 2
g 2 = ∑ (xi − x ) −
4
where:
σ = population standard deviation
s = sample standard deviation
124
Chapter 3 – Data Files and the Worksheet
Critical value of The Critical value of K-S statistic at 90% significance level,
K-S statistic at Critical value of K-S statistic at 95% significance level, Critical
90%, 95%, or value of K-S statistic at 99% significance level are indicators of
99% significance normal distributions. For example, if a sample collected from a
level population has a normal frequency distribution, the K-S
statistic for that sample is less than the critical value 90, 95, or
99 percent of the time. If the K-S statistic is larger than the
critical value, the hypothesis that the underlying population is
distributed normally with a mean of x and a standard deviation
of s should be rejected.
Statistics References
Gilbert, Richard O., (1987), Statistical Methods for Environmental Pollution Monitoring,
Van Nostrand Reinhold, New York.
King, Ronald S. and Bryant Julstrom, (1982), Applied Statistics Using the Computer,
Alfred Publishing Company, Sherman Oaks, California.
Press, William H. et al, (1992), Numerical Recipes in C, Cambridge University Press,
New York.
Spiegel, Murray R. (1997), Schaum’s Outline of Theory and Problems of Statistics,
McGraw-Hill, New York.
Sokal, Robert R. and F. James Rohlf, (1981), Biometry: Principles and Practices of
Statistics in Biological Research, Freeman and Co, New York.
Zar, Jerrold H., (1974), Biostatistical Analysis, Prentice Hall, Englewood Cliffs, New
Jersey.
The assigned columns are used as the default X, Y, and Z columns for commands that
require column input, such as the Grid | Data and Map | New | Post Map
commands. The track cursor command requires that the X, Y, and Z columns be
specified properly in order to display the current coordinates when a point is clicked in
another window.
Indicators in the worksheet column headers display the current columns. When the
coordinates are changed in the Assign XYZ Columns dialog, the X, Y, and Z
indicators move to the specified columns. If there is no actual data in the user
125
Surfer
assigned columns, Surfer will assign columns that contain data to the coordinate
columns.
When a .GRD file is created using the Grid | Data command, the .GSR2 file for the
data is read and a new .GSR2 file is created for the grid. The grid has the same
coordinate system as the original data file. When a map is created from either the
data file or the .GRD file, the .GSR2 file is read and the map layer automatically has
the correct coordinate system.
126
Chapter 3 – Data Files and the Worksheet
To change coordinates:
4. Assign the Source Coordinate System by clicking the button to open the
Assign Coordinate System dialog. The Source Coordinate System is the system
that your X, Y coordinate data is currently using. The Assign Coordinate System
dialog is discussed in detail in Chapter 15 – Coordinate Systems.
5. Assign the Target Coordinate System by clicking the button to open the
Assign Coordinate System dialog. The Target Coordinate System is the new
coordinate system that you want to use to project your X, Y coordinate data. The
Assign Coordinate System dialog is discussed in detail in Chapter 15 –
Coordinate Systems.
127
Surfer
Save As Dialog
Click the File | Save As
command in the plot or
worksheet document to open
the Save As dialog.
Specify the save location, file name, and file
type in the Save As dialog.
Save In
The Save In field shows the current directory. Click the down arrow to see the
directory structure and click on the folders to change directories.
Button Shortcuts
The buttons to the right of the Save in field allow you to create new folders and
change the view of the file list.
File List
The File list displays the files using the extension specified in the Save as type box. A
file can be overwritten by selecting it from the file list.
File Name
The File name box displays the name of the selected file, or type in the path and file
name of the file to be saved.
Save As Type
Select the file format in the Save as type drop-down list.
128
Chapter 3 – Data Files and the Worksheet
File Types
The available file types to save as or export from a worksheet are BLN, BNA, CSV,
DAT, SLK, TXT. Select the desired Save as type.
If the extension is not included in the file name the format is determined by the Save
as type field. For example, if the name MYDATA is typed into the file name field and
the Save as type field is set to Excel Spreadsheet (*.XLS), the file is saved as
MYDATA.XLS in Excel format.
The file can be saved with any extension by enclosing the file name in double quotes.
The file is saved with the name and extension typed in the file name box, but it is
saved in the format specified in the Save as type field. For example, type the name
(with quotes) " MYDATA.ABC" in the file name box. If the Save as type field is set to
Comma Separated Variables (*. csv), the file is saved as MYDATA.ABC in the .CSV
format.
129
Surfer
Page Setup
Before printing the worksheet, the page format of the worksheet can be set through
File | Page Setup. The Page Setup dialog controls items such as printing headers
and footers, centering the data on the page, showing grid lines, etc. There are three
pages in the Page Setup dialog: Page, Margins, and Options. There is a Printer
button at the bottom of the dialog that allows you to set the default printer regardless
of which page is selected.
Click the File | Page Setup command in the worksheet to open the Page Setup
dialog. The worksheet Page Setup dialog has three pages.
Page Tab
The Page tab controls the paper size and source options.
Paper
Use the Paper section to choose
the paper Size and Source for
the active printer.
Size
Click the down arrow next to the
paper Size to change the size of
the paper. The paper size
options available for your
printer are listed in the drop-
down list.
Source
If your printer has multiple print
trays, choose the paper Source
by clicking the down arrow.
Orientation
The Orientation section controls
whether the page is set to Portrait Change paper properties in the Page Setup
or Landscape mode. Select Portrait dialog on the Page tab.
to have a vertical page. Select
Landscape to have a horizontal page.
130
Chapter 3 – Data Files and the Worksheet
Scaling
The Scaling section controls the printed size of the worksheet. There are two options
with Scaling: Adjust to and Fit to.
Adjust To
The Adjust to ___ % full size option sets the percent of full size that the worksheet will
print. The arrow buttons are used to scroll up or down from 100% (full size), or values
can be typed into the box. The Adjust to ___ % full size setting is independent of the
Fit to option.
Fit To
The amount of data in the worksheet determines how many pages are required to
print the worksheet. The Fit to __ page(s) across by __ page(s) down option tells the
program to print the worksheet at 100% scale or less. This option does not
automatically scale the printed worksheet greater than 100%. This option is most
useful when the worksheet is large and the number of printed pages needs to be
limited.
Printer
The active printer can be changed by clicking the Printer button at the bottom of the
Page Setup dialog.
Margins Tab
Use the Margins page in the Page Setup dialog to set page margins, header and
footer positions, and centering.
Margins
Use the Margins (inches) group to set the page margins for all sides of the printed
page. Set the Left, Right, Top, and Bottom values in inches to any limits the printer
will allow. The margins are for the worksheet printout and are independent of the
settings used for Headers or Footers.
131
Surfer
Center on Page
The Center on Page group
options automatically center
the printout Horizontally,
Vertically, or both. If neither
option is selected, the
worksheet prints in the upper
left corner of the page.
Printer
The active printer can be changed by clicking the Printer button at the bottom of the
Page Setup dialog.
132
Chapter 3 – Data Files and the Worksheet
Options Tab
Use the Options page in the
worksheet Page Setup
dialog to set grid lines, page
order, and content of the
header and footer.
Print
The Print section controls
how the worksheet
information is printed.
Gridlines
Check the Gridlines option to
draw grid lines separating
each column and row.
Page Order
The Page Order section controls the order in which multiple pages are printed. The
Across and then down option prints from left to right first, and then moves down and
prints left to right again. The Down and then across option prints the worksheet from
top to bottom first, and then moves to the right and prints top to bottom again.
Header/Footer
The Header/Footer group controls the type of information included in the worksheet
data print out. The plot window does not have header/footer options. The Header
appears at the top of the page, and the Footer appears at the bottom of the page. The
header and footer are spaced from the edge of the page based on the From Edge
133
Surfer
option of the Margins page. Descriptive text can be typed in the Header and Footer
boxes, or click the arrows to the right of the boxes and click the items in the drop-
down list.
Print
Click the File | Print command, or click the button to print the contents of the
worksheet to the active printer or to a .PRN file. To control the display of data on the
printed page, refer the File | Page Setup command. While the worksheet is spooling,
a dialog indicates that printing is progressing.
Printer
The Printer section contains options to specify the printer. The printer Status, Type,
Where, and Comment are listed below the printer Name.
134
Chapter 3 – Data Files and the Worksheet
Name
The default system printer is
listed in the Name field. If
more than one printer is
installed on the computer,
use the down arrow to the
right of the printer name to
select a different printer.
Properties
Click the Properties button
to set printer specific
properties. For information
on specific printer settings,
see the owner's manual for
the printer.
Use the Print dialog to specify the printing options.
Print to File
The Print to file check box allows you to print the data to a .PRN file. .PRN files are
ASCII text files. When this option is checked, click OK in the Print dialog after setting
other printing options. The Print to File dialog will open. Enter a path and file name in
the Print to File dialog, and click Save.
Print Range
The Print range options control how the worksheet pages are printed.
• All prints all the pages that contain data.
• Pages prints the pages specified. Enter the starting page in the from box. Enter
the ending page in the to box.
• Selection prints the selected worksheet cells.
Copies
Specify the number of copies to print in the Number of copies box. If two or more
copies of multiple page documents are printed, check the Collate box to separate the
copies into packets. Note that some printers do not allow multiple copies.
Collate
Check the Collate box to collate the pages when multiple page documents are printed
two or more times.
135
Surfer
Worksheet Specifications
The following technical specifications for the worksheet include the number of cells
allowed in the worksheet and the nature of the numbers allowed in the worksheet.
• Maximum number of rows in a worksheet: 1 billion
• Maximum number of columns in a worksheet: 1 billion
• Maximum numeric precision: 15 digits (Counting the digits before and after the
decimal place)
• Maximum numeric resolution: 2.22E-16 (The smallest detectable difference
between two numbers)
• Maximum absolute value: 1.79769E+308 (The largest value that can be
represented)
• Minimum absolute value: 2.22507E-308 (The smallest value that is different from
zero)
• Double precision floating-point numbers can only represent approximately 15
significant decimal digits.
• Approximate memory requirements for unformatted numeric data: 10.5 bytes per
cell + 24 bytes per column
Example 1
10,000 rows of numbers in 3 columns
30,000 cells x 10.5 bytes/cell = 315,000 bytes (308 Kbytes)
3 columns x 24 bytes/column = 72 bytes
TOTAL MEMORY NEEDED FOR DATA: 308 Kbytes
Example 2
3 rows of numbers in 10,000 columns
30,000 cells x 10.5 bytes/cell = 315,000 bytes (308 Kbytes)
10,000 columns x 24 bytes/column = 240,000 bytes (234 Kbytes)
TOTAL MEMORY NEEDED FOR DATA: 542 Kbytes
136
Chapter 4
Creating Grid Files
Introduction to Grid Files
Contour maps, image maps, shaded relief maps, vector maps, wireframes, and
surfaces all require grids for their generation in Surfer. A grid is a regular,
rectangular array of values. The Grid | Data command provides you with several
methods for generating a grid file .GRD from your XYZ data. Surfer can also use
USGS .DEM, GTopo30 .HDR, SDTS .DDF or DTED .DT* grid files directly. This means
that you do not have to go through the gridding process if you already have a .DEM,
.HDR, .DDF, or .DT* file.
A grid is a rectangular region comprised of evenly spaced rows and columns. The
intersection of a row and column is called a grid node. Rows contain grid nodes with
the same Y coordinate, and columns contain grid nodes with the same X coordinate.
Gridding generates a Z value at each grid node by interpolating or extrapolating the
data values.
Grid file columns and rows are sometimes referred to as X grid lines and Y grid lines,
respectively. In fact, when you produce a wireframe from a grid file, the lines that
make up the map actually represent the X and Y grid lines. The intersection of the
grid lines define the location of the grid nodes on the wireframe, and the height of the
surface at each grid node is proportional to the Z value assigned to that node.
When XYZ data are collected on regular intervals, you may produce a grid file that
uses the Z values directly and does not interpolate the values for the grid nodes.
These procedures are explained in the Producing a Grid File from a Regular Array of
XYZ Data section of this chapter.
137
Surfer
A Gridding Example
Consider the scenario of producing a contour map of water table depth given well data
collected over a region. The well locations are not regularly spaced over the area of
interest. If you provide Surfer with the locations of the wells (the XY coordinates) and
the depth to the water table (the Z value) in the form of an XYZ data file, Surfer can
produce a grid file from the original data and a grid-based map from the gridded data.
The following steps show the normal progression from a data file, to a grid file, to a
contour map.
138
Chapter 4 – Creating Grid Files
Click the Grid | Data command to display the Open Data dialog. Select a data file
and click Open to display the Grid Data dialog.
139
Surfer
Data Columns
Individually specify the columns for the X data, the Y data, and the Z data. Surfer
defaults to X: Column A, Y: Column B, and Z: Column C. Your data can be in any three
columns, however. Click the down arrow on each box and select the appropriate
column for each variable. If the data file was selected from the Grid Info section in the
Open Data dialog, if XYZ columns have been assigned in the worksheet, these
columns will be used in the Data Columns section.
All gridding methods require at least three non-collinear data points, organized into
XYZ data files. Some methods require more data points. For example, a higher-order
polynomial fit needs more than three data points because there must be at least as
many data points as there are degrees of freedom.
Refer to Chapter 3 – Data Files and the Worksheet for more information on assigning
XYZ columns in the worksheet.
Filter Data
You can filter the data before gridding based on a predefined filter or based on a user-
defined equation by clicking the Filter Data button. The Filter dialog opens.
140
Chapter 4 – Creating Grid Files
In the Filter dialog, you can choose the type of duplicate data to use in the gridding
process from the To Keep drop-down list. The X Tolerance and Y Tolerance boxes set
the distance, in data units, that define whether or not the data are duplicates. If the
data do not share identical coordinates, but you would like close-by points to be
considered duplicates, use this setting.
To set up rules for excluding data when gridding, use the Data Exclusion Filter. The
Data Exclusion Filter can exclude data based on X, Y, or Z values or by a number in
another column of the worksheet.
To use a stored function, click the next to the current function. This will display the
ten most recent functions used. The functions are stored in the registry, so the
equations are stored between Surfer sessions. You can also start typing the function
in the function box. If the function is in the ten function history, the entire function will
auto-complete.
Refer to Chapter 3 – Data Files and the Worksheet for more information on data
exclusion and filtering.
View Data
If you are unsure of which columns contain your XYZ data, click the View Data button
to see the data file in a worksheet format. If you get an Insufficient data (3 or more
XYZ triplets required) error, use View Data to make sure that all three columns of data
are right aligned. If one of the columns is left aligned, the data are text, not numbers.
You can also use the data view to determine the appropriate columns for the X, Y, and
Z values.
Statistics
Click the Statistics button to display a Data Statistics Report with information based on
the selected X, Y, and Z columns.
Grid Report
Check the Grid Report box to create a gridding report that includes all the gridding
parameters used to generate a grid. This report also includes statistics. You can access
the statistics section of the gridding report in the grid node editor by clicking the
Options | Grid Info command or in the plot window by clicking the Grid | Grid Info
command.
141
Surfer
Cross Validate
Click the Cross Validate button to perform cross validation on your data. Cross
validation is an objective way of assessing the gridding parameters for your data set.
After clicking the Cross Validate button, the Cross Validation dialog opens. Set any
options and click OK to perform the cross validation. Refer to the Cross Validation
section of this chapter for more information on the various options.
type a path and file name, or click the button to browse to a new path and enter
a file name in the Save Grid As dialog.
Grid limits define the X and Y extent of contour maps, image maps, shaded relief
maps, vector maps, 3D wireframes, and 3D surfaces created from grid files. When
creating a grid file, you can set the grid limits to the X and Y extents you want to use
for your map. Once a grid file is created, you cannot produce a grid-based map larger
than the extent of the grid file. If you find you need larger grid limits, you must regrid
the data. You can, however, read in a subset of the grid file to produce a map smaller
than the extent of the grid file.
142
Chapter 4 – Creating Grid Files
By defining the grid limits and the number of rows and columns, the Spacing values
are automatically determined as the 7
distance in data units between adjacent
rows and adjacent columns.
6
Grid File Rows
143
Surfer
Grid Density
Grid density is usually defined by the number of columns and rows in the grid, and is a
measure of the number of grid nodes in the grid. Higher grid densities (smaller
Spacing and a larger # of Lines) increase the smoothness in grid-based maps.
However, an increase in the number of grid nodes proportionally increases the
gridding time, drawing time, and the grid file size. You can have up to 32,767 rows
and columns in a grid file. It is likely your computer will run out of memory before
reaching the maximum grid size. The primary use for the large grid size maximum is
to allow grids with extreme aspect ratios to be created.
The larger the density of grid nodes in the grid, the smoother the map that is created
from the grid. Contour lines and XY lines defining a wireframe are a series of straight-
line segments. More X and Y lines in a grid file result in shorter line segments for
contours or wireframe maps. This provides a smoother appearance to contour lines on
a contour map or smoother appearing wireframe.
Although highly dense grid files can be created, time and space are practical limits to
the number of grid nodes you may want to create in a grid file. The grid density limit
is based on the amount of available memory in your computer and the size of the data
file used to create the grid. Limited memory, very large data files, very dense grids, or
any combination of these factors can greatly increase gridding time. When gridding
begins, the status bar provides you with information about the estimated gridding time
to complete the task. If gridding time is excessive, click in the plot window to cancel
the gridding operation.
144
Chapter 4 – Creating Grid Files
• A 20,000 x 20,000 grid will require 20000*20000*8 = 3.2 GB, which is more than
a 32-bit operating system can address. A 64-bit operating system will be able to
grid this file, but it may take a long time to do so.
You can grid the data with the Grid | Data command at any desired density. Then,
increase or decrease the density using the Grid | Spline Smooth, Grid | Extract, or
Grid | Mosaic commands.
Examples
Consider these examples. The
data range from 0 to 25 in the Y
dimension and 0 to 10 in the X
Two different Grid Line Geometry examples are
dimension. The two examples use
shown here. These grids are based on the same
different numbers of grid lines, or
data file. The coordinates range from zero to 10 in
grid spacing, during gridding. The the X dimension and zero to 25 in the Y dimension.
145
Surfer
In the example on the left, the grid Spacing is set approximately equal in the X and Y
dimensions (one unit each). This results in a different number of grid lines in the X an
Y dimensions.
In the example on the right, the same # of Lines are specified in the two dimensions.
This results in an unequal spacing in data units in the two dimensions.
This shows the Grid Line Geometry information for the 11 by 26 grid. The
grid line spacing values are set to one, resulting in a different number
of grid lines in the X and Y dimensions.
This shows the Grid Line Geometry information for the 5 by 5 grid. The
number of lines is equal, resulting in different spacing
in the X and Y dimensions.
Cross Validate
Generally, cross validation can be considered an objective method of assessing the
quality of a gridding method, or to compare the relative quality of two or more
candidate gridding methods. In Surfer, cross validation can be used with all gridding
methods. While cross validation can be used to select a gridding method, the results
can also be used to assess the spatial variation in gridding quality and to guide data
sampling.
A generalized discussion of cross variation is given here. Refer to one of the many
geostatistics books for more information. In the listed references, much of the
discussion concerns kriging, but the generalized discussion applies to all of the
gridding methods in Surfer.
146
Chapter 4 – Creating Grid Files
Then, the first observation is put back into the data set and the second observation is
removed from the data set. Using the remaining data (including the first observation),
and the specified algorithm, a value is interpolated at the second observation location.
Using the known observation value at this location, the interpolation error is computed
as before. The second observation is put back into the data set and the process is
continued in this fashion for the third, fourth, fifth observations, etc., all the way
through up to and including observation N. This process generates N interpolation
errors. Various statistics computed for the errors can be used as a quantitative,
objective measure of quality for the gridding method.
147
Surfer
Number of random points to validate allows you to specify the number of cross
validation points. By default, this value is equal to the total number of observations.
For large and very large data sets this values should be 1,000 or more to ensure a
relatively stable set of error statistics. Note, the entire data set is used through-out
the cross validation process, not just the random subset. The random subset merely
identifies the locations at which cross validation errors are computed. Also, note that
the random subset is determined without replacement, using a random number
generator that is randomly initialized for every execution; thus, the random subset
may be different every time cross validation is run.
148
Chapter 4 – Creating Grid Files
The first three values are the X, Y, and Z values from the original data file of each
validation point. The fourth column, titled ID is the line number from the original data
file of the validation point. The next two columns are the estimated and residual
values. The nData column contains the total number of original data points.
Statistics Note
Under most interesting statistical models, the cross validation errors are not
statistically independent: the estimate at one observation location uses much of the
same information as the estimate at a neighboring observation location. As such,
standard hypothesis testing and test of statistical significance are not valid. A
discussion of this point can be found in the cross validation reference, Kitanidis
(1997).
149
Surfer
Search
Search options control which data points are considered by the gridding operation
when interpolating grid nodes. To access the search options, if available with the
gridding method, click the Advanced Options button in the Grid Data dialog. If
searching is available with the selected gridding method, a Search page appears in
the advanced options dialog. However, in some cases a few of the search options,
such as Anisotropy, are available on the gridding method's General page. If search
options are not available for a gridding method, this means that all the data points
from the data file must be used when calculating the grid.
150
Chapter 4 – Creating Grid Files
151
Surfer
removed from the grid node is still used when calculating the grid node value, it
carries relatively little weight compared to data points close to the grid node.
When data points are evenly distributed over the map area, the No Search (use all of
the data) option is adequate. When observations are heavily clustered within the map
area, a four-sector or eight-sector search is recommended. These types of searches
are also appropriate when you have data collected on widely spaced traverses. A one-
sector search might attempt to estimate grid nodes using data points from a single
direction. This might generate unrealistic slopes between traverses, and unrealistic
polygonal shaped plateaus across the map area. Four- or eight- sector searches
should eliminate or reduce this effect.
Some gridding methods construct an internal matrix based on the number of search
points (such as kriging and radial basis function). This matrix can consume a large
amount of memory if too many search points are used. For these methods, the
default cut off for using all data, No Search (use all of the data), versus searching is
250 data points. If there are more than 250 points, Surfer defaults to performing a
search. If there are 250 or fewer data points, Surfer selects the No Search (use all of
the data) option by default. The absolute maximum number of data points that can be
used with the No Search (use all of the data) option with these methods is 750. If you
have more than 750 points, the No Search (use all of the data) option is disabled.
Search Rules
Search rules define the number of points included in interpolating a grid node value.
Uncheck the No Search (use all of the data) option to enable the search rules edit
controls. Search rules limit the number of data points to include in the interpolation at
each grid node. Search rules work in concert with the search ellipse. The search
ellipse specifies the size of the local neighborhood in which to look for data, and the
search rules specify the number of points to actually consider within the neighborhood.
If the number of data points defined by the Minimum number of data in all sectors is
not found within the Search Ellipse distance, the blanking value is assigned at the grid
node. Blanking values indicate that insufficient data existed to satisfy the search
criteria at that particular location. Blanked grid nodes truncate contour lines on
contour maps, and produce low flat regions on wireframes.
152
Chapter 4 – Creating Grid Files
The Maximum number of data to use from EACH sector value specifies the number of
points to be used from each sector. If additional points are found inside the search
range, the points are selected based on their proximity to the grid node. The number
of points from each sector cannot be larger than the number of points from all sectors.
Blank Nodes
Blank node if more than this many sectors are empty assures that if more empty
sectors than this value are encountered, the blanking value is assigned at the grid
node.
Search Ellipse
The Search Ellipse defines the local neighborhood of points to consider when
interpolating each grid node. This defines the distance in data units from the grid
node that Surfer looks to find data points when calculating grid nodes. Data points
outside the search ellipse are not considered during grid node interpolation.
Elliptical searches do not impart extra weight to data points in the various directions,
but do search farther along one ellipse axis. The default Search Ellipse is circular,
meaning that Surfer looks the same distance in all directions.
Search ellipses are specified by defining the ellipse radii and the angle for the ellipse.
153
Surfer
154
Chapter 4 – Creating Grid Files
Although not required, in most cases it works well to set the search ellipse ratio and
direction to coincide with the anisotropy ratio and direction.
Anisotropy
Natural phenomena are created by physical processes. Often these physical processes
have preferred orientations. For example, at the mouth of a river the coarse material
settles out fastest, while the finer material takes longer to settle. Thus, the closer one
is to the shoreline the coarser the sediments while the further from the shoreline the
finer the sediments. When interpolating at a point, an observation 100 meters away
but in a direction parallel to the shoreline is more likely to be similar to the value at
the interpolation point than is an equidistant observation in a direction perpendicular
to the shoreline. Anisotropy takes these trends in the data into account during the
gridding process.
Anisotropy is also useful when data sets use fundamentally different units in the X and
Y dimensions. For example, consider plotting a flood profile along a river. The X
coordinates are locations, measured in miles along the river channel. The Y
coordinates are time, measured in days. The Z values are river depth as a function of
location and time. Clearly in this case, the X and Y coordinates would not be plotted
on a common scale, because one is distance and the other is time. One unit of X does
not equal one unit of Y. While the resulting map can be displayed with changes in
scaling, it may be beneficial to apply anisotropy as well.
155
Surfer
Depth
-60.00
Distance
ratio greater than four is considered 0.00
Example -80.00
NOTE: Unless there is a good reason to use an anisotropy ratio, you should accept the
default value of 1.0.
156
Chapter 4 – Creating Grid Files
For each different gridding method, anisotropy might be specified in a slightly different
manner.
If your grid is not dense enough, the breakline or fault will not show very well in the
map. If you cannot see any indication of the breakline or fault (i.e. contours do not
bend properly), regrid the data with a denser grid.
To include the breakline or fault as a line on your map, select the map and use the
Map | Add | Base Layer. If the grid file used to create a contour map contains a
fault, the contour properties General page has a Fault Line section, so you do not need
to use a base map to show faults on contour maps.
The map on the left is created from DEMOGRID.GRD using default settings.
The center map is created with a fault. The right map is created with a breakline.
Click the button next to File Containing Breaklines to select the blanking .BLN
file containing the breaklines. In the Open dialog, specify the blanking file and
click Open. The blanking file will be displayed in the File Containing Breaklines. The
number of traces and the number of total vertices are displayed under the file
157
Surfer
name. Click the Clear button to delete the file name to exclude the breaklines from
the gridding process. Breaklines must contain 3 columns: X, Y, and Z. If the Z
column is missing, the .BLN file cannot be used as a breakline.
Click the button next to File Containing Fault Traces to select the blanking .BLN
file containing the fault traces. In the Open dialog, specify the blanking file and
click Open. The blanking file will be displayed in the File Containing Fault Traces.
The number of traces and the number of total vertices are displayed under the file
name. Click the Clear button to delete the file name to exclude the fault traces
from the gridding process. Faults only contain 2 columns: X and Y.
Breaklines
A breakline is a three-dimensional boundary .BLN file that defines a line with X, Y, and
Z values at each vertex. When the gridding algorithm sees a breakline, it calculates
the Z value of the nearest point along the breakline, and uses that value in
combination with nearby data points to calculate the grid node value.
Surfer uses linear interpolation to determine the values between breakline vertices
when gridding. Breaklines are not barriers to information flow, and the gridding
algorithm can cross the breakline to use a point on the other side of the breakline. If a
point lies on the breakline, the value of the breakline takes precedence over the point.
Breakline applications include defining streamlines, ridges, and other breaks in the
slope.
158
Chapter 4 – Creating Grid Files
Gridding algorithm searches use the specified anisotropy ratio when determining the
distance to the breakline. Breaklines are ignored when determining this distance. The
use of complex breaklines or a large number of breaklines slows the gridding process
significantly. Breaklines cannot cross other breaklines or faults. Breaklines are not
allowed with the No Search (use all of the data) search method for any gridding
method.
You can create a blanking file to define a breakline in the Surfer worksheet or any
text editor. Enter a header containing the number of vertices in the breakline, followed
by the X, Y, Z coordinates of each vertex, one per line. These blanking files do not
require the blank inside (1) or blank outside (0) flag. The blanking flag is ignored in a
breakline file.
Breakline Example
An example of a breakline .BLN format is:
159
Surfer
Faults
In Surfer, a fault is a two-dimensional blanking file defining a line acting as a barrier
to information flow when gridding. When gridding a data set, data on one side of a
fault is not directly used when calculating grid node values on the other side of the
fault.
If the fault line is a closed polygon, the gridding algorithm grids data in the interior of
the polygon. If the fault line is not a closed polygon, the gridding algorithm can
search around the end of the fault to see a point on the other side of the fault, but this
longer distance reduces the weight of the point in interpolating the grid node value. If
a point lies directly on the fault line, random round-off error determines which side of
the fault captures the point.
You can create a blanking file to define a fault in the Surfer worksheet or any text
editor. Enter a header containing the number of vertices in the breakline, followed by
the X, Y coordinates of each vertex, one per line.
Faults consume memory and increase gridding time in proportion to the square of the
number of fault segments. In addition, they may cause some gridding methods to fail.
With Minimum Curvature, the failure is due to lack of convergence. The only grid file
format that retains fault information is the Surfer 7 Binary Grid file .GRD format. If
you use another grid file format, the faulting information is lost. If any grid
manipulations are done on the grid file, the fault is removed.
Fault Example
An example of a fault .BLN format is:
160
Chapter 4 – Creating Grid Files
Because Surfer maps are created from gridded data, the original data are not
necessarily honored in the grid file. When you post the original data points on a
contour map, some of the contour lines might be positioned "wrong" relative to the
original data. This happens because the locations of the contour lines are determined
solely by the interpolated grid node values and not directly by the original data. Some
methods are better than others in preserving your data, and sometimes some
experimentation (i.e. increasing grid density) is necessary before you can determine
the best method for your data. See the Gridding Methods section of this chapter for
more information on each method.
• Inverse Distance to a Power is fast but has the tendency to generate "bull's-eye"
patterns of concentric contours around the data points. Inverse distance to a
power does not extrapolate Z values beyond the range of data.
• Kriging is one of the more flexible methods and is useful for gridding almost any
type of data set. With most data sets, kriging with the default linear variogram is
quite effective. In general, we would most often recommend this method. Kriging
is the default gridding method because it generates a good map for most data
sets. For larger data sets, kriging can be rather slow. Kriging can extrapolate grid
values beyond your data's Z range.
• Minimum Curvature generates smooth surfaces and is fast for most data sets but
it can create high magnitude artifacts in areas of no data. The Internal Tension
and Boundary Tension allow you control over the amount of smoothing. Minimum
curvature can extrapolate values beyond your data's Z range.
• Modified Shepard's Method is similar to inverse distance to a power but does not
tend to generate "bull's eye" patterns, especially when a smoothing factor is used.
Modified Shepard's method can extrapolate values beyond your data's Z range.
• Natural Neighbor generates good contours from data sets containing dense data in
some areas and sparse data in other areas.
161
Surfer
It does not generate data in areas without data. Natural neighbor does not
extrapolate Z grid values beyond the range of data.
• Nearest Neighbor is useful for converting regularly spaced (or almost regularly
spaced) XYZ data files to grid files. When your observations lie on a nearly
complete grid with few missing holes, this method is useful for filling in the holes,
or creating a grid file with the blanking value assigned to those locations where no
data are present. Nearest Neighbor does not extrapolate Z grid values beyond the
range of data.
• Polynomial Regression processes the data so that underlying large-scale trends
and patterns are shown. This is used for trend surface analysis. Polynomial
regression is very fast for any amount of data, but local details in the data are lost
in the generated grid. This method can extrapolate grid values beyond your data's
Z range.
• Radial Basis Function is quite flexible. It compares to kriging since it generates
the best overall interpretations of most data sets. This method produces a result
quite similar to kriging.
• Triangulation with Linear Interpolation is fast. When you use small data sets,
triangulation with linear interpolation generates distinct triangular faces between
data points. Triangulation with linear interpolation does not extrapolate Z values
beyond the range of data.
• Moving Average is most applicable to large and very large data sets (e.g. > 1,000
observations). Moving Average extracts intermediate-scale trends and variations
from large, noisy data sets, and it is fast even for very large data sets. This
gridding method is a reasonable alternative to Nearest Neighbor for generating
grids from large, regularly spaced data sets.
• Data Metrics is used to create grids of information about the data.
• Local Polynomial is most applicable to data sets that are locally smooth (i.e.
relatively smooth surfaces within the search neighborhoods). The computational
speed of the method is not significantly affected by the size of the data set.
The following figure shows a comparison of all the gridding methods applied to the file
DEMOGRID.DAT. This data file contains 47 data points irregularly distributed over the
extent of the map. The defaults were accepted for all the gridding methods.
162
Chapter 4 – Creating Grid Files
7 7
6 6
5 5
4 4
3 3
2 2
1 1
0 0
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
Inverse Distance to a Power Kriging
7 7
6 6
5 5
4 4
3 3
2 2
1 1
0 0
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
Minimum Curvature Modified Shepard's Method
7 7
6 6
5 5
4 4
3 3
2 2
1 1
0 0
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
Natural Neighbor Nearest Neighbor
This is a comparison of the different gridding methods. For these examples, the same
file, demogrid.dat, was used. All the defaults for the various methods were accepted.
This data set contains 47 data points, irregularly spaced over the extent of the map. The
data point locations are indicated with dots on the maps.
163
Surfer
7 7
6 6
5 5
4 4
3 3
2 2
1 1
0 0
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
6 6
5 5
4 4
3 3
2 2
1 1
0 0
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
6 6
5 5
4 4
3 3
2 2
1 1
0 0
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
This is a comparison of the different gridding methods. For these examples, the same
file, DEMOGRID.DAT, was used. All the defaults for the various methods were accepted.
This data set contains 47 data points, irregularly spaced over the extent of the map. The
data point locations are indicated with dots on the maps.
164
Chapter 4 – Creating Grid Files
It is recommended that you try each of the different methods, accepting the defaults,
in much the same fashion as you have seen here. This gives you a way to determine
the best gridding method to use with a data set.
• With DEMOGRID.DAT, Kriging, Minimum Curvature, Natural Neighbor, and Radial
Basis Function all produced acceptable contour maps with smooth appearance.
• Inverse Distance to a Power and Modified Shepard's Method both tended to
generate "bull's eye" patterns.
• With Triangulation with Linear Interpolation, there are too few data points to
generate an acceptable map, and this explains the triangular facets apparent on
the contour map.
• Nearest Neighbor shows as a "blocky" map because the data set is not regularly
spaced and is therefore a poor candidate for this method.
• Polynomial Regression shows the trend of the surface, represented as a tilted
plane.
• Due to the small number of data in DEMOGRID.DAT, the Moving Average method
is not applicable. The results of using this method with an inadequate data set are
shown as discontinuities are created as data are captured and discarded by the
moving search neighborhoods.
• Data Metrics can show many different types of information about the data and
about the gridding process, depending on which metric is selected. In this case,
the median distance metric was selected, and it shows the median distance
between each grid node and the original 47 data points.
• Local Polynomial models smooth local variation in the data set.
165
Surfer
166
Chapter 4 – Creating Grid Files
Exact interpolators honor data points exactly when the point coincides with the grid
node being interpolated. In other words, a coincident point carries a weight of
essentially 1.0 and all other data points carry a weight of essentially zero. Even when
using exact interpolators, it is possible that the grid file does not honor specific data
points if the data points do not exactly coincide with the grid nodes. Refer to the
Weighted Averaging section of this chapter for more information on weights assigned
during interpolation.
To increase the likelihood that your data are honored, you can increase the number of
grid lines in the X and Y direction. This increases the chance that grid nodes coincide
with data points, thereby increasing the chance that the data values are applied
directly to the grid file.
167
Surfer
Weighted Averaging
The gridding methods in Surfer use weighted average interpolation algorithms, with
the exception of data metrics. This means that, with all other factors being equal, the
closer a point is to a grid node, the more weight it carries in determining the Z value
at that grid node. The difference between gridding methods is how the weighting
factors are computed and applied to data points during grid node interpolation.
To understand how weighted averages are applied, consider the equation shown here.
Given N data values:
{Z 1, Z 2,..., ZN }
the interpolated value at any grid node (for example, G j ) can be computed as the
weighted average of the data values:
N
Gj = ∑ wijZi
i =1
where
Gj is the interpolated grid node value at node j
N is the number of points used to interpolate at each node
Zi is the Z value at the ith point
wij is the weight associated with the ith data value when computing Gj
168
Chapter 4 – Creating Grid Files
Gridding Methods
The gridding method is selected in the Grid Data dialog, which is accessed by clicking
on the Grid | Data command. When you select a gridding method in this dialog, you
can specify the parameters for the particular method by clicking on the Advanced
Options button.
The differences between gridding methods are in the mathematical algorithms used to
compute the weights during grid node interpolation. Each method can result in a
different representation of your data. It is advantageous to test each method with a
typical data set to determine the gridding method that provides you with the most
satisfying interpretation of your data.
With inverse distance to a power, data are weighted during interpolation such that the
influence of one point relative to another declines with distance from the grid node.
Weighting is assigned to data using a weighting power that controls how the weighting
factors drop off as distance from a grid node increases. The greater the weighting
power, the less effect points far from the grid node have during interpolation. As the
power increases, the grid node value approaches the value of the nearest point. For a
smaller power, the weights are more evenly distributed among the neighboring data
points.
169
Surfer
Inverse distance to a power is a very fast method for gridding. With less than 500
points, you can use the No Search (use all of the data) search type and gridding
proceeds rapidly.
The equation used for Inverse Distance to a Power is:
n
Zi
∑h β
Zˆ j = i =1
n
ij
1
hij = d ij2 + δ 2
∑h β
i =1 ij
where
hij is the effective separation distance between grid node j and the neighboring
point i
dij is the distance between the grid node j and the neighboring point i
β is the weighting power (the Power parameter)
δ is the Smoothing parameter
170
Chapter 4 – Creating Grid Files
Power
The weighting Power parameter determines how quickly weights fall off with distance
from the grid node. As the power parameter approaches zero, the generated surface
approaches a horizontal planar surface through the average of all observations from
the data file. As the power parameter increases, the generated surface is a "nearest
neighbor" interpolator and the resultant surface becomes polygonal. The polygons
represent the nearest observation to the interpolated grid node. Power values between
1.2e-038 and 1.0e+038 are accepted, although powers should usually fall between
one and three.
Smoothing
The Smoothing factor parameter allows you to incorporate an "uncertainty" factor
associated with your input data. The larger the smoothing factor parameter, the less
overwhelming influence any particular observation has in computing a neighboring grid
node.
171
Surfer
Anisotropy
Set Anisotropy settings if needed. For more information about anisotropy settings,
refer to the Anisotropy section of this chapter.
Search Page
Specify search rules on the Search page. For more information about search rules,
refer to the Search section in this chapter.
Kriging
Kriging is a geostatistical gridding method that has proven useful and popular in many
fields. This method produces visually appealing maps from irregularly spaced data.
Kriging attempts to express trends suggested in your data, so that, for example, high
points might be connected along a ridge rather than isolated by bull's-eye type
contours.
Kriging is a very flexible gridding method. You can accept the kriging defaults to
produce an accurate grid of your data, or kriging can be custom-fit to a data set by
specifying the appropriate variogram model. Within Surfer, kriging can be either an
exact or a smoothing interpolator depending on the user-specified parameters. It
incorporates anisotropy and underlying trends in an efficient and natural manner.
172
Chapter 4 – Creating Grid Files
Variogram Model
The Variogram Model section lists the current variogram model being used by the
kriging algorithm. If multiple components are being used for the current model, all
components will be listed here. Refer to Chapter 5 - Variograms for more information
on the variogram components.
Add
Click the Add button to add variogram components. The Variogram Components
dialog opens. Select the desired new component and click OK to add it to the list in the
Variogram Model section.
Edit
Click the desired variogram component in the Variogram Model section. Click the Edit
button to display the Variogram Components dialog. You can edit various parts of
the variogram model from this dialog. Once you are finished editing the components,
click OK to return to the Kriging Advanced Options dialog.
173
Surfer
Remove
To remove a component from the variogram model, click on the desired variogram
component in the Variogram Model section. Click the Remove button and the
component is removed from the Variogram Model section.
Get Variogram
If you have modeled your data with Surfer's variogram modeling feature (Grid |
New Variogram), click the Get Variogram button to use the variogram results. The
Get Variogram button extracts the current variogram model and inserts it into the
kriging variogram model. You must have the variogram open in the current plot
window to use the Get Variogram option.
Click the button to enter a file name into the Output Grid of Kriging Standard
Deviations box. See Kriging Standard Deviations for more information on this subject.
If the Output Grid of Kriging Standard Deviations box is empty, the estimation
standard deviation grid is not created.
The kriging standard deviation grid output option greatly slows the kriging process.
This is contrary to what you may expect since the kriging variances are usually a by-
product of the kriging calculations. However, Surfer uses a highly optimized
algorithm for calculating the node values. When the variances are requested, a more
traditional method must be used, which takes much longer.
There are several cases where a standard deviation grid is incorrect or meaningless.
If the variogram model is not truly representative of the data, the standard deviation
grid is not helpful to your data analysis. In addition, the kriging standard deviation
grid generated when using a variogram model estimated with the Standardized
Variogram estimator or the Autocorrelation estimator is not correct. These two
variogram estimators generate dimensionless variograms, so the kriging standard
deviation grids are incorrectly scaled. Similarly, while the default linear variogram
model will generate useful contour plots of the data, the associated kriging standard
deviation grid is incorrectly scaled and should not be used. The default linear model
slope is one, and since the kriging standard deviation grid is a function of slope, the
resulting grid is meaningless.
The kriging standard deviation grid is not allowed when the No Search (use all of the
data) option is checked on the Search page.
174
Chapter 4 – Creating Grid Files
Kriging Type
Choose Point or Block Kriging from the Kriging Type box. A detailed discussion of the
two methods can be found in Isaaks and Srivastava (1989, Chapters 12 and 13).
Ordinary (no drift) and Universal Kriging (linear or quadratic drift) algorithms can be
applied to both kriging types.
Both Point kriging and Block kriging generate an interpolated grid. Point Kriging
estimates the values of the points at the grid nodes. Block Kriging estimates the
average value of the rectangular blocks centered on the grid nodes. The blocks are
the size and shape of a grid cell. Since Block kriging is estimating the average value
of a block, it generates smoother contours. Furthermore, since Block kriging is not
estimating the value at a point, Block kriging is not a perfect interpolator. That is
even if an observation falls exactly on a grid node, the Block kriging estimate for that
node does not exactly reproduce the observed value.
When a kriging standard deviation grid is generated with Block kriging, the generated
grid contains the Block kriging standard deviations and not the Point kriging standard
deviations.
175
Surfer
Drift Type
You can select a Linear or Quadratic drift type. Drift type None is ordinary kriging,
while Linear and Quadratic drift types are universal kriging.
Search Page
Specify search rules on the Search page. For more information about search rules,
refer to the Search section in this chapter.
Breaklines Page
Specify breaklines on the Breaklines page. For more information about breaklines,
refer to the Breaklines and Faults section in this chapter. Kriging does not allow faults
to be specified.
Kriging References
For a detailed derivation and discussion of kriging, see Cressie (1991) or Journel and
Huijbregts (1978). Journel (1989) is, in particular, a concise presentation of
geostatistics (and kriging). Isaaks and Srivastava (1989) offer a clear introduction to
the topic, though it does not cover some of the more advanced details. For those who
need to see computer code to really understand an algorithm, Deutsch and Journel
(1992) includes a complete, well-written, and well-documented source code library of
geostatistics computer programs (in FORTRAN). Finally, a well-researched account of
the history and origins of kriging can be found in Cressie (1990).
176
Chapter 4 – Creating Grid Files
Minimum Curvature
Minimum Curvature is widely used in the earth sciences. The interpolated surface
generated by minimum curvature is analogous to a thin, linearly elastic plate passing
through each of the data values with a minimum amount of bending. Minimum
curvature generates the smoothest possible surface while attempting to honor your
data as closely as possible. Minimum curvature is not an exact interpolator, however.
This means that your data are not always honored exactly. The Minimum Curvature
method requires at least four data points.
Minimum curvature produces a grid by repeatedly applying an equation over the grid
in an attempt to smooth the grid. Each pass over the grid is counted as one iteration.
The grid node values are recalculated until successive changes in the values are less
than the Maximum Residual value, or the maximum number of iterations is reached.
Surfer fully implements the concepts of tension as described and detailed in Smith
and Wessel (1990). Also, as recommended by Smith and Wessel (1991), this routine
first fits a simple planar model using least square regression:
AX + BY + C = Z ( X , Y )
There are four steps to generate the final grid using the minimum curvature method.
1. The least square regression model is fit to the data.
2. The values of the planar regression model at the data locations are subtracted
from the data values; this yields a set of residual data values.
3. The minimum curvature algorithm is used to interpolate the residuals at the grid
nodes.
4. The values of the planar regression model at the grid nodes are added to the
interpolated residuals, yielding a final interpolated surface.
Unlike Smith and Wessel (1990), the fixed nodes are defined as the average of the
neighboring observed values. That is, consider a rectangle the size and shape of a
grid cell. The neighborhood of a grid node is defined by this rectangle centered on the
grid node. If there are any observed data within the neighborhood of a grid node, the
value of that grid node is fixed equal to the arithmetic average of contained data.
177
Surfer
The minimum curvature algorithm generates the surface that interpolates the available
data and solves the modified biharmonic differential equation with tension:
(1 − Ti )∇ 2 (∇ 2 Z ) − (Ti )∇ 2 Z = 0
∂ (∇2 Z )
On the edges: =0
∂n
∂2Z
At the corners: =0
∂x∂y
where
Maximum Residual
The Maximum Residual parameter
has the same units as the data,
and an appropriate value is
approximately 10% of the data
precision. If data values are
measured to the nearest 1.0 units, Click the Advanced Options button in the Grid
Data dialog to set the minimum curvature options.
the Maximum Residual value
178
Chapter 4 – Creating Grid Files
should be set at 0.1. The iterations continue until the maximum grid node correction
for the entire iteration is less than the Maximum Residual value. The default Maximum
Residual value is given by:
Maximum Iteration
The Maximum Iteration parameter should be set at one to two times the number of
grid nodes generated in the grid file. For example, when generating a 50 by 50 grid
using Minimum Curvature, the Maximum Iteration value should be set between 2,500
and 5,000.
Convergence
As mentioned in Briggs (1974), and strongly recommended in Smith and Wessel
(1990), Surfer uses a "multiple lattice strategy." It starts with a coarse grid and then
incrementally refines the grid until the final density is achieved.
The status of the algorithm is reflected on the status line. For example, pass 2 of 4,
iteration 360 (0.1234 > 0.08) means there are four levels of grids considered (the
fourth is the final grid), and the algorithm is currently working on the second. The
algorithm is currently on iteration 360. If the iteration number exceeds the Maximum
Iteration parameter, the algorithm terminates without generating the grid and
provides a failure-to-converge warning. The numbers in the parentheses are the
current largest residual and the largest allowed residual as specified in the Maximum
Residual. The largest allowed residual equals the Maximum Residual parameter on the
final pass.
Relaxation Factor
The minimum curvature gridding algorithm is actually solving the specified partial
differential equation using a successive over-relaxation algorithm. The interior is
updated using a "chessboard" strategy, as discussed in Press, et al. (1988, p. 868).
179
Surfer
The only difference is that the biharmonic equation must have nine different "colors,"
rather than just black and white.
The Relaxation Factor is as described in Press et al. (1988). In general, the Relaxation
Factor should not be altered. The default value (1.0) is a good generic value.
Roughly, the higher the Relaxation Factor (closer to two) the faster the Minimum
Curvature algorithm converges, but the more likely it will not converge at all. The
lower the Relaxation Factor (closer to zero) the more likely the Minimum Curvature
algorithm will converge, but the algorithm is slower. The optimal Relaxation Factor is
derived through trial and error. The Relaxation Factor value must be between zero and
two.
Anisotropy
Set Anisotropy settings if needed. For more information about anisotropy settings,
refer to the Anisotropy section of this chapter.
180
Chapter 4 – Creating Grid Files
The Surfer algorithm implements Franke and Nielson's (1980) modified quadratic
Shepard's method with a full sector search as described in Renka (1988).
Smoothing Factor
You can assign a smoothing
parameter to the gridding
operation. The Smoothing Factor
parameter allows Modified
Shepard's Method to operate as a
smoothing interpolator. Greater
smoothing occurs as you increase
the value of the smoothing
parameter. In general, values Set the options, including search, and smoothing
between zero and one are most factor, in the Shepard's Method Advanced
Options dialog.
reasonable. The Smoothing Factor
value must be equal to or larger
than zero.
Quadratic Neighbors
The modified Shepard's method starts by computing a local least squares fit of a
quadratic surface around each observation. The Quadratic Neighbors parameter
specifies the size of the local neighborhood by specifying the number of local
neighbors. The local neighborhood is a circle of sufficient radius to include exactly this
many neighbors. The default value follows the recommendation of Renka (1988). The
Quadratic Neighbors must be a value between 3 and 32,767.
181
Surfer
Weighting Neighbors
The interpolated values are generated using a distance-weighted average of the
previously computed quadratic fits associated with neighboring observations. The
Weighting Neighbors parameter specifies the size of the local neighborhood by
specifying the number of local neighbors. The local neighborhood is a circle of
sufficient radius to include exactly this many neighbors. The default value follows the
recommendation of Renka (1988). The Weighting Neighbors must be a value between
3 and 32,767.
Search
You can set Search parameters in this dialog. For more information about search
options, refer to the Search section of this chapter.
Natural Neighbor
The Natural Neighbor gridding method is quite popular in some fields. Consider a set
of Thiessen polygons (the dual of a Delaunay triangulation). If a new point (target)
were added to the data set, these
Thiessen polygons would be
modified. Some of the polygons
would shrink in size. None of the
polygons would increase in size.
The area in the target's Thiessen
polygon that was taken from an
existing polygon is called the
borrowed area. The Natural
Neighbor interpolation uses a
weighted average of the
neighboring observations, with the
weights proportional to the
borrowed area. The Natural Set the anisotropy options and save
Delaunay triangles in the Natural Neighbor
Neighbor method does not
Advanced Options dialog.
extrapolate contours beyond the
182
Chapter 4 – Creating Grid Files
convex hull of the data locations (i.e. the outline of the Thiessen polygons).
Anisotropy
You can set the Anisotropy options with the Natural Neighbor gridding method. For
more information about anisotropy options refer to the Anisotropy section.
Save Triangles To
Check the Save Triangles To box to export the Delaunay triangulation in any of the
supported export formats. The resulting file can be loaded as a base map and
combined with contour maps, surface plots, etc. to display the outline of the gridded
area.
Sibson, R. (1980), A Vector Identity for the Dirichlet Tessilation, Math. Proc.
Cambridge Phil. Soc., v. 87, p. 151-155.
Sibson, R. (1981), A Brief Description of Natural Neighbor Interpolation, Interpreting
Multivariate Data, V. Barnett editor, John Wiley and Sons, New York, p. 21-36.
Watson, Dave (1994), Nngridr - An Implementation of Natural Neighbor Interpolation,
David Watson, P.O. Box 734, Clarement, WA 6010, Australia.
Nearest Neighbor
The Nearest Neighbor gridding method assigns the value of the nearest point to each
grid node. This method is useful when data are already evenly spaced, but need to be
converted to a Surfer grid file. Alternatively, in cases where the data are nearly on a
grid with only a few missing values, this method is effective for filling in the holes in
the data.
Sometimes with nearly complete grids of data, there are areas of missing data that
you want to exclude from the grid file. In this case, you can set the search to values
183
Surfer
so that areas of no data are assigned the blanking value in the grid file. By setting the
search ellipse radii to values less than the distance between data values in your file,
the blanking value is assigned at all grid nodes where data values do not exist.
When you use the nearest neighbor method to convert regularly spaced XYZ data to a
grid file, you can set the grid spacing equal to the spacing between data points in the
file. Refer to Producing a Grid File from a Regular Array of XYZ Data in this chapter for
information on converting regularly spaced XYZ data into a Surfer grid file.
Search
Set the search range and angle.
For more information on search
properties, see the Search
section of this chapter.
184
Chapter 4 – Creating Grid Files
Polynomial Regression
Polynomial Regression is used to define large-scale trends and patterns in your data.
Polynomial regression is not really an interpolator because it does not attempt to
predict unknown Z values. There are several options you can use to define the type of
trend surface.
Surface Definition
You can select the type of polynomial regression to apply to your data from the
Surface Definition section. As you select the different types of polynomials, a generic
polynomial form of the equation is presented in the dialog, and the values in the
Parameters section change to reflect the selection. The available choices are:
• Simple planar surface
• Bi-linear saddle
• Quadratic surface
• Cubic surface
• User defined polynomial
185
Surfer
Parameters
The Parameters section allows you to specify the maximum powers for the X and Y
component in the polynomial equation. As you change the Parameters values, the
options are changed in the Surface Definition section to reflect the defined
parameters.
Max X Order
The Max X Order specifies the maximum power for the X component in the polynomial
equation. This value must be between zero and 10.
Max Y Order
The Max Y Order specifies the maximum power for the Y component in the polynomial
equation. This value must be between zero and 10.
186
Chapter 4 – Creating Grid Files
Basis Function
The Basis Function list
specifies the basis kernel
function to use during
gridding. This defines the
optimal weights applied to
the data points during the
interpolation. The Basis
Function is analogous to the Set the type of Basis Function and Anisotropy in the
Radial Basis Advanced Options dialog.
variogram in kriging.
Experience indicates that the
Multiquadric basis function works quite well in most cases. Successful use of the Thin
Plate Spline basis function is also reported regularly in the technical literature.
Multiquadric B ( h) = h 2 + R 2
B ( h) = ( h 2 + R 2 )
3/ 2
Natural Cubic Spline
where
h is the anisotropically rescaled, relative distance from the point to the node
R2 is the smoothing factor specified by the user
R2 Parameter
The R2 Parameter is a shaping or smoothing factor. The larger the R2 Parameter
shaping factor, the rounder the mountain tops and the smoother the contour lines.
There is no universally accepted method for computing an optimal value for this
factor. A reasonable trial value for R2 Parameter is between the average sample
spacing and one-half the average sample spacing.
The default value for R2 in the radial basis function gridding algorithm is calculated as
follows:
(length of diagonal of the data extent)2 / (25 * number of data points)
Anisotropy
You can set Anisotropy parameters. For more information about anisotropy options
see the Anisotropy section in this chapter.
Search
Set the search properties on the Search page. For more information on search
properties, see the Search section of this chapter.
Breaklines Page
Specify breaklines on the Breaklines page. For more information about breaklines,
refer to the Breaklines and Faults section in this chapter.
188
Chapter 4 – Creating Grid Files
Carlson, R.E., and Foley, T.A. (1991a), Radial Basis Interpolation Methods on Track
Data, Lawrence Livermore National Laboratory, UCRL-JC-1074238.
Each triangle defines a plane over the grid nodes lying within the triangle, with the tilt
and elevation of the triangle determined by the three original data points defining the
triangle. All grid nodes within a given triangle are defined by the triangular surface.
Because the original data are used to define the triangles, the data are honored very
closely.
Triangulation with linear interpolation works best when your data are evenly
distributed over the grid area. Data sets that contain sparse areas result in distinct
triangular facets on the map.
189
Surfer
Anisotropy Set the anisotropy options and save Delaunay triangles in the
Triangulation Advanced Options dialog.
For more information
about anisotropy
options refer to the Anisotropy section of this chapter.
Save Triangles To
Check the Save Triangles To box to export the Delaunay triangulation in any of the
supported export formats. The resulting file can be loaded as a base map and
combined with contour maps, surface plots, etc.
Guibas, L., and J. Stolfi (1985), Primitives for the Manipulation of General Subdivisions
and the Computation of Voronoi Diagrams, ACM Transactions on Graphics, v.
4, n. 2, p. 74-123.
190
Chapter 4 – Creating Grid Files
Moving Average
The Moving Average gridding method assigns values to grid nodes by averaging the
data within the grid node's search ellipse.
To use moving average, define a search ellipse and specify the minimum number of
data to use. For each grid node, the neighboring data are identified by centering the
search ellipse on the node. The output grid node value is set equal to the arithmetic
average of the identified neighboring data. If there is fewer than the specified
minimum number of data within the neighborhood, the grid node is blanked.
Search
Set the search properties in the Search Ellipse section. For more information about
search properties, refer to the Search section of this chapter.
Breaklines
Specify breaklines on the Breaklines page. For more information about breaklines,
refer to the Breaklines and Faults section in this chapter.
191
Surfer
Data Metrics
The collection of data metrics gridding methods creates grids of information about the
data on a node-by-node basis. The data metrics gridding methods are not, in general,
weighted average interpolators of the Z values. For example, you can obtain
information such as:
• the number of data points used to interpolate each grid node. If the number of
data points used is fairly equal at each grid node, then the quality of the grid at
each grid node can be interpreted.
• the standard deviation, variance, coefficient of variation, and median absolute
deviation of the data at each grid node. These are measures of the variability in
space of the grid, and are important information for statistical analysis.
• the distance to the nearest data point. For example, if the XY values of a data set
are sampling locations, use the Distance to Nearest data metric to determine
locations for new sampling locations. A contour map of the distance to the nearest
data point, quantifies where higher future sampling density may be desired.
Data metrics use the local data set, including breaklines, for a specific grid node for
the selected data metric. The local data set is defined by the search parameters.
These search parameters are applied to each grid node to determine the local data
set. In the following descriptions, when computing the value of a grid node (r,c), the
local data set S(r,c) consists of data within the specified search parameters centered
at the specific grid node only. The set of selected data at the current grid node (r,c),
can be represented by S(r,c), where
S (r , c ) = {(x1 , y1 , z1 ), (x 2 , y 2 , z 2 ), , (x n , y n , z n )}
Planar Grids
Data metrics is used to provide information about your data. After information is
obtained from data metrics, it is likely you will grid the data again using one of the
other gridding methods. When using data metrics, you will usually want to use the
same grid line geometry, search, breakline, and fault parameters as when you grid the
data using another gridding method.
When using some data metrics, a horizontal planar or sloping planar grid is generated.
This is usually a result of the selected search method. For example, consider using
DEMOGRID.DAT and the Count data metric. The Count data metric determines the
192
Chapter 4 – Creating Grid Files
number of data points used in determining the grid node value. Since DEMOGRID.DAT
contains 47 data points, No search (use all of the data) is the default search method.
Using No search (use all of the data) means for each calculated grid node, all 47
points are used in determining the grid node value. The resulting data metric grid is
horizontal planar because all grid nodes have a Z value of 47. The grid report shows
both the Z minimum and the Z maximum as 47.
Other data metrics can yield similar results. For example, if the search radius is large
enough to include all of the data using Terrain Statistics, the moving average is
computed with such a large search radius that the resulting grid will be a planar
surface at the data average. When interpreting data metrics results, keep the gridding
parameters and the data metrics calculation approach in mind.
193
Surfer
Search
Set the search properties on the Search page. For more information about search
properties, refer to the Search section of this chapter.
Z Order Statistics
The data at a grid node within the search parameters are sorted for the Z order
statistics.
194
Chapter 4 – Creating Grid Files
Z Moment Statistics
Data Metric Definition Equation
each nodal value is the arithmetic n
Z (r , c ) = ∑z
average of the data selected by the
1
Mean i
specified sector search centered at that n i =1
node
each nodal value is the standard n
Z (r , c ) = ∑ (z − z )
deviation of the data selected by the 1 2
Standard specified sector search centered at that n
i
node i =1
Deviation
where z is the mean of the
selected data
each nodal value is the variance of the n
Z (r , c ) = ∑ (z − z )2
data selected by the specified sector
1
i
search centered at that node n i =1
Variance
where z is the mean of the
selected data
The Coef. of Variation data metric standard deviation (z )
generates an output grid for which each Z (r , c ) =
Coef. of
Variation nodal value is the local standard mean (z )
deviation divided by the local mean of
the data selected by the specified sector
195
Surfer
Other Z Statistics
Data Metric Definition Equation
The Sum data metric generates an output n
Sum
grid for which each nodal value is the
sum of the Z values of the data selected
Z (r , c ) = ∑z
i =1
i
196
Chapter 4 – Creating Grid Files
∑x
1
xc = i and
n i =1
n
∑y
1
yc = i
n i =1
197
Surfer
Terrain Statistics
Terrain statistics are all based upon a locally fitted planar surface. For each grid node,
the specified sector search is performed. Then, using ordinary least squares, the
following equation is fitted to the selected data:
Z i = Ax i + By i + C + ε i
Least squares fitting is carried out using the data coordinates and it ignores faults. A
sector search and the subsequent least squares fit are carried out for each grid node.
These data metrics are similar to Grid | Calculus terrain modeling, however, data
metrics work on a local subset of the data rather than the grid.
Local Polynomial
The Local Polynomial gridding method assigns values to grid nodes by using a
weighted least squares fit with data within the grid node's search ellipse.
For each grid node, the neighboring data are identified by the user-specified sector
search. Using only these identified data, a local polynomial is fit using weighted least
squares, and the grid node value is set equal to this value. Local polynomials can be
order 1, 2, or 3.
198
Chapter 4 – Creating Grid Files
Order 1
F ( X , Y ) = a + bX + cY
Order 2
F ( X , Y ) = a + bX + cY + dXY + eX 2 + fY 2
Order 3
F ( X , Y ) = a + bX + cY + dXY + eX 2 + fY 2 + gX 2 Y + hXY 2 + iX 3 + jY 3
The weighted least squares function weights data closer to the grid node higher and
data further away lower. The weighting function depends on the search ellipse, the
power, and the specific data geometry. The actual calculations for the weights are
somewhat involved. Define TXX, TXY, TYX, and TYY by
cos(φ )
T XX =
R1
sin (φ )
T XY =
R1
− sin (φ )
TYX =
R2
cos(φ )
TYY =
R2
where
φ is the angle of the search ellipse
R1 is search radius 1
R2 is search radius 2
Define AXX, AXY, and AYY by
199
Surfer
A XX = T XX
2
+ TYX
2
Note that these values (AXX, AXY, and AYY) are a function of the search ellipse
parameters only. They are the same for all data and for all grid nodes.
Next, consider a datum at location (Xi, Yi) and a grid node at location (X0, Y0). Let
dX = X i − X 0
dY = Yi − Y0
then
Ri = A XX dX 2 + A XY dXdY + AYY dY 2
and finally,
Wi = (1 − Ri ) p
200
Chapter 4 – Creating Grid Files
Power
Set the Power to a number between 0 and 20
Polynomial Order
Select the Polynomial Order from the list.
1: F(X,Y) = a +bX + cY
2: F(X,Y) = a +bX + cY + dXY + eX2 + fX2
3: F(X,Y) = a +bX + cY + dXY + eX2 + fX2 +gX2Y + hXY2 + iX3 + iY3
Search
The Search page allows you to specify search rules. For more information on search,
see the Search section of this chapter.
Breaklines
The Breaklines page is used to add breaklines to the gridding process. For more
information on breaklines, see the Breaklines and Faults section of this chapter.
When you have a complete array of XYZ data (or a nearly complete set of data with
only a few "holes"), you can use the nearest neighbor gridding method to convert your
data directly to a grid file. The nearest neighbor method does not interpolate data but
merely picks up the closest point and assigns that value to the grid.
201
Surfer
To use the Grid | Data command to produce a grid file from regularly spaced data:
1. Create an XYZ data file from your data.
2. Click the Grid | Data command.
3. The Open Data dialog is displayed. Specify the name of the XYZ data file and
click Open.
4. In the Grid Data dialog, set the Gridding Method to Nearest Neighbor. During
gridding, the nearest Z value from the data file is assigned to the grid node.
5. In the Grid Line Geometry section, set the Spacing values to match the spacing of
your data in the X and Y directions. This assures that the grid nodes coincide with
your data. For example, if your data are separated by 100 meters over the extent
of your map, enter 100 for the X Direction and Y Direction in the Spacing boxes.
6. Click OK in the Grid Data dialog and the grid file is created.
You can also produce grid files directly from an evenly spaced array of Z values.
When your Z values are organized correctly in an ASCII file, you can add some header
information identifying the data as a grid file, specify the limits of the data, and then
save the file. The ASCII grid file format is given in Appendix C, File Formats.
Gridding a Function
The Grid | Function command allows you to create a grid file from a user-defined two
variable equation of the form Z = f(X,Y). The density of the generated grid is a
function of the Minimum, Maximum, and Increment values for both X and Y. The Grid
| Function command can use any of the mathematical functions listed in Appendix A,
Mathematical Functions. Grids created as functions are plotted in the same way as
grids created using the Data command.
202
Chapter 4 – Creating Grid Files
203
Surfer
204
Chapter 5
Variograms
Introduction to Variograms
Surfer includes an extensive variogram modeling Column C: Elevation
subsystem. This capability was added to Surfer as 450 Direction: 0.0 Tolerance: 90.0
Variogram
250
100
205
Surfer
The Variogram
The variogram is a measure of how quickly things change on the average. The
underlying principle is that, on the average, two observations closer together are more
similar than two observations farther apart. Because the underlying processes of the
data often have preferred orientations, values may change more quickly in one
direction than another. As such, the variogram is a function of direction.
The variogram is a three dimensional function. There are two independent variables
(the direction θ, the separation distance h) and one dependent variable (the variogram
value γ(θ,h)). When the variogram is specified for kriging we give the sill, range, and
nugget, but we also specify the anisotropy information. The variogram grid is the way
this information is organized inside the program.
The variogram (XY plot) is a radial slice (like a piece of pie) from the variogram grid,
which can be thought of as a "funnel shaped" surface. This is necessary because it is
difficult to draw the three-dimensional surface, let alone try to fit a three dimensional
function (model) to it. By taking slices, it is possible to draw and work with the
directional experimental variogram in a familiar form - an XY plot.
206
Chapter 5 - Variograms
3. When computing the interpolation weights, the algorithm considers the inherent
trustworthiness of the data. If the data measurements are exceedingly precise and
accurate, the interpolated surface goes through each and every observed value. If
the data measurements are suspect, the interpolated surface may not go through
an observed value, especially if a particular value is in stark disagreement with
neighboring observed values. This is an issue of data repeatability.
4. Natural phenomena are created by physical processes. Often these physical
processes have preferred orientations. For example, at the mouth of a river the
coarse material settles out fastest, while the finer material takes longer to settle.
Thus, the closer one is to the shoreline the coarser the sediments, while the
further from the shoreline the finer the sediments. When computing the
interpolation weights, the algorithm incorporates this natural anisotropy. When
interpolating at a point, an observation 100 meters away but in a direction parallel
to the shoreline is more likely to be similar to the value at the interpolation point
than is an equidistant observation in a direction perpendicular to the shoreline.
Items two, three, and four incorporate something about the underlying process from
which the observations were taken. The length scale, data repeatability, and
anisotropy are not a function of the data locations. These enter into the kriging
algorithm via the variogram. The length scale is given by the variogram range (or
slope), the data repeatability is specified by the nugget effect, and the
anisotropy is given by the anisotropy.
Variogram Grid
Users familiar with GeoEAS or VarioWin should be familiar with pair comparison files
.PCF. Surfer uses a variogram grid as a fundamental internal data representation, in
lieu of a pair comparison file. The pair comparison file can be extremely large for
moderately sized data sets. For example, 5000 observations create N(N-1)/2 pairs
(12,497,500). Each pair requires 16 bytes of information for a pair comparison file, so
a 5000-observation pair comparison file would take approximately 191 megabytes of
memory to merely hold the pair comparison information. The time to read and search
through this large file makes this approach impractical for many Surfer users.
Computational speed and storage are gained by using the variogram grid approach.
Once the variogram grid is built, any experimental variogram can be computed
instantaneously. This is independent of the number of observations. However, the
ability to carry out on-the-fly editing of variograms on a pair-by-pair basis is lost by
using the variogram grid approach in Surfer.
Unlike the grids used elsewhere in Surfer, which are rectangular grids, variogram
grids are polar grids. Polar grids cannot be viewed in Surfer, and are only used within
the context of variogram computation. The first coordinate in a variogram grid is
207
Surfer
associated with the polar angle, and the second coordinate is associated with the
radial distance out from the origin.
90
135 45
B
180 0
100
200 C
300
400
225 315
270
This is a polar variogram grid for three pairs (A, B, and C)
of observation points, showing separation angles and
separation distances.
There are eight angular divisions: {0°, 45°, 90°, 135°, 180°, 225°, 270°, 315°} and
four radial divisions: {100, 200, 300, 400}. Thus, there are 32 individual cells in this
variogram grid. Users familiar with VarioWin® will notice similarities between Surfer's
variogram grid and the "variogram surface" in VarioWin® 2.2. In Surfer, only the
upper half of the grid is used. See the General section of this chapter for a more
detailed explanation.
Consider the following three observation locations: {(50,50), (100, 200), and
(500,100)}. There are three observations, so there are 3*(3-1)/2 = 3 pairs. The pairs
are:
A (50,50), (100,200)
B (50,50), (500,100)
C (100,200), (500,100)
208
Chapter 5 - Variograms
Each pair is placed in a particular cell of the variogram grid based upon the separation
distance and separation angle between the two observation locations.
Y −Y
h= ( X 2 − X 1 )2 + (Y2 − Y1 )2 θ = arctan 2 1
X 2 − X1
Using the previous equations, the separation angle for the first pair of observations
{(50,50), (100,200)} is 71.57 degrees and the separation distance is 158.11. This
pair is placed in the cell bounded by the 100 circle on the inside, the 200 circle on the
outside, the 45° line in the clockwise direction, and the 90° line in the counterclockwise
direction. The location of this pair in the variogram grid is shown on the previous page
as point A.
Since the separation distance of pairs B and C are greater than the radius of the
largest circle (400), these pairs fall outside of the variogram grid. Pairs B and C are
not included in the variogram grid and therefore, not included in the variogram. Using
the previous equations, every pair is placed into one of the variogram grid cells or it is
discarded if the separation distance is too large.
For a large data set, there could be millions of pairs (or more) and the associated pair
comparison file would be very large. On the other hand, with the variogram grid in the
example above there are only 32 grid cells regardless of the number of pairs contained
in a particular grid cell. Herein lies the computational saving of the variogram grid
approach. It is not necessary that every pair is stored in a variogram grid cell; each
variogram grid cell stores only a small set of summary statistics that represent all of
the pairs contained within that cell.
209
Surfer
Variogram Model
The variogram model mathematically specifies the spatial variability of the data set
and the resulting grid file. The interpolation weights, which are applied to data points
during the grid node calculations, are direct functions of the variogram model.
450
400
350
Length (A) 27 18
27
300 18
21
Variance
36
Variogram (γ)
11
100
18
Pairs
13
50
NUGGET EFFECT: quantifies the sampling and assaying errors and the short scale
variability (i.e. spatial variation occurring at distance closer than the sample spacing).
SCALE (C): is the vertical scale for the structured component of the variogram. Each
component of a variogram model has its own scale.
SILL: is the total vertical scale of the variogram (Nugget Effect + Sum of all
component Scales). Linear, Logarithmic, and Power variogram models do not have a
sill.
210
Chapter 5 - Variograms
LENGTH: is the horizontal range of the variogram. (Some variogram models do not
have a length parameter; e.g., the linear model has a slope instead.)
VARIANCE: is the mean squared deviation of each value from the mean value.
Variance is indicated by the dashed horizontal line in the diagram shown above.
2
N
N
∑ 2
z
i ∑ zi
var = i =1
− i =1 where: N is the number of data
N N
PAIRS: represents the average variogram value for the group of pairs separated by a
specified distance (lag width). The number adjacent to the square symbols indicates
the number of pairs within each lag distance.
For more information on the nugget effect, scale, and length settings, see the Model
section.
Creating a Variogram
To create a new variogram,
211
Surfer
Once the variogram has been created, click once on the variogram to select it. The
Property Manager allows you to select a variogram options, including a variogram
model other than the default linear model.
Depending upon the data, there are many options for creating the variogram.
Decisions about the various options should be made based on knowledge of the data
and based on knowledge of variograms. As such, specific modeling recommendations
can not be made.
The New Variogram dialog contains two pages: Data and General. The options on
both of these pages are discussed in the next sections.
Data Page
You can select data for a new
variogram, change the
duplicate data settings, and
create an exclusion filter on
the Data page in the New
Variogram dialog.
Data Columns
You can specify the columns
for the X data, the Y data,
and the Z data in the Data
Columns group. Surfer
defaults to X: Column A, Y:
Column B, and Z: Column C.
Your data can be in any three
columns, however. Click the
down arrow on each box and You can set the data columns, exclusion filters,
select the appropriate column and how to treat duplicate data on the General
for each variable. page of the New Variogram dialog.
212
Chapter 5 - Variograms
Refer to the Filter Data section in Chapter 3 – Data Files and the Worksheets for more
information on duplicate data.
To use a stored function, click the next to the current function. This will display the
ten most recent functions used. The functions are stored in the registry, so the
equations are stored between Surfer sessions. You can also start typing the function
in the function box. If the function is in the ten function history, the entire function will
auto-complete.
Refer to the Filter Data section in Chapter 3 – Data Files and the Worksheets for more
information on data exclusion.
Statistics
The bottom of the dialog displays statistics about the data. If you change any of the
parameters in the dialog, click the Update Statistics button to display statistics based
on the changed information.
General Page
The General page is used
to define the variogram
grid.
Variogram Grid
The Variogram Grid section
contains the maximum lag
distance, angular divisions,
and the radial divisions
settings for the variogram
grid. A representation of the
variogram grid is pictured
on the right side of the
dialog. To make the picture
legible, the number of
concentric circles drawn is You can set the variogram grid properties on the
General page in the New Variogram dialog.
213
Surfer
equal to the number of radial divisions divided by ten. The number of radial spokes
drawn is equal to the number of angular divisions divided by ten.
Angular Divisions
The Angular Divisions specify the number of angular divisions: i.e. the number of
spaces between "spokes" in the variogram grid. 0° is located on the positive X axis,
not the positive Y axis (azimuth). The angular divisions only go from 0° to 180°, and
not all the way back around to 360°. If a vector were drawn from the first point in the
pair to the second point in the pair, the arrow symbol would point to one direction in
the polar grid. In Surfer, the first point is the point with the smaller Y value and the
second point is the point with the larger Y value. As such, the lower half of the
variogram grid is empty and unnecessary. The experimental variogram for any
direction between 180° and 360° can be computed from the upper half of the grid
using the inherent symmetry of the variogram. The default value of 180 makes each
variogram grid cell span 1° of arc.
Radial Divisions
The Radial Divisions specify the number of concentric circles in the variogram grid.
The default value is 100. Keep in mind that increasing the number of Angular
Divisions and Radial Divisions increases the amount of memory required to store the
grid. See The Variogram Grid section for more information on memory requirements.
Detrend
The Detrend section contains three options for detrending the data before creating a
variogram. The Detrend options carry out a simple polynomial least squares
regression of the data and computes the variogram grid for the resulting residuals
only. See Section 6.12 in Kitanidis (1997) for a more detailed discussion of detrending
data.
• Do not detrend the data should be used most of the time - it should be used all of
the time by novices.
• Linear detrending should be used when the kriging algorithm is applied with a
linear drift.
214
Chapter 5 - Variograms
• Quadratic detrending should be used when the kriging algorithm is applied with a
quadratic drift.
Reports
Check the Generate Report box to create a report of the data, including statistics. For
more information about the contents of the report, see the Reports topic in online
help.
Variogram Properties
Once the variogram grid has been created with the Grid | Variogram | New
Variogram command, the properties of the variogram can be changed. To change the
features of an existing variogram click once on the variogram in either the Object
Manager or in the plot window to select it. The properties are displayed in the
Property Manager.
The variogram properties contains four pages: Experimental, Model, Statistics, and
Plot.
• The Experimental page contains parameters for the experimental variogram such
as lag direction, estimator type, maximum lag distance, number of lags, lag width,
and vertical scale.
• The Model page allows you to set a specific variogram model and its parameters
such as variogram components, error variance, micro variance, automatic
variogram fitting, and anisotropy.
• The Statistics page shows histograms and scatter plots of the data, as well as
providing statistics on the data.
• The Plot page displays and controls most of the visual characteristics of the
variogram.
215
Surfer
Lag Direction
The Lag Direction section controls
the direction from which the
variogram is viewed.
Direction
The Direction specifies the focal
direction when computing the
experimental variogram. In
keeping with the standard notation
used in geostatistics, this direction
is given using a mathematical
convention: 0° is along the
positive X axis, and 90° is along
the positive Y axis. The direction
is not given as an azimuth.
Tolerance
The direction Tolerance specifies
the size of the angular window for
the experimental variogram. The
angular window is:
216
Chapter 5 - Variograms
Estimator Type
There are a number of different formulae for estimating the variogram. Each method
has different strengths, weaknesses, and proponents. Surfer contains four estimating
options: the Variogram, Standardized variogram, Autocovariance, and
Autocorrelation. When in doubt use the default classical Variogram.
Let
Zhi be the observed value of the head observation of the ith pair, and
The required sums over the set of all N pairs are denoted:
Zh = ∑ Zh i
Zhh = ∑ Zh i
2
Zt = ∑ Zt i
Ztt = ∑ Zt 2
i
Zht = ∑ Zh × Zt i i
217
Surfer
The average and variance for all of the observed head values are:
Zh
AVEh =
N
− ( AVEh )2
Zhh
VARh =
N
Similarly, the average and variance for all of the observed tail values are:
Zt
AVEt =
N
− ( AVEt )2
Ztt
VARt =
N
γ =
(Zhh − 2Zht + Ztt )
2N
(see Pannatier, 1996, p. 38).
Standardized Variogram
The standardized variogram estimator is:
(Zhh − 2Zht + Ztt )
γ =
(2 N )
Lag Variance
(see Pannatier, 1996, p. 39).
218
Chapter 5 - Variograms
Autocovariance
The autocovariance estimator is:
γ = Lag Variance − Lag Covariance
(see Pannatier, 1996, p. 41).
Autocorrelation
The autocorrelation estimator is:
1− Lag Covariance
γ =
Lag Variance
(see Pannatier, 1996, p. 42).
Number of Lags
The Number of lags specifies how many experimental variogram points are computed
and plotted. The default Number of lags is 25.
219
Surfer
For example, consider the case where the Max lag distance is 100, the Number of lags
is five, and the Lag width is 40. The resulting lag intervals would be 0 to 40, 10 to 50,
30 to 70, 50 to 90, and 60 to 100. Notice these intervals overlap. Overlapping lag
intervals causes a moving average type smoothing of the experimental variogram.
Often, it is easier to select an appropriate model for such smoothed experimental
variograms.
In either case, the formulae for determining the intervals are given by the following
pseudo-code fragment.
When the Auto vertical scale box is not checked, the Vertical scale is held constant at
the specified value. When using the Step CCW and Step CW buttons to rotate the lag
direction, it is advisable to uncheck the Auto vertical scale box to avoid having the
vertical scale change for every plot. This allows for easier visual comparison between
plots.
220
Chapter 5 - Variograms
Current Component
Click the item next to Current component to select a different variogram component to
edit. A drop-down list appears containing all of the components defined for the
current variogram. When you select a component, the properties of that component
are shown in the Parameters section.
Add
Click the Add button to open the Add Component dialog and add a variogram
component. There are twelve common variogram functions: Nugget Effect, Spherical,
Exponential, Linear, Gaussian, Wave (Hole-Effect), Quadratic, Rational Quadratic,
Logarithmic, Power, Cubic, and Pentaspherical. Each of the components allow for
independent specification of the anisotropy, except for the nugget effect. In the Add
Component dialog, select the desired component to add and click OK. The new
component is automatically added to the Current component list.
Remove
Select a variogram component in the Current component list and click the Remove
button to remove the selected variogram component.
221
Surfer
Parameters
The Parameters section changes based on the item selected for the Current
component. Not all of the Parameters discussed below will be included in every
component.
Scale(C)
With the exception of the Linear variogram model (which does not have a sill), the
Scale parameters (denoted by C in the variogram equations) define the sill for the
variogram components you select. Thus, the sill of the variogram model equals the
Nugget Effect plus the sum of the component’s Scale (C) parameters. In many
situations, the variogram model sill is approximately equal to the variance of the
observed data (see Barnes, 1991).
Length (A)
The Length (A) parameters define how rapidly the variogram components change with
increasing separation distance. The Length (A) parameter for a variogram component
is used to scale the physical separation distance. For the Spherical and Quadratic
variogram functions, the Length (A) parameter is also known as the variogram range.
In an isotropic setting, the relative separation distance, h, is computed by the
following equation:
∆x2 + ∆ y 2
h=
A
where
[∆ x ∆ y] is the separation vector (in map coordinates), and
The anisotropically rescaled relative separation distance for the variogram equations is
computed by the following matrix equation:
where
[∆ x ∆ y] is the separation vector (in map coordinates),
222
Chapter 5 - Variograms
Slope
With a Linear variogram model, the Slope is given by the Scale divided by the Radius.
By allowing an anisotropic radius, it is possible to specify an anisotropic linear
variogram slope. The slope of the linear variogram makes no difference in the kriging
algorithm if the nugget effect is zero.
Nugget Effect
The Nugget Effect is used when
there are potential errors in the
collection of your data. The
nugget effect is implied from the
variogram you generate of your
data. Specifying a nugget effect
causes kriging to become more of
a smoothing interpolator, implying
less confidence in individual data
points versus the overall trend of
the data. The higher the nugget
effect, the smoother the resulting
grid. The units of the nugget
effect are the units of the
observations squared.
The Error variance is a measure of the direct repeatability of the data measurements.
If you took an observation at one point, would the second measurement at that exact
point be exactly the same as the first measurement? The error variance values take
these variances in measurement into account. A non-zero error variance means that a
particular observed value is not necessarily the exact value of the location.
Consequently, kriging tends to smooth the surface: it is not a perfect interpolator.
223
Surfer
The Micro variance is a measure of variation that occurs at separation distances of less
than the typical nearest neighbor sample spacing. For example, consider a nested
variogram where both of the models are spherical. The range of one of the structures
is 100 meters while the range of the second structure is five meters. If our closest
sample spacing were 10 meters, we would not be able to see the second structure
(five meter structure). The micro variance box allows you to specify the variance of
the small-scale structure. If you do not know the micro variance, leave the setting at
0.0.
Anisotropy
Physical processes have preferred orientations. Anisotropy implies a preferred
direction, or direction of higher or lower continuity between data points. Alternatively,
you can say that points that lie farther away along one axis are given equivalent
weights to points that lie closer along the other axis. The relative weighting is defined
by the anisotropy ratio.
Anisotropy is also useful when data sets use fundamentally different units in the X and
Y dimensions. For example, consider plotting a flood profile along a river. The X
coordinates are locations, measured in miles along the river channel. The Y
coordinates are time, measured in days. The Z values are river depth as a function of
location and time. Clearly in this case, the X and Y coordinates would not be plotted
on a common scale, because one is distance and the other is time. One unit of X does
not equal one unit of Y. While the resulting map can be displayed with changes in
scaling (see Chapter 14 - Common Map Properties), it may be necessary to apply
anisotropy as well.
The anisotropy settings in the Model page include a Anisotropy ratio and an
Anisotropy angle setting. The ratio is the primary range divided by the secondary
224
Chapter 5 - Variograms
range. An anisotropy ratio less than two is considered mild, while an anisotropy ratio
greater than four is considered severe. Typically, when the anisotropy ratio is greater
than three its effect is clearly visible on contour maps. The Angle is the orientation
(direction) of the primary axis.
AutoFit
Click the AutoFit button to open the Automatic Variogram Fitting dialog. The
AutoFit options adjust the Parameters for the Current component to fit the desired
variogram direction.
The AutoFit button on the Model page in the variogram properties dialog takes the
user into the Automatic Variogram Fitting dialog. Please note that the AutoFit tool
is meant to hone and polish a set of user specified parameters. AutoFit does not
select the appropriate model form. It should not be used as an exploratory tool in
the search for an appropriate model. It merely fits the parameters once you select a
reasonable model.
While the fitting algorithm is working, the current iteration number and the current
value of the objective function are indicated in the status bar. The fit algorithm can
take some time to work.
225
Surfer
Fit Criterion
There are two fit criteria available, Least Squares and Least Absolute Value. An
important consideration is that both of these criteria work by fitting the model to the
variogram grid in all directions at once and not to the current directional variogram
plot shown on the screen.
The Least Squares criterion is an implementation of the simple weighted least squares
method discussed in Cressie (1991, Section 2.6.2). See Zimmerman and Zimmerman
(1991) for a rather detailed comparison among various methods. The Least Squares
method minimizes the sum of the square of the error, and the Least Absolute Value
method minimizes the sum of the absolute value of the errors.
The Default method uses the default linear variogram. Default calculates a slope and
nugget effect similar to the default linear variogram as first displayed with New
Variogram.
226
Chapter 5 - Variograms
Maximum Iterations
The maximum number of iterations specifies a termination criterion for AutoFit. After
this number of iterations the search stops, though the iterations also terminate if a
target precision is met (see the next section). One iteration includes a line search for
each of the free parameters, plus a line search in the direction of the accumulated
change.
One nice feature is that the AutoFit search can be stopped and restarted multiple
times. Therefore, you could run the search for a few iterations, see what is
happening, and then try a few more iterations. You can terminate the search by
clicking the ESC button on your keyboard and selecting the Abort button in the dialog
that appears. If you stop AutoFit, the best set of parameters so far is saved.
Target Precision
The Target Precision (%) is also a termination criterion for the search with AutoFit.
The target precision specifies a maximum relative change in the objective function
during one iteration. If the change in the objective function is less than the specified
amount, the search is terminated. If the change in the objective function is greater
than the specified amount, the search is continued for another iteration (assuming
that the maximum number of iterations has not been reached). The actual formula is
Maximum Distance
AutoFit attempts to fit the model to the data contained in the variogram grid. The
extent of the variogram grid is given by the Max lag distance parameter specified
when the variogram grid is created with the New Variogram dialog. Often, the Max
lag distance specified when the variogram grid is created is greater than the maximum
lag distance that a user is interested in working with while fitting. (Remember that
the variogram grid is created before you start modeling).
The Maximum Distance parameter limits the extent of the search. The fitting
algorithm ignores any pairs separated by more than the Maximum Distance, even if
they are included in the variogram grid.
227
Surfer
Although the fit algorithm attempts to fit parameters with a large range between the
Maximum and the Minimum, you will have greater success with the fitting algorithm if
the limits are as tight as you can make them. Use a "reasonable value" approach in
specifying the limits.
• The Minimum is the lower bound on the fitted parameter value. No value lower
than this is considered by the fitting algorithm.
• The Initial option is a guess for the parameter value. Since the objective function
is non-linear, the final fitted values can be sensitive to the starting point. The
objective function (fit criterion) may have numerous local minima, which are
distinct from the global minima.
• The Maximum is the upper bound on the fitted parameter value. No value greater
than this is considered by the fitting algorithm.
When in doubt, you should use the Linear variogram model with the default Scale (C)
and Length (A) parameters.
In the Variogram Properties dialog, Model page, click the Add button to open the
Add Component dialog. Select one of the variogram model components and click the
OK button.
228
Chapter 5 - Variograms
229
Surfer
230
Chapter 5 - Variograms
231
Surfer
232
Chapter 5 - Variograms
You can use the scroll bar on the right of the statistics box to view the statistics. Click
the Report button to open the statistics and variogram information in a report window.
The statistics can be printed if they are opened in the report window.
Title
You can change the title and title font
in the Title section. Click next to Title
and type in the desired title text. To
create a multilined title, press the …
button to open the Multiline Text
dialog.
Symbols
To display Symbols, check the Enable
box in the Symbols section.
233
Surfer
Estimate
To display the curve showing the actual data, check the Enable box in the Estimate
section.
To change the line properties, click the + next to Line Properties. You can change any
desired line properties, including the line style, width, and color.
Model
To display the Model line, check the Enable box in the Model section.
To change the line properties, click the + next to Line Properties. You can change any
desired line properties, including the line style, width, and color.
Variance
To display the Variance line, check the Enable box in the Variance section.
To change the line properties, click the + next to Line Properties. You can change any
desired line properties, including the line style, width, and color.
Subtitle
To display the Subtitle, check the box next to Enable in the Subtitle section. The
Subtitle lists the direction and tolerance of the variogram being displayed.
To edit the text properties, click the + next to Font Properties. You can then set any
desired font settings, including font, size, and text color.
Pairs
To display the number of Pairs, check the box next to Enable in the Pairs section.
To edit the text properties, click the + next to Font Properties. You can then set any
desired font settings, including font, size, and text color.
234
Chapter 5 - Variograms
γ (h ) = C 0 + S ⋅ h
where C0 is the unknown nugget effect, and S is the unknown slope. We need two
defining equations to solve for these two unknown parameters.
According to theory, the expected value of the sample variance is the average value of
the variogram between all possible pairs of sample locations (Barnes, 1991); this
yields one equation. The second equation is generated by equating the experimental
sample variogram for nearest neighbors to the modeled variogram. Thus, we can
write
Var = C 0 + S ⋅ D ave
G nn = C 0 + S ⋅ D nn
where
Dnn = average distance to the nearest neighbor
Dave = average inter-sample separation distance
G nn = one half the averaged squared difference between nearest neighbors
Var = sample variance
By solving the two equations for the two unknown parameters, and checking for
unreasonable values, we get the final formulae used in Surfer:
Var − G nn
S = max , 0
D ave − D nn
G ⋅ D − Var ⋅ D nn
C o = max nn ave , 0
D ave − D nn
235
Surfer
Exporting a Variogram
You can use Grid | Variogram | Export Variogram to export the XY coordinates of
the symbols representing the pairs for each lag distance. The resulting file is an ASCII
text file (.DAT extension), with the X coordinates (separation distance) in Column A,
the Y coordinates (variogram - γ(h)) in Column B, and the number of pairs in Column
C.
For more information about the Kriging gridding method, see the Chapter 4, Creating
Grid Files. For more information about variograms, refer to the Variogram Tutorial in
the online help.
236
Chapter 5 - Variograms
Suggested Reading
Alfaro, M. (1980), The Random Coin Method: Solution of the Problem of the Simulation
of a Random Function in the Plane, Mathematical Geology, v. 12, n. 1, p. 25-
32.
Barnes, R. (1991), The Variogram Sill and the Sample Variance, Mathematical
Geology. v. 23, n. 4, p. 673-678.
Cressie, Noel (1991), Statistics for Spatial Data, John Wiley and Sons, New York, 900
pp., ISBN 0-471-84336-9.
Isaaks, Edward and Mohan Srivastava (1989), An Introduction to Applied
Geostatistics, Oxford University Press, New York, 561 pp., ISBN 0-19-505013-
4.
Kitanidis, Peter (1997), Introduction to Geostatistics - Applications in Hydrogeology,
Cambridge University Press, New York, 249 pp., ISBN 0-521-58747-6.
Olea, R.A., 1999, Geostatistics for Engineers and Earth Scientists, Kluwer Academic
Publishers, Boston, 303 pp. ISBN 0-7923-8523-3.
Pannatier, Yvan (1996), VarioWin - Software for Spatial Data Analysis in 2D, Springer-
Verlag, New York, 91 pp., ISBN 0-387-94579-9.
Press, W.H., Flannery, B.P., Teukolsky, S.A., and Vetterling, W.T. (1988), Numerical
Recipes in C, Cambridge University Press.
Zimmerman, D. L., and M. B. Zimmerman (1991), A Comparison of Spatial
Semivariogram Estimators and Corresponding Ordinary Kriging Predictors,
Technometrics, v. 33, n. 1, p. 77-91.
237
Surfer
238
Chapter 6
Contour Maps
Introduction to Contour Maps
A contour map is a two-dimensional
representation of three-dimensional
data. Contours define lines of equal Z
values across the map extents.
The Map | New | Contour Map command creates a contour map from a grid file. A
contour map is a two-dimensional representation of three-dimensional data. The first
two dimensions are the X and Y coordinates. The third dimension (Z) is represented by
lines of equal value. The relative spacing of the contour lines indicate the relative slope
of the surface. The area between two contour lines contains only grid nodes having Z
values within the limits defined by the two enclosing contours. The difference between
two contour lines is defined as the contour interval.
239
Surfer
240
Chapter 6 – Contour Maps
An alternative is to select one map and drag the map layer to the other map object.
For example, create a contour map with the Map | New | Contour Map command.
Create the image map using the Map | New | Image Map command. This creates
two separate maps. Click on the contour map layer in the Object Manager, hold
down the left mouse button, and drag the contour map into the map that contains the
image map layer. A single map with two map layers, using one set of axes and scaling
parameters is created.
241
Surfer
Other map properties like View, Scale, Limits, Frame and Coordinate System, which
are common to most other maps and affects contour maps, are discussed in Chapter
14, Common Map Properties.
242
Chapter 6 – Contour Maps
The button displays information about the grid file used to produce the contour
map. The information includes the grid size, the minimum and maximum X, Y, Z
values contained in the grid file, and statistics. If the grid file is large, a warning
message will appear. Click Yes in the warning box that appears to create a detailed
grid report or click No to create a shorter, less detailed grid report.
The button displays the Open Grid dialog. This allows you to select a new grid file,
or an updated version of the grid file used to create the contour map. Select a grid file
and click Open. If the Z range for the new grid is outside the old contour levels, you
will be prompted to continue the operation. If you click Cancel, the grid file is not
replaced. If you click OK, the grid file is replaced, but no contour lines are drawn. You
can update the contour levels being displayed on the Levels tab.
If the new grid exceeds the current map limits, another warning will appear asking you
to adjust the map limits. If you click Yes, the limits are automatically adjusted to fit
the new grid. If you click No, the limits are not automatically adjusted. The map may
not be displayed. To change the map limits, click on the Map object in the Object
Manager and the Limits tab in the Property Manager.
You may also see a warning message that the current map scale may result in an un-
viewable map. Clicking OK allows the map scale to automatically be adjusted.
The button displays the Save Grid As dialog. Type a File name and change the
Save as type to the desired grid file format. Click Save and the grid is saved to a file.
Smoothing
The Smoothing option allows you to smooth the contours displayed on the map. Click
on the existing value (None, by default) and select a new smoothing value from the
list. If smoothing is enabled, contour lines may cross. The Smoothing option in the
contour map properties applies a constrained spline smoothing algorithm to interpolate
additional contour vertices. Each line is separately calculated, thus the lines can cross
if too much smoothing is applied. See Smoothing Contours for more information on
smoothing.
243
Surfer
Filled Contours
The Filled Contours section controls the display of color fill between the contour lines
as well as the display of the color scale bar.
Fill Contours
Check Fill contours to fill the space between each contour line. See Adding Color Fill
between Contours for more information on filled contours.
Color Scale
Check Color scale to display a color scale bar object. The color scale bar will be
displayed in the plot window and the Object Manager. See color scale bar for more
information on the color scale properties.
Blanked Regions
The Blanked Regions section allows you to choose fill and line color properties for
areas containing blanked nodes. Click on the next to Fill Properties to choose a set fill
properties, such as pattern and fill color. Click on the next to Line Properties to set
the line properties that outline the blanked area.
244
Chapter 6 – Contour Maps
Data Range
The Data range displays the Z minimum and maximum values read from the grid file.
Level Method
The Level method determines which options are available for setting the contour map
contour line properties. Simple allows basic options to be set. These are discussed
below.
245
Surfer
Advanced allows individual lines to have labels, hachures, fill, and line properties set
individually. These options are explained on the contour map advanced levels Properties
dialog, discussed in the next section.
Minimum Contour
Set the Minimum contour to the value of the first contour line you want displayed on
the contour map. To set a new value, highlight the existing value and type the new
value. Press ENTER on the keyboard or click another command in the Property
Manager for the value to be accepted. Values are in map Z units.
Maximum Contour
Set the Maximum contour to the value of the last contour line you want displayed on
the contour map. To set a new value, highlight the existing value and type the new
value. Press ENTER on the keyboard or click another command in the Property
Manager for the value to be accepted. Values are in map Z units.
Contour Interval
The Contour interval defines the spacing units between adjacent contour lines. This
will affect how many contours appear on the contour map and how close those
contours are to one another. To set a new value, highlight the existing value and type
the new value. Press ENTER on the keyboard or click another command in the Property
Manager for the value to be accepted. Values are in map Z units.
Surfer uses the Contour interval, the Minimum contour value, and the Maximum
contour value to determine how many contour lines are created on the map. Surfer
will issue a warning message if the number of contour lines increases above 5000.
Click OK in the warning message and alter the Contour interval, the Minimum contour
value, or the Maximum contour value so that the total number of lines is less than
5000.
246
Chapter 6 – Contour Maps
Fill Colors
The Fill colors option defines the colormap used to fill the contour map. To fill
contours, check the Fill contours option on the General page. Then, change the color
by clicking the existing color bar next to Fill colors. Select the new colormap from the
list. If the desired color map is not listed, click the Custom button at the bottom of the
list. The Colormap dialog appears. Make any changes and click OK to see the change
on the map.
Font Properties
Click on the next to Font Properties to set the text properties for the contour line
labels.
Major Contours
Click on the next to Major Contours to set the line properties for the major contour
lines. You can also turn label display on or off.
Minor Contours
Click on the next to Minor Contours to set the line properties for the minor contour
lines. You can also turn label display on or off.
247
Surfer
The Levels tab in the contour map Properties dialog controls the display of contours,
contour labels, color fill, and hachures on the contour map. The contour level list
shows the contour levels to be displayed on the map. Contour level parameters can be
set as a group or individually.
The Properties dialog appears when the Level method is set to Advanced.
This allows increased control for displaying the contour map levels.
Place your mouse over on any portion of the dialog for more information.
248
Chapter 6 – Contour Maps
Clicking the Level, Line, Fill, Label, and Hach buttons allow
you to apply parameters to multiple levels at once.
To change the display of an individual level label or hachure, double-click on the Yes or
No value for that level. The option will change.
If you want to save only the color definitions, you can do this by clicking the Fill
button. In the dialog that appears, click the color bar. In the Colormap dialog that
appears, click the Save button to save the color definitions as a .CLR file. The .CLR file
can be used with any Z range, because only the relative locations of the colors are
saved.
249
Surfer
250
Chapter 6 – Contour Maps
Data Limits
The actual Data Limits of the grid file are listed for reference. These values cannot be
changed.
Surfer uses the Interval, the Minimum contour value, and the Maximum contour value
to determine how many contour lines are created on the map. Surfer will issue a
warning message if the number of contour lines increases above 5000. Click OK in the
warning message and alter the Interval, the Minimum contour value, or the Maximum
contour value so that the total number of lines is less than 5000.
Use Defaults
The Use Defaults button can be used to calculate a reasonable set of parameters
based on the range of Z values within the grid.
251
Surfer
Using advanced options allows the possibility of controlling additional features for each
contour line separately. Use these steps for advanced contour lines:
1. Click on a contour map to select it.
2. In the Property Manager, click on the Levels tab.
3. Set the Level method to Advanced.
4. Click the Edit Levels button next to Contour levels to open the advanced options
Properties dialog.
5. To assign evenly spaced contour levels, click the Level button and the Contour
Levels dialog is displayed.
6. Set the values for the Minimum and Maximum contours.
7. Set the Interval value that defines the spacing in Z units between adjacent contour
lines.
8. The Use Defaults button can be used to calculate a reasonable set of parameters
based on the range of Z values within the grid.
9. Click OK and the contour level list is updated.
10. Click OK in the dialog to update the map.
Drawing Contours
When you create a contour map, the
grid file is read into the plot window as
an internal array of X, Y, and Z grid
nodes. The grid nodes consist of rows
and columns of Z values. The rows
contain grid nodes with the same Y
coordinate, and the columns contain
grid nodes with the same X coordinate.
Grid file columns and rows are
sometimes referred to as X grid lines
and Y grid lines, respectively. The
intersection of a row and column is
defined as a grid node. Grid files define
the X, Y location of each grid node over
the extent of the map, and the
interpolated Z value at each node.
The path of a contour line (Z = 50)
through a grid is defined by
When Surfer creates a contour map,
interpolating between grid nodes.
the contour lines are drawn as a series This example shows the straight-line
of straight line segments between segments that define the contour line.
adjacent grid lines. The dots are added to show the ends
of each line segment.
252
Chapter 6 – Contour Maps
The point where a contour line intersects a grid line is determined by interpolation
between Z values at adjacent grid nodes.
The grid limits define the extent of contour maps. Once a grid file is created you
cannot produce a contour map larger than the extent of the grid file. However, you
can use the Limits page to specify a subset of the grid used to create the contour
map.
Smoothing Contours
Contour smoothness controls the angularity, or roundness, of the contour lines.
Smoothness in a contour map can be controlled in several ways:
• By using Grid | Data to produce a denser grid file from your original data. As a
rule, contour maps made from high-density grids are visibly smoother than
contour maps made from low-density grid files. For example, a 10 X 10 grid file
(10 rows and 10 columns) results in more angular contours than a 50 X 50 grid
file.
• By using the Grid | Spline Smooth command to insert additional rows and
columns into an existing grid file.
• By using the Grid | Mosaic command to resample an existing grid file.
• By changing the Smoothing option in the contour map general properties. If
smoothing is enabled, contour lines may cross. The Smoothing option in the
contour map properties applies a constrained spline smoothing algorithm to
interpolate additional contour vertices. Each line is separately calculated, thus the
lines can cross if too much smoothing is applied.
• By using Grid | Data to change the gridding method or gridding method
parameters. Some methods produce smoother grids than others, and some have
smoothing parameters that can be utilized during gridding. See Creating Grid Files
for more information on gridding.
Once the new grid file is created, click on the contour map to select it. In the
Property Manager, click on the General tab. Click the button next to Grid file to
replace the old grid in the contour map.
253
Surfer
Contour Lines
The contour line properties can be set using several methods. Uniform contour line
properties are used to assign a single line style to a set of contour levels. Gradational
contour line properties can be used to assign a series of gradational colors or line
widths to the contour levels. For fine tuning, each individual contour line property can
be set by double-clicking the line sample in the levels list.
Line Properties
Use the Line Properties sections in
the Property Manager to change
line properties for selected lines in
the document. You can set default
line properties through Tools |
Options | Default Attributes.
Occasionally, objects will open a Line Properties dialog to access the line properties.
Sample
The sample of the line is displayed next to Line Properties. The sample shows the line
style, color, opacity, and width options.
If the Line Properties section is closed, click the next to Line Properties to open the
section.
Style
Click the line next Style to open the line style palette. Click on a style to use it for the
selected line. The line style sample updates to show the new selection. Click on the
Custom button at the bottom of the line style palette to specify a custom line style.
254
Chapter 6 – Contour Maps
Color
Click the color next to Color to open the color palette. Click on a color to use it for the
selected line. The color box and the sample line update to show the new selection.
Click on the Custom button at the bottom of the color palette to choose a custom
color.
Opacity
Change the Opacity of the line by entering a value from 0% (completely transparent)
to 100% (completely opaque) or by dragging the to change the opacity
percentage.
Width
Change the line Width by typing a new number into the box or by using the arrow
buttons to the right of the box. The line width can be zero to 0.5 inches (1.27 cm)
wide. A width of zero is one pixel wide.
255
Surfer
Style
Click the button next Style to open the line style palette. Click on a style to use it for
the selected line. The line style sample updates to show the new selection. Click on the
Custom button at the bottom of the line style palette to specify a custom line style.
Color
Click the button next to Color to open the color palette. Click on a color to use it for
the selected line. The color box and the sample line update to show the new selection.
Click on the Custom button at the bottom of the color palette to choose a custom
color.
Width
Change the line Width by typing a new number into the box or by using the arrow
buttons to the right of the box. The line width can be zero to 0.5 inches (1.27 cm)
wide. A width of zero is one pixel wide.
Opacity
Change the Opacity of the line by entering a value from 0% (completely transparent)
to 100% (completely opaque), by using the arrow buttons to the right of the box, or
by dragging the slider to change the opacity percentage.
Sample
The sample of the line is displayed in the Sample section. The sample shows the line
style, color, opacity, and width options.
256
Chapter 6 – Contour Maps
• Affected Levels: The Affected Levels group is used to set line color on a frequency
basis.
• Style: Click the line Style button to open the line style palette. Click on a style to
use it for the selected line.
• Color: If you have Uniform selected, clicking the Color button opens the color
palette. If you have Gradational selected, clicking the Color button opens the
Colormap dialog.
• Opacity: Change the Opacity of the line by entering a value from 0% (completely
transparent) to 100% (completely opaque), using the arrow buttons to the right of
the box, or dragging the slider to change the opacity percentage. If using
Gradational lines, the opacity is set in the Colormap dialog.
• Line Width: If you have Uniform selected, change the Line width by typing a new
number into the box or by using the arrow buttons to the right of the box. The line
width can be zero to 0.5 inches (1.27 cm) wide. A width of zero is one pixel wide.
If you have selected Gradational line width, enter a Min width and Max width value to
create a gradational line width for the contour map. The line width can be zero to 0.5
inches (1.27 cm) wide. A width of zero is one pixel wide.
257
Surfer
You can set the frequency of the line properties in the Affected Levels group.
258
Chapter 6 – Contour Maps
another, so the line spectrum might consist of ranges of one color, resulting in
"color zones" rather than a smooth line color spectrum.
12. Click OK in the advanced levels dialog and the contour map is drawn with the
specified color and width contour lines.
If you have customizations on individual levels, you can still set the same line
properties from the advanced levels dialog. To assign the same line properties to all
contour levels:
1. Click on an existing contour map to select it.
2. In the Property Manager, click on the Levels tab.
3. Change the Level method to Advanced.
4. Click the Edit Levels button next to Contour levels to open the advanced levels
dialog.
5. Click the Line button to display the Line dialog.
6. In the Line dialog, choose Uniform contour lines.
7. Click the Style and Color buttons to open the line style and color palettes. Select
the style and color to use for all of the contour lines. To eliminate the contour lines
from the contour map, set the line style to Invisible.
8. Enter a number into the Line width box to set the line width. A Line width of 0.00
is one pixel wide.
9. Set the First value to 1. This is the first contour line that will have the properties
applied.
10. Set the Set to 1. This tells the program to set one line.
11. Set the Skip to 0. The zero tells the program to skip no lines. This means all lines
will have the same properties.
12. Click OK to return to the advanced levels dialog.
259
Surfer
13. Click OK in the advanced levels dialog to create a contour map with the same line
properties for all contours on the map.
If you have additional properties to change for an individual level, you can set line
properties on a frequency basis using the advanced contour levels method. To set line
properties for advanced contour levels:
1. Click on an existing contour map to select it.
2. In the Property Manager, click on the Levels tab.
3. Change the Level method to Advanced.
4. Click the Edit Levels button next to Contour levels to open the advanced levels
dialog.
5. Click the Line button to display the Line dialog.
6. Set the Style, Color, Width, and select Uniform or Gradational for the line.
7. Set the First value to the first contour line position that will have the properties
applied.
8. Set the Set value to the number of contour lines to apply this property.
9. Set the Skip value to the number of contour lines to not apply this property.
10. Click OK to return to the advanced levels dialog.
11. Click OK in the advanced levels dialog to create a contour map with the same line
properties for all contours on the map.
260
Chapter 6 – Contour Maps
Affected Levels
The Affected Levels settings are used to modify the contour levels on a frequency
basis. These settings can be found by clicking the Line button on the Levels page in
the contour map advanced levels dialog. The First, Set, and Skip fields allow you to
specify which contour levels are modified.
• First: The First field indicates the first contour level affected by the change. The
number refers to the contour level position in the list (starting with 1) and not the
actual contour value.
• Set: The Set field indicates the number of levels to apply the changes.
• Skip: The Skip field indicates the number of contour levels to skip when assigning
the specified properties.
261
Surfer
262
Chapter 6 – Contour Maps
Index Contours
Index contours are lines of different colors, styles, or widths that appear at a regular
frequency. With simple contour levels, this is called Major Contours.
You can create index contours in several ways: use Major Contours with the simple
contour levels. With advanced contour levels, you can set individual contour line
properties, or use the Affected Levels group in the Line dialog to automatically assign
the index contours.
To set index line properties with simple contour levels, you need to set a major and
minor contour level:
1. Click on an existing contour map to select it.
2. In the Property Manager, click on the Levels
tab.
3. Change the Level method to Simple.
4. Change the Major contour every value to the
desired frequency for major contour lines. This
is the interval for the index contours. To have a
red index line every fifth line, set this value to
5.
5. Open the Line Properties section under Major
Contours. This is the index contour properties.
Set the Color to Red.
6. Open the Line Properties section under Minor
Contours. This will set the line properties for all This is an example of a map with
red index contours.
non-major contour lines. Set the Color to Blue.
To create index contours with advanced contour levels, you can use the affected levels
options:
1. Click on an existing contour map to select it.
2. In the Property Manager, click on the Levels tab.
3. Change the Level method to Advanced.
4. Click the Edit Levels button next to Contour levels to open the advanced levels
Properties dialog.
5. Click the Line button to display the Line dialog.
6. Click the line Color button and change the color to red.
7. Set the index contour line properties in the Affected Levels group in the Line
dialog.
263
Surfer
8. In the Affected Levels group, set First to one, Set to one, and Skip to four. This
means, starting with the first contour level, set one contour level to red, skip four
contour levels, and then set the fifth contour level to red, skip four more levels,
etc.
9. Click OK.
10. Next, set the line style and color used on the intermediate levels. Click the Line
button on the Levels page.
11. Click the line Color button and change the line color to blue.
12. In the Affected Levels group, set First to two, Set to four, and Skip to one. This
means, starting with the second contour level (the first level is a red index
contour) change the line color to blue for the next four contour levels, skip one
contour level, set the next four contour levels to blue, etc.
13. Click OK in the Line dialog to return to the contour map properties dialog. The first
contour level line appears as red, the next four are blue, followed by one red line,
etc.
14. Click OK in the contour map properties dialog to draw the map with the specified
contour lines.
The Affected Levels group contains First, Set, and Skip fields. This group allows you to
apply the selected line properties to a repeating series of levels. The Affected Levels
group exists in the Line, Fill, Labels, and Hachures dialogs.
Gradational colors are assigned in the Property Manager for predefined color
spectrums. Or, gradational colors can be defined in the Colormap dialog. For
example, if the color red is assigned to the minimum value, and the color blue to the
maximum value, the resulting color spectrum graduates from red to blue.
Individual fill colors for specific contour levels can be assigned from the advanced
contour levels dialog by double-clicking the fill sample for a contour value on the
contour map advanced levels dialog. There is no gradational change for fill patterns.
264
Chapter 6 – Contour Maps
Use the Fill Colors option in the Property Manager to change the fill color properties
for a simple level contour map.
265
Surfer
• Fill Pattern: Change the Fill Pattern by selecting a pattern from the pattern palette.
Open the pattern palette by clicking the fill pattern button. Any pattern, including
solid filled patterns, can be transparent by setting the Opacity in the Colormap
dialog for the Background Color.
• Foreground Color: Foreground Color is the color of the pattern lines or pixels. With
the Fill Pattern set to Solid, the Foreground Color is the solid color. Click on the
Foreground Color button to open the Colormap dialog.
• Background Color: Background Color is the color behind the pattern. All raster
(pixel) patterns must have a background color. Click on the Background Color
button to open the Colormap dialog. Background color Opacity can be controlled
in the Colormap dialog.
• Background Mode: The Background Mode can be set to Opaque or Transparent
with Stock Windows patterns. If the pattern is an Image or the Solid Stock
Windows pattern the box is grayed out. In this case, set the Opacity in the
Background Color options.
• Affected Levels: The Affected Levels settings are used to modify the contour levels
on a frequency basis. The First, Set, and Skip fields allow you to specify which
contour levels are modified.
• The First field indicates the first contour level affected by the change. The number
refers to the contour level position in the list (starting with 1) and not the actual
contour value.
• The Set field indicates the number of levels to apply the changes.
• The Skip field indicates the number of contour levels to skip when assigning the
specified properties.
266
Chapter 6 – Contour Maps
7. If a different colormap is desired, click the Custom button at the bottom of the Fill
colors drop down list. The Colormap dialog appears, where you can make any
customizations.
To assign color fill based on a fill spectrum for an advanced level contour map:
1. Click on the contour map to select it.
2. In the Property Manager, open the General tab.
3. Check the box next to Fill contours.
4. Click on the Levels tab.
5. Set the Level method to Advanced.
6. Click the Edit Levels button next to Contour levels.
7. Click the Fill button to display the Fill dialog.
8. Click the Fill Pattern button to display the pattern palette. The fill pattern is
constant for all levels.
9. Click the Foreground Color or Background Color buttons to open the Colormap
dialog. The foreground color is used for the pattern. The background color is used
for areas behind the pattern. The Background Mode can be set to Opaque or
Transparent with stock Windows patterns (except Solid). With image fills, the
background is always set to Opaque.
10. Click OK in the Fill dialog to return to the advanced contour levels properties
dialog. The specified fill properties are displayed under the Fill button.
11. Click OK and the contour map is drawn with colors filling the areas between the
contour lines.
267
Surfer
9. Click OK in the Fill Properties dialog and repeat the procedure for all of the
contour levels you want to change.
10. Click OK and the contour map is drawn with colors filling the areas between the
contour lines.
The contour map automatically updates to show the blanked area properties.
268
Chapter 6 – Contour Maps
To create a filled contour map without contour lines using an advanced level contour
map,
1. Click on the contour map to select it.
2. In the Property Manager, open the General tab.
3. Check the box next to Fill contours.
4. Click on the Levels tab.
5. Set the Level method to Advanced.
6. Click the Edit Levels button next to Contour levels.
7. Click the Line button to open the Line dialog.
8. In the Line dialog, click the line Style palette and choose the Invisible line style.
9. In the Affected Levels group, set First to one, Set to one, and Skip to zero.
10. Click OK in the Line dialog to return to the advanced level contour map properties
dialog.
11. Click OK in the contour map properties dialog, and the filled contour map is
displayed without contour lines.
269
Surfer
Contour Labels
Contour labels indicate the value of the contour line. Labels are regularly spaced along
the contour line subject to curvature restrictions. Contour labels can use any text
properties and numeric format, but all contour labels in a given map must use the
same properties.
Contour labels are controlled from the contour map properties. Labels can be
controlled when using simple level contour maps or advanced level contour maps. To
show labels when using simple contour maps,
1. Click on the contour map to select it.
2. In the Property Manager, open the Levels tab.
3. Set the Level method to Simple.
4. Check the box next to Show labels in the Major Contours section to show labels
along the major contour lines.
5. Check the box next to Show labels in the Minor Contours section to show labels
along the minor contour lines.
6. Click the next to Font Properties to set the text properties for the labels.
270
Chapter 6 – Contour Maps
Curve Tolerance
Curve Tolerance specifies the
maximum amount of contour
curvature allowed when placing
labels on contour lines. Curve
tolerance is calculated by dividing
the actual distance along the contour
line by the straight-line distance Customize label spacing in the
between the end points of the Labels dialog.
contour label. Highly curved lines
might not be labeled automatically.
You can increase the curve tolerance value to allow labels on highly curved contour
lines, although contour labels might be hard to read. The default Curve Tolerance
value of 1.015 should be acceptable in most cases.
271
Surfer
• The First field indicates the first contour level affected by the change. The number
refers to the contour level position in the list (starting with 1) and not the actual
contour value.
• The Set field indicates the number of levels to apply the changes.
• The Skip field indicates the number of contour levels to skip when assigning the
specified properties.
Label Orientation
The Orient Labels Uphill check box displays the labels so they are always oriented
uphill. If this box is checked, the "tops" of the labels point uphill. If this option is
unchecked, the labels always are oriented right-side up on the page.
Font Properties
Click the Font button to display the Font Properties dialog. Choose the font, points,
style, color, and opacity to use for the contour labels in this dialog.
Label Format
Click the Format button to display the Label Format dialog. This dialog allows you to
specify the numeric format to use for the contour labels (i.e. number of decimal
places).
272
Chapter 6 – Contour Maps
Use the Edit | Undo command to undo a label move, label deletion, or label insert.
273
Surfer
First =
If you have additional properties to change for an individual 1
level, you can set label properties on a frequency basis using Levels Set = 1
the advanced contour levels method. To set label properties
Skip =
using advanced contour levels: 4
6000 Yes
1. Click on an existing contour map to select it. 6100 No
2. In the Property Manager, click on the Levels tab. 6200 No
3. Change the Level method to Advanced. 6300 No
4. Click the Edit Levels button next to Contour levels to open 6400 No
the advanced levels Properties dialog.
6500 Yes
5. Click on the Label button to open the Labels dialog.
6600 No
6. Set the First contour level affected by the setting, the Set
6700 No
number indicating the number of levels to set with the
specified properties, and the Skip number indicating the 6800 No
number of levels to skip assigning the specified properties. 6900 No
7000 Yes
Labels can only have one set of Affected Levels. If the Affected
Levels are set a second time, they override the changes made by the first.
274
Chapter 6 – Contour Maps
To avoid displaying contour labels on the contour map when the Level method is set to
Advanced, follow these steps:
1. Click on the contour map to select it.
2. In the Property Manager, click on the Levels tab.
3. Set the Level method to Advanced.
4. Click the Edit Levels button next to Contour levels.
5. Click the Label button.
6. In the Affected Levels section of the Labels dialog, change the First to 1, the Set
to 0, and the Skip to 0. Click OK in the Labels dialog to return to the contour map
Properties dialog.
7. Click OK in the contour map Properties dialog to remove all labels.
Hachures
Hachures are small tick marks placed along contour lines to indicate the direction of
slope. In Surfer, hachures can either point upslope or downslope. Hachures are only
displayed when using the advanced level contour map settings.
275
Surfer
7. Click the Hach button to open the Hachures dialog. Set any properties. This
controls the hachures for the entire map. Click OK.
8. In the Hach column, the hachured contour levels are indicated by the word Yes.
Contours not hachured are indicated with the word No.
9. To control the display of hachures for a particular level, double-click the words Yes
or No in the list.
10. Click OK in the dialog to make the changes on the map.
If you do not want to display hachures on any contour lines, specify a Set value of
zero in the Hachures dialog.
Hachure Length
Use the Length box to control the
length of the hachures. Hachure
length can be greater than zero,
and up to one inch.
Hachure Direction
Use the Hachures dialog to customize
The Direction box controls whether hachure settings.
hachures point in an upward or
downward direction. For example,
to point hachures towards contours of lower value, choose the Downhill option.
Affected Levels
The Affected Levels group controls which levels are hachured. For more information on
the use of First, Set, and Skip see Setting Hachures on a Frequency Basis.
276
Chapter 6 – Contour Maps
7.00 7.00
6.00 6.00
5.00 5.00
4.00 4.00
3.00 3.00
2.00 2.00
1.00 1.00
0.00 0.00
0.00 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 0.00 1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00
These are two examples showing different hachuring parameters. The map on the left displays
hachures on the uphill side of contours on closed contours only. The map on the right displays
hachures on both open and closed contours, and the hachures are placed on the downhill side of the
contours.
The First, Set, and Skip fields allow you to specify which contour levels are modified:
• The First field indicates the first contour level affected by the change. The number
refers to the contour level position in the list (starting with one) and not the actual
contour value.
• The Set field indicates the number of levels to apply the changes to.
• The Skip field indicates the number of contour levels to skip when assigning the
specified properties.
277
Surfer
Hachures can only have one set of Affected Levels. If the Affected Levels are set a
second time, they override the changes made by the first.
Example
As an example, consider a map displaying contour lines every ten feet from 50 to 100.
Within the Hachures dialog, if you specify 1 (corresponding to the first contour line in
the levels list) as the First hachured contour line, and a Skip value of one, then
hachures appear on the contour lines at 50, 70, and 90 (every second contour line on
the map).
278
Chapter 6 – Contour Maps
To blank maps:
1. Create a grid file using the Grid | Data command.
2. Create a .BLN file. The .BLN file should have identical first and last points. This
closes the polygon.
3. Click the Grid | Blank command.
4. Select the .GRD file created in step 1 and click Open.
5. Select the .BLN file created in step 2 and click Open.
6. Type a File name and click Save. A new .GRD file is created.
7. Create a contour map using the Map | New | Contour Map command. The
blanked portion will not appear on the map.
279
Surfer
Exporting Contours
To retain the Z information for contour lines for use in other mapping programs, use
the Map | Export Contours command. The Export Contours command exports the
currently selected contour map as an AutoCAD .DXF, 2D ESRI .SHP, 3D ESRI .SHP, or
a .TXT text format.
• AutoCAD DXF: The contours are saved as elevated polylines. The polylines are
clipped to the map limits and scaled to the current map scale. Axes, labels,
contour fills, line properties (width, style, and color), etc. are not exported. The
contours are not affected by 2D page transformations or rotations. The
coordinates in the AutoCAD .DXF file are saved with 64-bit floating-point precision.
• 2D SHP: The 2D .SHP exports a shape 2D polyline type where each vertex along
the line comprises an X and Y coordinate. The Z coordinate for each vertex is
stored in the associated .DBF file.
• 3D SHP: The 3D .SHP exports a shape polyline Z type where each vertex along the
line comprises an X, Y, and Z coordinate. The Z coordinate for each vertex is
stored in the associated .DBF file.
• Text format: The text format .TXT exports each contour line as a series of X, Y, Z
points. Each point is on a separate line in the .TXT file.
If you would like to export the contours as part of a complete map, choose one of the
export options in File | Export.
280
Chapter 7
Base Maps
Introduction to Base Maps
Base maps display geographic
and political information such as
roads, streams, lakes, or state
and county boundaries. Base
maps can be combined with any
other map type in Surfer. Base
map files draw objects at precise
X, Y locations on a map and can
contain points, polygons,
polylines, text, and raster images.
The expansion state of sub-objects in the Object Manager is retained in the Surfer
.SRF file. Use the Expand new Object Manager items option in the Options dialog to
control the expansion state of new objects in Object Manager.
281
Surfer
1. Choose the Map | New | Base Map command, or click the button.
2. The Import dialog is displayed with a list of files in all the format types that can
be imported. Select a file in the list and click the Open button.
3. Sometimes an Import Options dialog for the file type is displayed. Make any
changes to the import options and click OK.
4. The base map is imported into the current plot window.
Once created, you can change the features of a base map, by clicking once on the
base map to select it. The properties are displayed in the Property Manager.
The Map | Add | Base Layer command adds a base map layer to the selected map.
282
Chapter 7 – Base Maps
Boundaries that comprise the objects in a base map cannot be modified. For example,
if a base map contains a polygon, you cannot select the polygon and change the shape
of the polygon. Similarly, individual point symbols on a base map cannot be moved or
deleted.
283
Surfer
The base map properties dialog contains there tabs: Base Map, Layer and
Coordinate System. The Layer page and Coordinate System page is common to
other map types like contour map, image map, vector map etc. The Layer page is
discussed in Chapter 18, Positioning and Overlaying Maps. The Coordinate System
page is discussed in Chapter 15, Coordinate Systems.
Other map properties like View, Scale, Limits, Frame, and Coordinate System,
which are common to most other maps and affects contour maps, are discussed in
Chapter 14, Common Map Properties.
Input File
The Input File lists the current
file used in the base map.
The Base Map page allows you to specify the
Input File and Properties.
Changing Filename
The button displays the Import dialog. This allows you to select a new file or an
updated version of the current file used to create the base map. If the file exceeds the
current map limits, you will be prompted to adjust the map limits.
Properties
• Click the next to Line Properties to adjust the line properties for all objects in
the base map.
• Click the next to Fill Properties to adjust the fill properties for all objects in the
base map.
• Click the next to Font Properties to adjust the font properties for all objects in
the base map.
284
Chapter 7 – Base Maps
• Click the next to Marker Properties to adjust the symbol properties for all
objects in the base map.
If no object exists in the base map that uses a particular property type, that property
type is not displayed.
Image Coordinates
The Image Coordinates section provides a way to set the corner coordinates for a
single image. The Image Coordinates section is only available when a single image is
in the base map, as shown below.
285
Surfer
286
Chapter 7 – Base Maps
Info Page
The Info page contains information
about polyline, polygon, symbol,
rectangle, rounded rectangle, ellipse,
composite objects, images, and
metafiles. The information displayed
is dependent on the type of object.
Coordinate System
The Info page displays information
Specify a coordinate system from the dependent on the selected object.
Coordinate System drop-down list to
be used for the information displayed for the object.
• Page uses the page coordinate system (inches or centimeters depending on the
setting in Tools | Options | Drawing).
• Local uses the units the geometry was originally specified in. For example, if the
geometry was loaded from a file, this is the original file units. If the geometry was
287
Surfer
created interactively, this is an internal coordinate system with 0.0 in the center of
the page (in inches).
• Map displays information in map units if the geometry is part of a map. If the
object is not part of a map, this option is not available.
Number of Sub-Polygons
If the object contains a complex polygon, the Number of sub-polygons (rings) displays
how many polygons are included in the complex polygon. For example, the sample file
CA2000.GSB has polygons of California counties. Some of the counties are complex
polygons (i.e. Santa Barbara) that include sub-polygon islands.
Number of Curves
The Number of curves is displayed for a spline polyline. The Number of curves is the
number of inflection points along the spline polyline. This is one less than the total
number of vertices.
Perimeter/Length
Depending on the object selected, either Perimeter or Length will be displayed.
• The Perimeter displays the calculated perimeter of the selected closed object (i.e.
polygon).
• The Length displays the calculated length of the selected open object (i.e.
polyline). The units displayed are dependent on what is selected for the Coordinate
System.
Area
The Area displays the calculated area of the selected object. The units displayed are
dependent on what is selected for the Coordinate System.
288
Chapter 7 – Base Maps
• Polyline: The Info page for Polyline Properties displays the Number of vertices,
and Length.
• Polygon: The Info page for Polygon Properties displays the Total number of
vertices, Number of sub-polygons (rings), Perimeter, and Area.
• Symbol: The Info page for Symbol Properties displays the Position in X and Y
units.
• Rectangle: The Info page for Rectangle Properties displays the Perimeter and
Area.
• Rounded Rectangle: The Info page for Rounded Rectangle Properties displays the
Perimeter and Area.
• Ellipse: The Info page for Ellipse Properties displays the Perimeter and Area.
• Spline Polyline: The Info page for Spline Polyline Properties displays the Number
of curves and Length.
• Composite Objects: The Info page for Composite Properties displays the number
of objects in the group. Each composite object can be selected in the Object
Manager to display the object info.
• Metafile: The Info page for Metafile Properties displays the Type of metafile,
Description, Number of records, and Size in bytes.
• Image: The Info page for Image Properties displays the Pixel format, Size
(pixels), Size (bytes), and Image source.
Boundary Maps
A boundary map is a base map. Boundary maps show objects at precise X, Y locations
on a map. Boundary maps can contain point locations, polygons, polylines, text, and
raster images. You can use boundary files to show objects such as boundary outlines
(such as a state or county outline), streams, water bodies, roads, buildings, or most
other types of objects on a map.
Object Properties
Fill, line, font, and symbol properties can be applied to all the base map objects at
once or to individual base map objects. To change the properties for all of the objects
in a base map, click on the Base object in the Object Manager. The properties listed
in the Property Manager are for all objects in the base map. To change the
properties of individual objects in the base map, expand the Base object by clicking
the button next to Base in the Object Manager. Click on an individual item, such as
a polygon, polyline, or symbol to change individual line, fill, or symbol properties.
289
Surfer
Object Boundaries
Boundaries which comprise the objects in a base map
can be modified. For example, if a base map contains a
polygon, you can select the polygon and change the This base map has four
shape of the polygon with the Draw | Reshape objects (Text, Symbol,
command. Similarly, individual point symbols on a base Polyline, and Polygon).
The properties of each object
map can be moved or deleted.
canbe individually customized.
ASCII Files
ASCII boundary files may be produced and used to place boundary information on a
map. Two common ASCII files used for this purpose are blanking files and Atlas
boundary files.
Under most circumstances, it is recommended that ASCII files created for use in
Surfer use the blanking file format. Blanking files can be used as boundary files, and
may also be used with the Grid | Blank and Grid | Slice commands.
Coordinates
In Surfer, you can use map layers with different coordinate systems by setting the
source coordinate system for each map separately. Surfer displays the map in the
target coordinate system by changing the view of the individual maps. For example,
consider a contour map based on latitude/longitude coordinates.
290
Chapter 7 – Base Maps
To overlay a boundary map on the contour map, the boundary map must cover the
same general range as the contour map. But, the coordinate system can be any
coordinate system for this location.
291
Surfer
Remarks
In the Object Manager, if you click
on the Image object, the Image
Properties opens in the Property
Manager. There is a Spatial Extents
group in the Image Properties that
allows you to adjust the image
extents. This is not the same as
adjusting the Image Coordinates on
the Base Map page. After setting the Use the Image Coordinates section on the
Spatial Extents, you will need to reset Base Map page to change the coordinates
the map's Limits and Scale. of the base map image.
292
Chapter 7 – Base Maps
Note: Image files load as base maps in pixel coordinates unless the image is
referenced.
After setting the proper extents of the image, you may also need to set the coordinate
system. Set the base map's coordinate system on the Coordinate System tab.
Opacity
Change the Opacity of an image by
entering a value from 0% (completely
transparent) to 100% (completely
Remarks
Changing the Spatial Extents does not update the map Limits or Scale. After changing
the Spatial Extents, you may need to click on the Map object and change the options
on the Limits and Scale pages in the Property Manager.
293
Surfer
294
Chapter 8
Post Maps
Introduction to Post Maps
Post maps indicate X, Y locations with symbols and labels. Post maps display a fixed or
proportionally sized symbol at each data location. Posting data points on a map can be
useful for determining the spatial distribution and density of your data, as well as
placing data or text information at specific locations on the map. You can specify the
symbol type, size, color, and angle for the data points. An associated data value or
text string may be placed next to the posted point. The size, angle, color, and typeface
for the label can also be specified.
Post maps can be used to show the spatial distribution of the original data when
overlaid on a grid-based map, such as a contour map. This is often an excellent means
of presenting a qualitative measure for the accuracy of the contour lines on the map.
295
Surfer
Post maps are created from data files containing X and Y coordinates. These
coordinates are used to determine the locations for symbols on the post map. The
data files can contain additional information to size the symbols, determine the symbol
angle, or post text associated with the point location. To create a post map you must
first create a data file in the format described in the Data Files Used for Posting topic.
Classed post maps indicate XY locations with symbols and labels and require Z values
in addition to the XY coordinates. Classed post maps group the data into discrete
classes (bins). The data points are displayed using the symbol assigned to the class.
Classed post maps can also include a legend.
Classed post maps are also created from data files containing X and Y coordinates. The
X and Y coordinates are used to determine the locations for symbols on the post map.
A third worksheet column of numbers is used to separate the points into different
classes.
The limits of a post map or classed post map are based on the limits of the X and Y
coordinates contained within the associated data file. These limits can be changed if
necessary.
296
Chapter 8 – Post Maps
The data files can contain additional information to post text associated with the point
location. To create a classed post map you must first create a data file in the format
described in the Data Files Used for Posting topic.
1. Click the Map | New | Post Map command, or click the button.
2. Select a data file in the Open Data dialog and click Open.
3. The post map is created.
1. Click the Map | New | Classed Post Map command, or click the button.
2. Select a data file in the Open Data dialog and click Open.
3. The classed post map is created.
If the post map or classed post map does not have any symbols in it, the map may not
have the correct worksheet columns specified or may have text instead of numerical
values in the worksheet columns. To determine if this is the case, click on the map to
select it. In the Property Manager, click on the General tab. Open the Worksheet
Columns section, if necessary. Adjust the X coordinates and Y coordinates columns. If
the columns are specified correctly, check the data file to verify that the columns
contain numeric data. If the data columns are correct, the map limits may be
incorrect, preventing the data from being displayed. Click on the Map in the Object
Manager to select it. Check the values on the Limits tab.
297
Surfer
Alternatively, you can add the post map or the classed post map directly to the
existing contour map by creating the post map using the Map | Add command. This
automatically adds the post map or the classed post map to the contour map axes.
Another alternative, is to create both maps using the Map | New commands. Then,
select one map and drag the map layer to the other map object. This is equivalent to
using the Map | Overlay Maps command to overlay maps. For example, create a
contour map with the Map | New | Contour Map command. Create the post map
using the Map | New | Post Map command. This creates two separate maps. Click
on the post map, hold down the left mouse button, and drag the post map into the
contour map. A single map with two map layers, using one set of axes and scaling
parameters is created.
You can combine any number of post map or classed post maps with any other map.
Data files used for post maps and classed post maps can contain slightly different
information. Both types of files must contain X, Y coordinates used to locate the points
on the map. In addition, data files for classed post maps should contain a column with
298
Chapter 8 – Post Maps
data values used to determine the class for each point. If a third data column is not
available for the Z coordinates for a classed post map, the first data column is used.
A data file used to create a post map can contain several columns of data.
For classed post maps, the Z value is used to determine which class or bin will contain
the data. Classes are based on specified data ranges, and each class is assigned a
unique symbol. Classes can be saved and loaded for future use.
A common application for post maps and classed post maps is as overlays on contour
maps. While the Z values used to scale the posted symbols in a post map or to define
the classes in a class post map may be the same Z values used to generate the
contour map, this is not required. For example, the posted symbols could be used to
indicate rock type, while the contours show ore grade.
299
Surfer
SymbolSet:Index This form allows both the symbol set and the symbol index to be
specified. SymbolSet specifies the face name of the desired
symbol set. The colon character must appear between the
symbol set and the index. If the specified face name is invalid,
the default symbol set specified in the post map properties dialog
is used instead.
Index If a single integer is specified, it is interpreted as a symbol index
into the current symbol set. The current symbol set is the last
specified symbol set or the default symbol set specified in the
post map properties dialog.
<Empty> If the cell is empty, the last specified symbol set and default
symbol index is used.
Symbol Index
The symbol index is the symbol or font number as it appears in the Symbol Properties.
This is the 0-based offset of the symbol within the symbol set. However, if the current
symbol set is not Default Symbols, then 32 must be added to the index value obtained
from the Symbol Properties. This makes the symbol index the same as its ASCII code.
You can use the Window’s character map utility to determine the ASCII code for font
symbols.
If anything about the symbol specified in the data file is incorrect or missing, then the
default symbol is used.
300
Chapter 8 – Post Maps
301
Surfer
302
Chapter 8 – Post Maps
Data File
The Data file displays the current file used in the post map. If the entire file name is
not shown, place the mouse over the file name. A small window will appear with the
full path and name displayed.
Change File
Click the button to display the Open Data dialog. This allows a new or updated
data file to be specified for the post map. Select the new data file and click Open to
reference the new file.
Save File
Click the button to display the Save As dialog. This allows the data file used for
the post map to be saved to a new name. Set the File name, Save as type, and click
Save to save the file.
Worksheet Columns
The Worksheet Columns section specifies the columns to be used from the data file.
Symbol Column
The Symbol column specifies an optional column containing symbol information. See
Symbol Specifications in the Data File for more information. To change the symbol
column, click on the existing column name (or None) and select the column that
contains the symbol information.
Angle Column
The Angle column specifies an optional column containing an angle to rotate each
symbol. Positive values rotate the symbol counterclockwise the specified number of
degrees up to +360. Negative values rotate the symbol clockwise the specified
number of degrees down to -360. If an empty cell is encountered, the Default angle
(degrees) is used for that point.
303
Surfer
First Row
Set the First row to the first row in the worksheet for which you want a posted symbol
to be displayed. The default value is 1, which will start at the first numeric row of data
in the worksheet.
Last Row
Set the Last row to the last row in the worksheet for which you want a posted symbol
to be displayed. The default is the last row of data in the worksheet. To change the
last row, highlight the existing value and type a new value. To return to showing all of
the rows in the worksheet, check the All box. If the First row is set to 1 and the Last
row is set to All, all of the rows of data in the worksheet will be used.
Frequency
Use the Frequency setting to control how often data points are posted. A frequency of
1 posts every point. A frequency of 2 posts every other point, 3 posts every third, etc.
This is often used to reduce the number of displayed data points to avoid symbols
overwriting each other.
Symbol Size
The Symbol Size section allows you to specify the symbol size in two ways: fixed or
proportional.
304
Chapter 8 – Post Maps
Fixed Size
Change the Sizing method to Fixed size to use the same size symbols throughout the
map. To set a new symbol size, click on the existing number next to Symbol size.
Type in a new value, or use the up and down arrows to change the Symbol size value.
Select a value between zero and four inches (0 and 10.160 cm). The fixed size is
either in or cm, depending on whether Inches or Centimeters is selected for the Page
Units on the Drawing page of the Options dialog.
Proportional
Change the Sizing method to Proportional to use different sized symbols on the map.
Click the Scaling button next to Proportional to open the Proportional Scaling dialog.
Use the scaling information in the Proportional Scaling dialog to size all symbols
proportionally based on a data column.
Proportional Scaling
The Symbol Size group on the General page of the post map properties allows you to
specify the symbol Sizing method in two ways: fixed or proportional. Fixed size uses
the same size symbols throughout the map. Set the Sizing method to Fixed size and
set the Symbol size in page units. Change the Sizing method to Proportional to use
symbols that are scaled relative to a data column.
In the following example, there are three post maps. These post maps display the
same data. The first map shows a fixed symbol size. The second map shows
proportional symbols with the Scaling Method set to Linear. The third map shows
proportional symbols with the Scaling Method set to Square Root.
The left map shows the data with a Fixed Symbol. The middle map shows
proportional symbols with the Scaling Method set to Linear. The right map shows
proportional symbols with the Scaling Method set to Square Root.
305
Surfer
The Proportional option sizes all symbols proportionally, based on scaling information
in the Proportional Scaling dialog. By default, the scaling is based on the data in the
third worksheet column. This column usually contains the Z values. If you want to
scale your symbols based on data in a different column, click the Scaling button to
display the Proportional Scaling dialog. Select the desired column in the Worksheet
Column Containing Height drop-down list.
For proportional scaling, Surfer uses two Symbol Height / Data Value pairs to define
the scaling equations. These pairs define the symbol size at two different data values,
usually the minimum and maximum values in the height column. All values in
between are scaled proportionally. Assume the first symbol height is defined as H1
and is associated with the minimum Z value in the data file (Z1). Similarly, the
maximum symbol height is defined as H2 and is associated with the maximum Z value
in the data file (Z2). Then Hn is the symbol height for a symbol with the proportional
value Zn.
306
Chapter 8 – Post Maps
Hn = [ (Z n ]
− Z 1 ) / (Z 2 − Z 1 ) × (H 2 − H 1 ) + H 1
Square root scaling is commonly used with solid symbols to offset the fact that the
area increases as a function of the symbol height squared. Square root scaling is
essentially making the area of the symbol proportional to the Z value, rather than
making the size of the symbol proportional to the Z value.
Enter the values you wish to use for H1, H2, Z1, and Z2 into the Symbol Height and
Data Value fields, respectively.
Check the Use Data Limits option to use the minimum and maximum data values in
the specified height column for Z1, and Z2.
307
Surfer
Data File
The Data file displays the current file used in the classed post map. If the entire file
name is not shown, place the mouse over the file name. A small window will appear
with the full path and name displayed.
Change File
Click the button to display the Open Data dialog. This allows a new or updated
data file to be specified for the classed post map. Select the new data file and click
Open to reference the new file.
308
Chapter 8 – Post Maps
Save File
Click the button to display the Save As dialog. This allows the data file used for
the classed post map to be saved to a new name. Set the File name, Save as type,
and click Save to save the file.
Worksheet Columns
The Worksheet Columns section specifies the columns to be used from the data file.
Set X coordinates and Y coordinates to the columns containing the X and Y coordinates
respectively. The X and Y columns are used to place the points on the map. Set the Z
coordinates column to the column containing the values that will be used to determine
the classes. If an empty cell is encountered in any of these columns, the
corresponding point is excluded from the map.
Symbol Angle
The Default Angle (degrees) specifies the angle to apply to all the symbols on the
map. Positive angles of up to +360 degrees rotate the symbol in a counterclockwise
fashion. To change the symbol rotation, highlight the existing angle value and type a
new value or click and drag the until the symbols are rotated to the desired
amount.
Symbol Frequency
Use the Frequency setting to control how often data points are posted. A frequency of
1 posts every point. A frequency of 2 posts every other point, 3 posts every third, etc.
This is often used to reduce the number of displayed data points to avoid symbols
overwriting each other.
Legend
Check the Show legend option to display a classed post map legend. This legend
relates the symbols in the map to each class.
309
Surfer
Labels Page
When posting data points on a post map or classed post map, you can associate text
from the worksheet with each posted symbol. The position, font, and numeric format
can also be specified on the Labels page in the post properties and classed post
properties.
To add labels to a post map or classed post map, click once on the post map to select
it. In the Property Manager, click on the Labels tab.
Worksheet Column
Select the worksheet column containing the values or text from which you wish to
label the posted points in the Worksheet column list. Click on the existing worksheet
column or None to change to a new worksheet column.
310
Chapter 8 – Post Maps
Labels may be the original data values for the data points, or may be other identifying
text such as well names or sample numbers. Labels can use math text instructions to
define custom character formatting.
Angle (degrees)
The Angle (degrees) box specifies the angle in degrees to rotate the labels. Positive
angles rotate the symbols counterclockwise. To change the Angle (degrees), highlight
the existing angle value. Type a new value or click and drag the to the desired
angle position.
Plane
The Plane list specifies the coordinate plane that contains the label. To change the
Plane, select the existing plane and choose the new plane from the drop-down list. If
X-Y plane is selected, labels are oriented parallel to the XY plane of the map. As the
map is tilted in 3D, the labels tilt as well. This can make it hard to read the labels at
shallow tilt angles since the labels are viewed on edge. In this case, it may be better
to orient the labels in the Screen plane. Screen oriented labels are always displayed
perpendicular to the viewer’s line of sight, no matter how the map is tilted or rotated.
Font
Click the next to Font Properties to display the Font Properties section. The font
properties are applied to all labels.
Label Format
Click the next to Label Format to display the Label Format section. The numeric
format is applied to all numbers read from the specified label column.
311
Surfer
Leader Lines
The Leader Lines section is used when the post map or classed post map is tilted to
any angle other than 90 degrees or when a label is moved to a new location. The
leader line is drawn from the original label location to the new location.
312
Chapter 8 – Post Maps
3D Length
The 3D length defines the distance above the map that the points are posted when the
post map is tilted at a value other than 90 degrees. The 3D length box specifies how
long the label lines are and how far above the wireframe or tilted post map the labels
are drawn. 3D Leader Lines are not drawn on post maps overlaid on a 3D surface
map. The 3D length is a value between 0 and 10.000 inches (0 and 25.400
centimeters).
313
Surfer
Edit Post Labels. The cursor will change to a to indicate you are now in post label
editing mode. The post map labels can now be individually moved.
Labels can also be moved using the keyboard. To click on a label using the keyboard,
hold down the ARROW keys until the cursor is above the label. Press and hold the
SPACEBAR to select the label. Press the ARROW keys to move the label to a new
location. When the label is in the desired location, release the SPACEBAR.
314
Chapter 8 – Post Maps
The Post Map Properties warning message is displayed when you change
the label Position relative to symbol after moving post map labels.
Classes Page
The classed post map Classes page allows you to open the dialog to set classed post
map classes. To edit classed post map classes, click once on the classed post map to
select it. In the Property
Manager, click on the
Classes tab. Click the
Edit Classes button. The
Properties dialog will
open, allowing you to
edit the classes.
315
Surfer
In the Properties dialog, define the classes used to group the data values. Each class
is represented by a unique symbol in the classed post map.
The classed post Properties dialog allows you to define classes that
group data values. Click on any portion of the dialog for additional information.
Number of Classes
The Number of classes value is used to indicate how many classes or groupings there
will be on the map. When you change the Number of classes value, the class list box is
automatically updated to reflect the change. Surfer allows the creation of up to 30
classes. To change the number of classes, use the up and down arrows to scroll up to
20 classes or highlight the existing number and type in a new value from 1 to 30
classes.
Binning Method
The Binning Method specifies the method used to calculate the limits of the classes:
• Equal Number assigns the class ranges such that approximately equal numbers of
points are included in each class. Normally in this case, the interval of each class is
different.
• Equal Intervals assigns the class ranges so the interval between the >= Minimum
value and the <Maximum value is equal for each class. Normally in this case, a
different number of points is assigned to each class.
316
Chapter 8 – Post Maps
• User Defined allows you to set the >=Minimum value and the <Maximum value for
each class individually. This allows you to specify your own ranges for the classes.
Ranges defined in this way do not have to be contiguous. To change the
>=Minimum or <Maximum value, double-click the values in the class list.
• The >= Minimum list specifies the lower limit for each class of data. You can
double-click the number for any of the classes and change the value in the Class
Limit dialog.
• The <Maximum list specifies the upper limit for each class of data. You can
double-click the number for any of the classes and change the value in the Class
Limit dialog.
• The % column indicates the percentage of data points in the particular class. This
value cannot be directly edited and is for informational purposes only.
• The # column indicates the number of points included in each class. This value
cannot be directly edited and is for informational purposes only.
• The Symbol column displays the symbol used for each class. To change a symbol
or symbol property used for a particular class, double-click the symbol, and then
make changes in the Symbol Properties dialog.
• The Size column specifies the size of the symbol. To change the size of a symbol
for a particular class, double-click the Size value in the list, and change the value
in the Symbol Properties dialog.
317
Surfer
318
Chapter 8 – Post Maps
Frame
The Frame section specifies the properties to use for the border around the legend.
Type
The Type drop-down list specifies the type of border to use for the legend. You can
select None, Square, or Rounded for the frame type. Setting this value to None shows
no border around the box. Setting this value to Rectangle creates a rectangle at the
edge of the legend, at the Margin distance. Setting this value to Rounded creates a
rounded rectangle at the edge of the legend, at the Margin distance.
Margin
Margin specifies the distance between the edge of the Type frame and the text or
symbols within the legend. To set the Margin distance, highlight the existing value and
type in the new value or click the up and down arrows. Values are in inches or
centimeters, as determined by the page units.
Line
Click the next to Line Properties to open the Line Properties section. Set the Style,
Color, Opacity, and Width of the line to use for the legend frame.
Fill
Click the next to Fill Properties to open the Fill Properties section. Set the Pattern,
Color, and other fill properties to use for the foreground and background of the legend
area.
Title
The Title section allows you to create a title for the legend.
Title Text
Click in the box next to Title text and type the title for the legend. The title may
include math text instructions. Type the title exactly as you want the text to appear in
the legend.
To create a legend with multiple lines, click the button to open the Multiline
Text dialog. To add new lines in the title, press the ENTER key on the keyboard. To
return to the map, click OK in the Multiline Text dialog. The text will appear on the
legend when you click OK.
319
Surfer
Title Font
Click the next to Font Properties to open the Font Properties section. Set the font
properties to use for the legend title here. The legend title and legend class font
properties may be set separately.
Class
Use the Class section to specify how the different classes are represented in the
legend. This controls the type of information placed in the legend, and how the
information is formatted.
Template
The Template box allows you to customize the format of the legend items. The
specified template is applied to each class. Normal text and math text instructions can
be included within the template, in addition to the following special classed post map
legend template directives:
Any number of directives can be included in any order. For example, the following
template: Lower \lower \sym Upper \upper produces a classed post map legend that
looks like:
320
Chapter 8 – Post Maps
Reverse Order
The Reverse order check box reverses the order of the class list display. When the
Reverse order box is checked, the class with the largest values is at the top of the list.
When Reverse order is unchecked, the class with the smallest values is at the top of
the list.
Class Font
Click the next to Font Properties to open the Font Properties section. Set the font
properties to use for the class text here. The legend title and legend class font
properties may be set separately.
Class Format
Click the next to Label Format to open the Label Format section. This allows you to
set the numeric format used by numbers in the in the \lower and \upper template
directives.
321
Surfer
322
Chapter 9
Image Maps
Introduction to Image Maps
Image maps are raster maps
based on grid files. These maps
represent Z values (e.g.
elevations) with user specified
colors. Blanked regions on
image maps are shown as a
separate color.
1. Click the Map | New | Image Map command, or click the button.
2. Select a grid file in the Open Grid dialog and click Open.
3. The map is automatically created with the default settings.
323
Surfer
An alternative is to select one map and drag the map layer to the other map object.
For example, create a contour map with the Map | New | Contour Map command.
Create the image map using the Map | New | Image Map command. This creates
two separate maps. Click on the image map layer in the Object Manager, hold down
the left mouse button, and drag the image map into the map that contains the contour
map layer. A single map with two map layers, using one set of axes and scaling
parameters is created.
Image maps cannot be added as a map layer to 3D wireframe maps, but an image
map can be added to any other map layer, including 3D surface maps.
324
Chapter 9 – Image Maps
General Page
To edit an image map, click once on the image map to select it. The properties for the
image map are displayed in the Property Manager. The image map properties
General page contains the following options:
Grid Info
Click the button to
display information about
the grid file used to
produce the image map.
This shows the number The image map properties General page controls
of rows and columns in the display of image map colors, color scale bar,
the grid, the minimum pixel interpolation, and missing data.
and maximum X, Y, and
Z values in the grid file, and statistics. If the grid file is large, click the OK button in
the message box that appears to create a detailed grid report or click the Cancel
button to create a shorter, less detailed grid report.
325
Surfer
Change File
Click the button to display the Open Grid dialog. This allows a new or updated
grid file to be specified for the image map. Select the new grid file and click Open to
reference the new file.
Save File
Click the button to display the Save Grid As dialog. This allows the grid file used
for the image map to be saved to a new name. Set the File name, Save as type, and
click Save to save the file.
Colors
The Colors option defines the colormap used to fill the image map. Change the color
by clicking the existing color bar next to Colors. Select the new colormap from the list.
If the desired color map is not listed, click the Custom button at the bottom of the list.
The Colormap dialog appears. Make any changes and click OK to see the change on
the map. Refer to Chapter 17 for information about the Colormap dialog.
Interpolate Pixels
The Interpolate pixels
check box activates color
smoothing on the map.
When checked, Interpolate
pixels uses bilinear
interpolation to calculate
colors on the map. Bilinear
interpolation makes the
color gradations smoother,
but it can slightly slow the
on-screen drawing of the
image map.
These are two image maps of the same grid file. The
Interpolate pixels option has been checked for the map on
When a dense grid (a grid the left. This option has not been checked for the map on
with relatively large the right, and the grid cells are quite evident.
numbers of rows and
columns) is used, little difference is seen between the final image maps whether the
Interpolate pixels option is checked or not. For dense grids, on-screen drawing time
can be reduced when the Interpolate pixels option is unchecked.
326
Chapter 9 – Image Maps
When a coarse grid (a grid with relatively few rows and columns) is used and the
Interpolate pixels option is not checked, all pixels within a single grid square are
assigned the same color. This creates a grid-square map, and can result in an image
map with a very blocky appearance. For coarse grids, therefore, a smoother
appearance results when the Interpolate pixels check box is checked.
Note there is a difference between a grid node and a grid cell. The non-interpolated
image map maps each grid node to a pixel, which is expanded to a block of pixels to
make the map the correct size. The interpolated image map positions a grid node at
the four corners and then interpolates all the interior pixels.
Bilinear interpolation cannot be used to interpolate the contents of the cell if any of the
four corners of the cell are blanked. If a given node is blanked, the grid cell above
AND below that cell is also blanked because the value cannot be used in the
interpolation. For the non-interpolated mode, only the single blanked node is missing.
327
Surfer
328
Chapter 10
Shaded Relief Maps
Introduction to Shaded Relief Maps
Shaded relief maps are raster maps
based on grid files. These maps use
colors to indicate the local
orientation of the surface relative to
a user-defined light source
direction. Surfer determines the
orientation of each grid cell and
calculates reflectance of a point
light source on the grid surface. The
light source can be thought of as
the sun shining on a topographic
surface. Portions of the surface that
face away from the light source
reflects less light toward the viewer,
and thus appear darker.
329
Surfer
You can assign colors to represent the various reflectance values. Colors between the
assigned values are automatically blended to make a smooth gradation. Blanked
regions on shaded relief maps are shown as a separate color.
Any color scheme selected for a shaded relief map may be used with any other shaded
relief map, even if the associated grid files result in significantly different orientations
of the surface relative to the light source. Color schemes can be saved in color
spectrum .CLR files. Refer to Chapter 17 for more information on Colormaps.
1. Use the Map | New | Shaded Relief Map command, or click the button.
2. Select a grid file in the Open Grid dialog and click Open.
3. The map is created.
An alternative is to select one map and drag the map layer to the other map object.
For example, create a contour map with the Map | New | Contour Map command.
Create the shaded relief map using the Map | New | Shaded Relief Map command.
This creates two separate maps. Click on the shaded relief map layer in the Object
Manager, hold down the left mouse button, and drag the shaded relief map into the
map that contains the contour map layer. A single map with two map layers, using one
set of axes and scaling parameters is created.
330
Chapter 10 – Shaded Relief Maps
Shaded relief maps cannot be added as a map layer to 3D wireframe maps, but a
shaded relief map can be added to any other map layer, including 3D surface maps.
General Page
To edit a shaded relief map, click once on the shaded relief map to select it. The
properties for the shaded relief map are displayed in the Property Manager. The
shaded relief map properties General page contains the following options:
Grid Info
Click the button to display information about the grid file used to produce the
shaded relief map. This shows the number of rows and columns in the grid, the
minimum and maximum X, Y, and Z values in the grid file, and statistics. If the grid
331
Surfer
Change File
Save File
Change shaded relief map properties in the Property
Click the button to Manager on the General page.
display the Save Grid As
dialog. This allows the
grid file used for the shaded relief map to be saved to a new name. Set the File name,
Save as type, and click Save to save the file.
Relief Parameters
Specify the Colors, Gradient method, and Shading method, and Z scale factor in the
Relief Parameters section.
Colors
The Colors option defines the colormap used to fill the shaded relief map. Change the
color by clicking the existing color bar next to Colors. Select the new colormap from
the list. If the desired color map is not listed, click the Custom button at the bottom of
the list. The Colormap dialog appears. Make any changes and click OK to see the
change on the map. Refer to Chapter 17 for information about the Colormap dialog.
332
Chapter 10 – Shaded Relief Maps
Gradient Method
The Gradient method controls the smoothness of the shaded relief map.
The Central difference method averages the slope and orientation of the surface
across three adjacent grid nodes. This results in a smoother shaded relief surface.
Because a node on either side is required, edge cells are blanked. Blanked cells are
assigned the Missing Data color.
The Midpoint difference method computes the gradient at the center of each grid cell.
This method provides less smoothing, but does not blank the grid cells at the edge of
the map.
Shading Method
The Shading method specifies the algorithm used to compute the reflected light at
each grid cell. The Shading method determines how the colors are distributed in
relation to the slopes and slope directions (aspect) over the extent of the map. There
are four shading methods available for shaded relief maps.
Simple is the fastest of the shading methods, but produces a rather crude image. With
Simple, the Horizontal (degrees), or azimuth, and Vertical (degrees), or zenith, values
are fixed at 135 and 45 degrees, respectively, and cannot be changed.
Lambertian reflection assumes an ideal surface that reflects all the light that strikes it
and the surface appears equally bright from all viewing directions. The Light Position
Angles section allows the Horizontal (degrees), or azimuth, and Vertical (degrees), or
zenith, values to be specified with this option. This is the default Shading method.
333
Surfer
Z Scale Factor
The Z scale factor box allows you to specify the Z scale to use for the surface. As you
increase the Z scale factor, the surface becomes more exaggerated vertically.
Increasing the factor enhances the shading effect, and can be useful for bringing out
more detail, especially on relatively flat surfaces. The default Z scale factor scales the
Z coordinates to 1/10th the XY diagonal of the input grid.
The Horizontal (degrees) box defines the direction for the light source in the horizontal
plane. Zero degrees corresponds to the light source shining from due east toward the
west. Positive angles rotate the light source counterclockwise. For example, a specified
horizontal angle of 90 degrees places the light source north of the unrotated surface.
180 degrees places the light source west of the unrotated surface and shining east.
270 degrees places the light source south of the unrotated surface and shining north.
The default horizontal angle is set at 135 degrees, or NW. To change the Horizontal
(degrees), highlight the existing angle value. Type a new value or click and drag the
to the desired angle position.
The Vertical (degrees) box rotates the light source in the vertical plane. A vertical
angle of zero degrees places the light source at the horizon and shining horizontally.
An angle of 90 degrees places the light source directly overhead and shining down
onto the map. 180 degrees places the light source at the opposite horizon and shining
horizontally. 270 degrees places the light source directly below the map and shining
up. The default vertical angle is 45 degrees. As the vertical angle approaches zero,
shadows lengthen and the overall display shifts to the colors at the left end of the
color spectrum. To change the Vertical (degrees), highlight the existing angle value.
Type a new value or click and drag the to the desired angle position.
334
Chapter 10 – Shaded Relief Maps
Horn, B.K. (1982), Hill Shading and the Reflectance Map, Geo-Processing, v. 2, p. 65-
146.
335
Surfer
336
Chapter 11
Vector Maps
Introduction to Vector Maps
A vector map shows direction and magnitude of data at points on a map. You can
create vector maps from information in one grid in Surfer, or you can use two grids to
generate a vector map.
337
Surfer
1. Click the Map | New | 1-Grid Vector Map command, or click the button.
2. Select a grid file in the Open Grid dialog and click Open.
3. The 1-grid vector map is created.
1. Use the Map | New | 2-Grid Vector Map command, or click the button.
2. Select the first grid file in the Open Grid dialog. This is the X component or Angle
component grid file. Click Open.
3. Select the second grid file in the Open Grid dialog. This is the Y component or the
Length component grid file. Click Open.
4. The map is created.
338
Chapter 11 – Vector Maps
An alternative is to select one map and drag the map layer to the other map object.
For example, create a contour map with the Map | New | Contour Map command.
Create the vector map using the Map | New | 1-Grid Vector Map command or the
Map | New | 2-Grid Vector Map command. This creates two separate maps. Click
on the vector map layer in the Object Manager, hold down the left mouse button,
and drag the vector map into the map that contains the contour map layer. A single
map with two map layers, using one set of axes and scaling parameters is created.
Any number of vector maps can be combined with any other map layers.
339
Surfer
Grid Info
Click the button to display information about the grid file used to produce the 1-grid
vector map. This shows the number of rows and columns in the grid, the minimum
and maximum X, Y, and Z values in the grid file, and statistics. If the grid file is large,
click the OK button in the message box that appears to create a detailed grid report or
click the Cancel button to create a shorter, less detailed grid report.
340
Chapter 11 – Vector Maps
Change File
Click the button to display the Open Grid dialog. This allows a new or updated grid
file to be specified for the 1-grid vector map. Select the new grid file and click Open to
reference the new file.
Save File
Click the button to display the Save Grid As dialog. This allows the grid file used
for the 1-grid vector map to be saved to a new name. Set the File name, Save as
type, and click Save to save the file.
For a Polar (angle, length) 2-grid vector map, the grids contain Angle component and
Length component grids. The Angle component grid contains direction information.
The vector at each grid node will be pointed in the direction of the Angle component.
The Length component grid contains the length of the vector. The vector at each grid
node will be as long as the value in the Length component.
341
Surfer
For a Cartesian (X, Y) 2-grid vector map, the grids contain X component and Y
component grids. The X component grid contains the length of the vector in the X
direction. The Y component grid contains the length of the vector in the Y direction.
The direction of each vector will be found by adding the two grid files. The magnitude
is found using the Pythagorean theorem.
Grid Info
Click the button to display information about the grid file used to produce the 2-
grid vector map. This shows the number of rows and columns in the grid, the
minimum and maximum X, Y, and Z values in the grid file, and statistics. If the grid
file is large, click the OK button in the message box that appears to create a detailed
grid report or click the Cancel button to create a shorter, less detailed grid report.
Change File
Click the button to display the Open Grid dialog. This allows a new or updated grid
file to be specified for the 2-grid vector map. Select the new grid file and click Open to
reference the new file.
Save File
Click the button to display the Save Grid As dialog. This allows the grid file used
for the 2-grid vector map to be saved to a new name. Set the File name, Save as
type, and click Save to save the file.
Coordinate System
Cartesian (X, Y) or Polar (Angle, Length) can be used in a two-grid vector map. To
change the type of 2-grid vector map, click on the existing Coordinate system and
select the desired coordinate system from the drop-down list. The Cartesian (X, Y)
coordinate system requires one grid file with X magnitude components and the second
grid file with Y magnitude components. The Polar (Angle, Length) coordinate option
requires one grid with angle (direction) information and the second grid with length
(magnitude) direction for the vectors. The Length Component grid file cannot contain
negative values.
342
Chapter 11 – Vector Maps
Angle
When working with polar coordinates, set the location of the zero value to the north or
east in the Angle option. Setting Angle to 0=north, increases CW, creates a polar
system with increasing angles as shown in the left image below. Setting Angle to
0=east, increases CCW, creates a polar system with increasing angles as shown in the
right image below.
Angle Units
When working with polar coordinates,you can set the type of angle units used in the
grid file. Set the Angle units to either Degrees or Radians. This is the unit of the data
in the Angle component grid.
343
Surfer
Symbol Page
To edit a 1-grid vector
map or 2-grid vector
map, click once on the
vector map to select it.
The properties for the
vector map are displayed
in the Property Manager.
The vector map Symbol
page contains the
following options for the
vector symbol drawn at
each grid node:
Style
The Style list contains
several symbols to use to
display the vectors. To
change the symbol Style,
click on the existing
style. A drop-down list
appears. Click on a new
symbol from the list and
the map automatically
updates to show the new
symbol.
Frequency
The X frequency and Y
frequency settings
control the number of
symbols displayed on the Change vector symbol properties in the Property
Manager on the Symbol page.
vector map. If the
frequency is set to one, every symbol is displayed on the vector map. If the frequency
is set to two, every other symbol is displayed. If the frequency is set to three, every
third symbol is displayed on the vector map, and so on. The symbols are located at
grid nodes. So, skipping symbols skips vectors at the specified number of grid nodes
in the X or Y direction. If there are too many symbols on the vector map, increase the
X frequency and Y frequency numbers until the map becomes legible.
344
Chapter 11 – Vector Maps
Line Properties
Click on the next to Line Properties to open the line properties section. The Line
Properties control the line on the outside of a filled symbol. If the Scaling method is
set to By magnitude or By grid file, the Line Properties indicated in this section are not
used. For more information on Line Properties, refer to Chapter 22.
Fill Properties
Click on the next to Fill Properties to open the fill properties section. The Fill
Properties control the color and pattern of the area inside a filled symbol. If the
Scaling method is set to By magnitude or By grid file, the Fill Properties indicated in
this section are not used. For more information on Fill Properties, refer to Chapter 22.
Color Scaling
The Color Scaling section contains options for gradationally coloring the symbols.
Scaling Method
The Scaling method determines how to gradationally color the vector map symbols. To
change the Scaling method, click on the current method. A drop-down list appears.
Select the desired method and the map is updated.
When the Scaling method is set to Disabled, the Line Properties and Fill Properties
specified in the Symbol Properties section are used to color the vector symbols.
When the Scaling method is set to By magnitude, the vectors are gradationally
colored, by the length of the vector.
When the Scaling method is set to By grid file, the vectors are gradationally colored by
the value in another grid file. The grid file must contain the same grid line geometry as
the vector map grid files. This means the number of rows and columns and the grid
range must be the same for all grids. The vectors are colored according to the
corresponding Z value in the color grid file.
Vector Colors
The Vector colors option defines the colormap used to fill the vector map symbol when
Scaling method is set to either By magnitude or By grid file. Change the color by
clicking the existing color bar next to Vector colors. Select the new colormap from the
list. If the desired color map is not listed, click the Custom button at the bottom of the
list. The Colormap dialog appears. Make any changes and click OK to see the change
345
Surfer
on the map. The range for the colors is also set from the Colormap dialog. Refer to
Chapter 17 for information about the Colormap dialog.
Grid File
The Grid file displays the path and file name for the grid file used to color the vector
symbols when the Scaling method is set to By grid file. If the entire file name is not
shown, place the mouse over the file name. A small window will appear with the full
path and name displayed.
Grid Info
Click the button to display information about the grid file used to produce the colors
for the vector symbols. This shows the number of rows and columns in the grid, the
minimum and maximum X, Y, and Z values in the grid file, and statistics. If the grid
file is large, click the OK button in the message box that appears to create a detailed
grid report or click the Cancel button to create a shorter, less detailed grid report.
Change File
Click the button to display the Open Grid dialog. This allows a new or updated grid
file to be specified for the vector symbol colors. Select the new grid file and click Open
to reference the new file.
Save File
Click the button to display the Save Grid As dialog. This allows the grid file used
for the image map to be saved to a new name. Set the File name, Save as type, and
click Save to save the file.
346
Chapter 11 – Vector Maps
Scaling Page
The Scaling page contains placement and sizing options for vector symbols. Each
symbol is located at a grid node. The Scaling page has the following options:
347
Surfer
Symbol Origin
The symbol is located on the grid node with
the Symbol origin options. To change the
Symbol origin, click on the existing option
and select a new option from the drop-down
list. The symbol can be placed at the Tail, at
the Center, or at the Head. At the Tail,
places the end of the vector symbol on the
grid node. At the Head, places the tip of the
From left to right, the symbol arrow symbol at the grid node. At the Center
origin at the arrow's tail, center,
and head.
places the center of the vector at the grid
node.
Scaling Method
There are three ways to
scale vectors listed in the 2.00
Scaling method option.
You can scale the 1.90
symbols between the
minimum and maximum 1.80
data values linearly,
logarithmically, or by 1.70
square root. Linear
Vector Length
348
Chapter 11 – Vector Maps
To set the Minimum or Maximum value, highlight the existing value and type a new
value. Values are in Z magnitude units.
Shaft Length
Set the range of the arrow shaft length in the Shaft Length section. The Shaft Length
is the length of the arrow symbol from the tip of the tail to the tip of the arrow head.
The Minimum value is the smallest shaft length displayed in the map at the Minimum
value specified by the Magnitude (data) section. The Maximum value is the longest
shaft length displayed in the map at the Maximum value specified by the Magnitude
(data) section. Enter a new value into the boxes to change the length. Values are in
page units. Values can be between 0 and 10 inches (0 and 25.400 centimeters).
Head Length
Set the range of the head length in the Head Length section. The Head Length is the
length of the arrow head portion of the arrow symbol. The Minimum value is the
smallest arrow head displayed in the map at the Minimum value specified by the
Magnitude (data) section. The Maximum value is the longest arrow head displayed in
the map at the Maximum value specified by the Magnitude (data) section. Enter a new
value into the boxes to change the length. Values are in page units. Values can be
between 0 and 10 inches (0 and 25.400 centimeters). If the Head Length values
match the Shaft Length values, the arrow heads will be the entire length of the vector
map symbol.
349
Surfer
Symbol Width
Set the range of the symbol width in the Symbol Width section. The Symbol Width is
the width of the arrow head portion of the arrow symbol at the widest point. The
Minimum value is the smallest arrow head displayed in the map at the Minimum value
specified by the Magnitude (data) section. The Maximum value is the longest arrow
head displayed in the map at the Maximum value specified by the Magnitude (data)
section. Enter a new value into the boxes to change the length. Values are in page
units. Values can be between 0 and 5 inches (0 and 12.700 centimeters).
By default, the vector length legend appears with the text "Reference Vectors" as the
title. In addition, the minimum and maximum vector lengths are displayed in the
legend. Thes are set in the Magnitude (data) section on the Scaling page.
If the Scaling method on the Symbol page is set to By magnitude, the symbols in the
vector length legend are displayed with the minimum and maximum colors.
350
Chapter 11 – Vector Maps
Title Text
Legend titles can use any
text properties including
math text formatting
instructions. To enter a
new title for the legend,
highlight the default title,
"Reference Vectors" next
to the Title text. Type the
axis title on the Title text
line.
Font Properties
Click the next to Font Properties to open the Font Properties section. These font
properties are for the vector length legend title. You can change the title font, size,
style, and color. Refer to Chapter 22 for information on Font Properties.
351
Surfer
Reference Vectors
The Reference Vectors section includes options for the vectors displayed in the legend.
Magnitudes
If you would like to display different vector lengths in the legend, enter the new
lengths in the Magnitudes box. The new vectors are scaled relative to the scaling set
on the Scaling page in the vector map properties.
You can display more than two vectors in the legend by entering a string of numbers
separated by commas or spaces into the Magnitudes box. For example, 0.5, 10, 25, 50
would show four symbols in the vector legend.
Use Limits
If the Use limits box is checked, only two vectors are displayed in the vector length
legend. These are the Minimum and Maximum values set on the Scaling page in the
Magnitude (data) section. When checked, the legend will update to show the new
values when the Magnitude (data) changes.
Layout
The Layout option allows the symbols to be aligned vertically or horizontally in the
legend. To change the Layout, click on the existing option. Select either Vertical or
Horizontal in the drop-down list.
Font Properties
Click the next to Font Properties to open the Font Properties section. These font
properties are for the vector length labels. You can change the font, size, style, and
color. Refer to Chapter 22 for information on Font Properties.
Label Format
Click the next to Label Format to open the Label Format section, where you can
change the numeric format of the labels. You can change the number of digits, display
of thousands separators, or add a prefix or suffix to the labels. Refer to Chapter 22
for information on Label Format.
352
Chapter 11 – Vector Maps
Frame Type
The Frame section specifies the properties to use for the border around the legend.
You can set the Type of frame around the legend to Square, Rounded, or None. To
change the value, click the existing option and choose the new value from the drop-
down list.
• Choose Square to display a normal rectangle around the legend.
• Choose Rounded to display a rounded rectangle around the legend.
• Choose None for no frame.
Margin
The Margin is the distance between the legend text and the frame. Set the margin to a
number between zero to four inches.
Line Properties
Click the next to Line Properties to open the Line Properties section where you can
set the frame line style, color, and width. Refer to Chapter 22 for information on Line
Properties.
Fill Properties
Click the next to Fill Properties to open the Fill Properties section where you can set
the legend background fill pattern and color. Refer to Chapter 22 for information on Fill
Properties.
If a partial vector is drawn, but a full vector is desired, a change in the map limits is
required. Follow these steps to change the map limits:
1. Create a vector map using the Map | New | 1-Grid Vector Map or Map | New |
2-Grid Vector Map command.
2. Click on the map in the Object Manager or plot window to select it.
3. Click on the Limits page in the Property Manager.
4. If a partial vector is displayed at the bottom or left of the map, decrease the
values in the xMin and yMin boxes to display the entire vector.
353
Surfer
5. If a partial vector is displayed at the top or right of the map, increase the value in
the xMax and yMax boxes to display the entire vector.
Cartesian Data
Vector maps created with Cartesian data requires that one grid contain X component
data and the other grid contain Y component data. The data from the two grids are
combined to produce vector direction and magnitude. The components can be in
either negative or positive space. The direction and magnitude of the resulting vectors
are determined from the two grids as shown in the following example.
X Component Y Component
The maps above show two grid files. The left map displays an X component grid and the right
map shows a Y component grid. These maps both show X and Y components in positive space,
though the components can be in either negative or positive space. The direction and magnitude
of the resulting vectors are determined from the two grids as shown in the following example.
354
Chapter 11 – Vector Maps
Example
The lower right corner's X component is 3.5 and the Y component is 3.5. To simplify
the math, the origin of both is zero. The direction of the resulting vector is found by
adding the two vectors together:
4
A C
3
0 B
0 1 2 3 4
C = (C1 , C 2 ) = (3.5,3.5)
C = C12 + C 22
C = 3.5 2 + 3.5 2
C = 24.5
C = 4.95
The two grid vector components, are added together to produce the map shown on
the next page.
355
Surfer
Reference Vectors
Polar Data
2-grid vector maps created with polar data require that one grid contains angle
(direction) data and the other contains length (magnitude) data.
Alternatively, use a gridding method that does not trend the data as much
(Triangulation with Linear Interpolation or Natural Neighbor).
356
Chapter 11 – Vector Maps
Example
The example shows two grids: the angle grid on the left and the length grid on the
right. These two grids are combined to result in a vector map shown below:
357
Surfer
358
Chapter 12
3D Wireframes
Introduction to 3D Wireframes
Wireframes are three-
dimensional representations
of a grid file. Wireframes are
created by connecting Z
values along lines of
constant X and Y. Each XY
intersection occurs at a grid
node and the height of the
wireframe is proportional to
the Z value assigned to that
node. The number of
columns and rows in the grid
file determines the number
of X and Y lines drawn on
the wireframe.
This wireframe displays gradationally colored
lines that show elevation. The intersections
Wireframes can display any of the lines occur at grid nodes.
combination of X lines, Y
lines, or Z contour lines. On the wireframe, X lines correspond to the columns in the
grid file and Y lines correspond to rows in the grid file.
The grid limits define the extent of the wireframe. When creating a grid file, set the
grid limits to the desired limits for the wireframe. The wireframe cannot be larger or
smaller than the extent of the grid file. Use the Grid | Extract or Grid | Mosaic
commands to produce a subset or to thin a grid file. Use Grid | Spline Smooth to
increase the density of a grid file in order to add additional X and Y lines to the
wireframe. Use the Grid | Data command to create a new grid file with different
limits.
359
Surfer
Creating a 3D Wireframe
1. Use the Map | New | 3D Wireframe command, or click the button.
2. Select a grid file in the Open Grid dialog and click Open.
3. The map is created.
Alternatively, you can add the contour map directly to the existing wireframe map by
creating the contour map using the Map | Add command. This automatically adds the
contour map to the existing wireframe map axes.
Another alternative, is to create both maps using the Map | New commands. Then,
select one map and drag the map layer to the other map object. This is equivalent to
using the Map | Overlay Maps command to overlay maps. For example, create a
contour map with the Map | New | Contour Map command. Create the wireframe
map using the Map | New | 3D Wireframe command. This creates two separate
maps. Click on the contour map, hold down the left mouse button, and drag the
contour map into the wireframe map. A single map with two map layers, using one set
of axes and scaling parameters is created.
360
Chapter 12 – 3D Wireframes
3D Wireframe Properties
The wireframe properties section contains the following tabs: General, Z Levels,
Color Zones, and Layer. The Layer page is discussed in Chapter 18, Positioning and
Overlaying Maps.
Other map properties affecting a wireframe are View, Scale, Frame. These are
discussed in Chapter 14, Common Map Properties.
General Page
To edit a 3D wireframe, click once on
the wireframe map to select it. The
properties for the wireframe map are
displayed in the Property Manager.
The 3D wireframe properties General
page contains the following options:
Grid Info
Click the button to display
information about the grid file used to
produce the 3D wireframe map. This
shows the number of rows and columns Change 3D wireframe map properties
in the grid, the minimum and in the Property Manager on the
maximum X, Y, and Z values in the General page.
grid file, and statistics. If the grid file is
large, click the OK button in the message box that appears to create a detailed grid
report or click the Cancel button to create a shorter, less detailed grid report.
361
Surfer
Change File
Click the button to display the Open Grid dialog. This allows a new or updated
grid file to be specified for the wireframe map. Select the new grid file and click Open
to reference the new file. When the grid file is changed, the map limits are reset but
the data limits are not recalculated.
Save File
Click the button to display the Save Grid As dialog. This allows the grid file used
for the wireframe map to be saved to a new name. Set the File name, Save as type,
and click Save to save the file.
Border
The Border option controls the display of the border line around the outside of the
wireframe, at the intersection of the wireframe with the sides of the base. To change
the border display, click on the existing option next to Border. Select the new option in
the drop-down list. Options are to display the border on the Front Only, on All Sides,
or on None of the sides. The border line is not visible on wireframes displaying both X
and Y lines. The border line color is set in the Plot Lines of Constant section.
362
Chapter 12 – 3D Wireframes
X Lines
Check the box next to X to display lines of constant X value on the wireframe.
Line Properties
Click the next to the Line Properties to open the line properties section for the X
direction lines. Line style, color, opacity, and width can be altered.
Y Lines
Check the box next to Y to display lines of constant Y value on the wireframe.
Line Properties
Click the next to the Line Properties to open the line properties section for the Y
direction lines. Line style, color, opacity, and width can be altered.
Z Lines
Check the box next to Z to display lines of constant Z value on the wireframe.
Line Properties
Click the next to the Line Properties to open the line properties section for the Z
direction lines. Line style, color, opacity, and width can be altered.
Base
The Base section controls the display of a base on the wireframe. The base is the area
"underneath" the wireframe. The bottom of the base can be drawn at any Z level
relative to the surface.
363
Surfer
3. You can adjust the elevation of the base in the Elevation box. To change the
elevation, highlight the existing value and type a new one.
4. Click the next to the Line Properties to open the line properties section for the
base lines. Line style, color, opacity, and width can be altered.
Z Levels Page
To edit a 3D wireframe, click once
on the wireframe map to select it.
The properties for the wireframe
map are displayed in the Property
Manager.
Level
Evenly spaced Z levels are
assigned by clicking the
Level button. This displays
the Contour Levels dialog.
Set the Minimum, Maximum,
and Interval and click OK.
364
Chapter 12 – 3D Wireframes
The Z Value dialog opens. Enter a new value, and click OK. This method creates
unequal intervals between wireframe Z level lines.
Line
Click the Line button to open the Line Spectrum dialog and create gradational line
color.
Add
Click the Add button to add a level. The added level is placed between the currently
selected level and the level above the currently selected level with a value that is
halfway between the two level values.
Delete
Highlight a level and then click the Delete button to remove a level.
Load
Click the Load button to load a level file. Level files can be created manually, or with
wireframe or contour maps. When the level file contains additional options, like labels
and hachures, the selected level line properties affect the Z contours on the 3D
wireframe and do not display contour labels or hachures.
Save
Click the Save button to save a level file.
365
Surfer
Level
Evenly spaced Z levels are
assigned by clicking the Level
button. This displays the
Contour Levels dialog. Set
the Minimum, Maximum, and
Interval and click OK.
Line
Click the Line button to open the Line Spectrum dialog and create gradational line
color.
366
Chapter 12 – 3D Wireframes
Add
Click the Add button to add a level. The added level is placed between the currently
selected level and the level above the currently selected level with a value that is
halfway between the two level values.
Delete
Highlight a level and then click the Delete button to remove a level.
Load
Click the Load button to load a level file. Level files can be created manually, or with
wireframe or contour maps. When the level file contains additional options, like labels
and hachures, the selected level line properties affect the Z contours on the 3D
wireframe and do not display contour labels or hachures.
Save
Click the Save button to save a level file.
367
Surfer
click the button. Set the desired orientation parameters for the 3D wireframe.
Press the ESC key on your keyboard and the wireframe is redrawn at the
orientation you specify.
8. Alternatively, you can adjust the tilt, field of view, rotation, and projection values
on the View page of the Map properties.
368
Chapter 12 – 3D Wireframes
The highest precedence is applied to line properties assigned on the Color Zones
page. When the Apply zones to lines of constant check boxes on the Color Zones
page are enabled, those properties take precedence over any other assigned line
properties.
Line properties assigned in the Plot Lines of Constant section on the General page
have the same precedence as the line properties assigned on the Z Levels page. If
the options on the Color Zones page are not used, the next highest precedence are
selections on the General page or Z Levels page, whichever is changed last. The Z
Levels page colors are only used on Z lines.
369
Surfer
Line Properties
Line properties for wireframes are controlled from the wireframe properties in the
Property Manager. The X and Y line properties specified in the Plot Lines of Constant
section on the General page are applied over the entire surface without regard to the
relative level of the surface.
To assign X and Y line properties so that they change over the vertical range of the
surface, set the line properties on the Color Zones page. Color zone line properties
vary based on Z values in the grid file.
Use the Line Properties in the Plot Lines of Constant section on the General page to
apply the same line properties to all lines of constant Z without regard to level. To
apply Z line properties that vary according to elevation, use the options in the Z
Levels or Color Zones pages.
Wireframe Base
A 3D wireframe base is the area below the wireframe. The bottom of the base can
extend to any Z level. The sides of the base can be highlighted with vertical lines that
are extensions of the X and Y lines.
370
Chapter 12 – 3D Wireframes
Smoothing a Wireframe
The smoothness of a 3D wireframe map is a function of the density and topography of
the grid. For example, a 10 by 10 grid file (ten rows and ten columns) appears much
more angular than a 50 by 50 grid file created from the same data. To smooth the
wireframe map, you need to increase the number of rows and columns in the grid file.
You can increase the number of grid rows or columns in one of two ways. One method
is to create a new grid file with more lines in the X and Y directions in the Grid Data
dialog.
Alternatively, use the Grid | Spline Smooth command to insert additional rows and
columns into an existing grid file. Also, the Grid | Filter command can be used to
increase the smoothness of the map.
Wireframe Blanking
Blanked regions of a grid file are represented by low flat areas on a 3D wireframe
map. The level of the blanked region is set to the minimum Z value for the grid file.
For example, consider a blanked grid file that ranges from zero to 100 in the Z
dimension. When a wireframe is displayed, the blanked region appears as a large flat
area at the Z= Elevation value.
Digital Elevation Models (DEM) may have some blanking along the edges of the
surface. The DEM polygon contained within a 7.5-minute quadrangle consists of
profiles that do not always have the same number of data points because of the
variable angle between the UTM coordinate system and true north. The result is a
regular, stair-stepped arrangement of the data points along the edges of the map that
can translate to blanked grid nodes along the edges of grid files produced in Surfer.
371
Surfer
372
Chapter 13
3D Surfaces
Introduction to 3D Surfaces
The Map | New | 3D Surface
command can be used to create a
three-dimensional shaded rendering
from a grid file. The height of the
surface corresponds to the Z value of
the associated grid node. Denser grids
show greater detail on the surface.
373
Surfer
Alternatively, you can add the contour map directly to the existing surface map by
creating the contour map using the Map | Add command. This automatically adds the
contour map to the existing surface map axes.
Another alternative, is to create both maps using the Map | New commands. Then,
select one map and drag the map layer to the other map object. This is equivalent to
using the Map | Overlay Maps command to overlay maps. For example, create a
contour map with the Map | New | Contour Map command. Create the surface map
using the Map | New | 3D Surface command. This creates two separate maps. Click
on the contour map, hold down the left mouse button, and drag the contour map into
the surface map. A single map with two map layers, using one set of axes and scaling
parameters is created.
Surface maps can be layered with images, vector files, and other 3D surfaces. You can
overlay other map types, with the exception of 3D wireframes, on a surface. 3D
surface maps can be created independently of other maps, or can be combined with
other maps in map layers. Surfaces can be scaled, limited (clipped), or moved in the
same way as other types of maps.
If there are map layers on a 3D surface, and the surface is made invisible through the
Object Manager, the layers will not be visible.
374
Chapter 13 – 3D Surfaces
3D Surface Properties
The surface properties section contains the following pages: General, Mesh, Lighting
and Overlays. Other common map properties that affect a surface map – View,
Scale, Limits, and Frame are discussed in Chapter 14, Common Map Properties.
General Page
To edit a 3D surface map, click
once on the surface map to select
it. The properties for the surface
map are displayed in the Property
Manager. The 3D surface
properties General page contains
the following options:
Grid Info
Click the button to display
information about the grid file used Change 3D surface map properties in the
Property Manager on the General page.
to produce the 3D surface map. This
shows the number of rows and
columns in the grid, the minimum and maximum X, Y, and Z values in the grid file,
and statistics. If the grid file is large, click the OK button in the message box that
appears to create a detailed grid report or click the Cancel button to create a shorter,
less detailed grid report.
Change File
Click the button to display the Open Grid dialog. This allows a new or updated
grid file to be specified for the surface map. Select the new grid file and click Open to
reference the new file. When the grid file is changed, the map limits are reset but the
data limits are not recalculated.
375
Surfer
If the Z range for the new grid is outside the old Z range, the full color spectrum may
not be used. Click the Upper button in the Material Color section. Click the Custom
button at the bottom of the colormap drop-down list. In the dialog, check the Use data
limits box to use the full color spectrum. Click OK and the map is updated.
Save File
Click the button to display the Save Grid As dialog. This allows the grid file used
for the surface map to be saved to a new name. Set the File name, Save as type, and
click Save to save the file.
Color Scale
You can check the Show color scale option to display a color scale bar adjacent to the
map. The color scale bar indicates the colors assigned to the Z levels on the map and
the associated Z level values are displayed as labels on the color scale bar.
Layers
Check the Show layers box to show the overlay layers on the surface. For example,
add a post map layer to a surface. Check the Show layers box to make the post map
visible. Multiple layers can be combined into a single composite map, and this allows
the overlays to be displayed on an individual basis. The appearance of the overlay
layers is controlled on the Overlays page.
Material Color
The Material Color section shows the spectrum of colors used to color the upper and
lower sides of the surface. The light angle and colors also affect the appearance of the
surfaces.
Upper
The Upper color controls the main color spectrum of the surface map. To change the
upper surface colors, click on the color next to Upper. Select any new colormap from
the list. If the desired colormap is not displayed, click the Custom button at the
bottom of the drop-down list. The Colormap dialog opens, allowing you to specify
additional color options.
376
Chapter 13 – 3D Surfaces
Lower
The Lower button controls the single color of the bottom of the surface. Unless the
bottom of the surface is at a sufficient angle to the light source, there will be
insufficient reflection to see it. Also, as you increase the ambient light (colors closer to
white) the lower surface color becomes more visible because ambient light is
everywhere and directionless. To change the Lower surface color, click on the current
color next to Lower. Click on the new color in the drop-down list. To use a custom
color or set additional color options, click on the Custom button. The Colors dialog
opens, allowing you to set additional options.
Shininess
Shininess controls the size of the specular reflections. As the shininess percentage
increases, the reflections become more focused. Select a value between 0 and 100. To
change the value, highlight the existing Shininess percentage value and type a new
value or use the up and down arrow buttons to scroll to a new value.
Blanked Nodes
The Blanked Nodes section defines how blanked nodes are handled in the surface map.
Set the Method to Don't draw (blank) or Remap to.
• If Don't draw (blank) is selected, the blanked areas are not drawn on the map and
appear as small transparent gaps in the surface.
• If Remap to is selected, type the new Z value into the Remap value option below.
The Remap value is in Z coordinate units. Make sure the new value is within the
range of Z values in the current map.
Base
To change the base properties:
1. Check the Show base box to fill the base from the edge of the surface to the axis
lines. This creates the look of a filled solid.
2. Click the Edit Base Properties button next to Properties to change the base color.
In the Fill and Line Properties dialog, set the desired fill and line properties for
the base.
3. The Show Base option can be useful when creating block diagrams.
377
Surfer
Mesh Page
To edit a 3D surface map, click once
on the surface map to select it. The
properties for the surface map are
displayed in the Property Manager.
The 3D surface Mesh page is used
to add mesh lines to the surface of
the map. Mesh lines can be used to
simulate a wireframe.
Lines of Constant X
Check the Draw lines box under the
Lines of Constant X to draw lines
along the surface at constant X
values.
Line Properties
Click the next to the Line Properties to open the line properties section for the X
direction mesh lines. Line style, color, opacity, and width can be altered. Refer to
Chapter 22 for more information on line properties.
Lines of Constant Y
Check the Draw lines box under the Lines of Constant Y to draw lines along the surface
at constant Y values.
Frequency
You can change the frequency of the Y lines by entering a new number into the
Frequency box. If this value is one, every grid node in the Y direction will have a mesh
line. If this value is two, every other grid node in the Y direction will have a mesh line.
If this value is three, every third grid node in the Y direction will have a mesh line, and
so on.
378
Chapter 13 – 3D Surfaces
Line Properties
Click the next to the Line Properties to open the line properties section for the Y
direction mesh lines. Line style, color, opacity, and width can be altered. Refer to
Chapter 22 for more information on line properties.
Surface Offset
If you overlay two or more 3D surface maps, the mesh lines may appear dashed or
broken. Experiment with the Surface offset values to change the distance between
where the surface and mesh lines are drawn. The value is not associated with map
units, instead it is offset by a factor. It is recommended that small changes be made
to the Surface offset when trying to make the lines more clear.
Mesh Tips
• The default line frequency is one line in each direction.
• The mesh offset value o is calculated by:
o = (m)(factor)+r
where
m = maximum depth slope of the polygon
factor = user-specified value in Surface offset, values typically range from 0.0
to 5.0
r = the smallest value guaranteed to produce a resolvable difference in
window coordinate depth values (a constant)
379
Surfer
Lighting Page
To edit a 3D surface map, click
once on the surface map to select
it. The properties for the surface
map are displayed in the
Property Manager. The 3D
surface Lighting page controls
the lighting for the entire multi-
layer map. This includes the
surface and any overlays that
may have been combined with
the surface. The light source is
fixed relative to the surface, so if
the surface is rotated, the light
rotates with it.
Light Position
The Light Position section specifies the orientation of the light source. The light source
can be thought of as the sun shining on a topographic surface.
The Horizontal (degrees) box defines the direction for the light source in the horizontal
plane. Zero degrees corresponds to the light source shining from due east toward the
west. Positive angles rotate the light source counterclockwise. For example, a specified
horizontal angle of 90 degrees places the light source north of the unrotated surface.
180 degrees places the light source west of the unrotated surface and shining east.
270 degrees places the light source south of the unrotated surface and shining north.
The default horizontal angle is set at 135 degrees, or NW. To change the Horizontal
380
Chapter 13 – 3D Surfaces
(degrees), highlight the existing angle value. Type a new value or click and drag the
The Vertical (degrees) box rotates the light source in the vertical plane. A vertical
angle of zero degrees places the light source at the horizon and shining horizontally.
An angle of 90 degrees places the light source directly overhead and shining down
onto the map. 180 degrees places the light source at the opposite horizon and shining
horizontally. 270 degrees places the light source directly below the map and shining
up. The default vertical angle is 45 degrees. As the vertical angle approaches zero,
shadows lengthen and the overall display shifts to the colors at the left end of the
color spectrum. To change the Vertical (degrees), highlight the existing angle value.
Type a new value or click and drag the to the desired angle position.
Light Colors
There are three different types of light color, Ambient, Diffuse, and Specular. Note that
these colors are used to represent reflectivity. White is 100% reflective and reflects
the material color unaltered to the viewer. Black is 0% reflective, and causes all
material color to be absorbed. Our perception of color is based on reflected and
absorbed light. For example, a leaf appears green because it absorbs all colors in the
light spectrum EXCEPT green. Since only green is reflected to your eye, the leaf
appears green.
Surfer uses a pure white light source. The light "strikes" the surface and some of the
light is absorbed based on the color of the surface material at the point the light ray
struck it. Some light is reflected to the viewer according to the type of light (Ambient,
Diffuse, and Specular), and the reflectivity color associated with each type of light
specified in the Light Colors section.
• Ambient refers to light that has been scattered so evenly by the environment that
its direction is impossible to determine. Increasing the ambient light component
brightens the scene without casting shadows. The default Ambient color is 90%
black which means that the ambient light contribution is fairly small.
• Diffuse refers to light coming from a particular direction and is brighter if aimed
directly down on a surface than barely glancing off the surface. When diffuse light
hits the surface, it is scattered uniformly in all directions so that it appears equally
bright no matter where the eye is located. Increasing diffuse light intensifies
shadow effects. The default Diffuse color is white, which is the maximum amount
of reflectivity.
• Specular refers to light coming from a particular direction, and tends to bounce off
the surface in a preferred direction. A shiny surface such as metal has a high
specular component, while a surface like carpet has almost no specular
381
Surfer
Overlays Page
To edit a 3D surface map, click once
on the surface map to select it. The
properties for the surface map are
displayed in the Property
Manager. The 3D surface Overlays
page contains options to control how
overlay layers are combined with
the surface plot. Overlay layers are
converted into an image known as a
texture map. This texture map is
applied to the surface by stretching Change overlay properties in the
Property Manager on the Overlays page.
it and shrinking it as necessary.
Note that this stretching applies to
all graphics in the overlays, including text. If the text is positioned over a steep
portion of the surface, it can be stretched quite a bit, resulting in significant distortion.
The usual solution to this is to view the surface from a higher angle to minimize
stretching along the Z axis.
Resampling Method
When the texture map is stretched, the colors in the original overlay must be
resampled to a new size and position. The Resampling method specifies how the
texture map is resampled. To change the Resampling method, click on the current
method. In the drop-down list, select the desired method. The options are Linear and
Nearest. Linear uses bilinear interpolation to combine the four surrounding pixels.
Bilinear interpolation results in higher quality, but is usually slower. Nearest uses the
nearest pixel in the source image.
382
Chapter 13 – 3D Surfaces
Resolution
The Resolution refers to the resolution of the texture map. High-resolution texture
maps result in more detail, but line and text features become thinner and may
eventually fade or break up. If lines appear too thin, you should change the Resolution
to a smaller value. The default value of Automatic allows Surfer to automatically
determine what the best resolution should be. Options are 64, 128. 256, 512, or 1024.
The Resolution is the pixel count of the overlaid texture map onto the surface map.
Color Modulation
Color modulation refers to the method used to combine the texture map and surface
material colors. You can Use surface color only, Use overlay color only, or you can
Blend overlay and surface colors. When set to Use surface color only, any other
overlays will not be shown in the map. The surface map color is defined by the Upper
colormap on the General page. When Use overlay color only is selected, the surface
map color does not appear. The color is defined by any maps that are overlaid onto
the surface. When Blend overlay and surface colors is selected, the surface map color
and the overlaid maps are combined to form a new color. To change the Color
modulation, click on the current option. In the drop-down list that appears, select the
new option. The map will automatically update.
383
Surfer
The Fill and Line Properties dialog provides the following options:
Fill Style
The fill Style contains options for filling
the surface base. Choose None from
the Style list if you do not want to fill
the base. Choose Solid from the Style
list to fill the base with a solid color.
Choose Lighted from the Style list to fill
the base with a solid color and use the
lighting properties.
Fill Color
Click the Color button to set the color of
the base fill. To change the base fill
Color, click on the current color next to
Color. Click on the new color in the Set 3D surface map base
drop-down list. To use a custom color fill and line properties in the
or set additional color options, click on Fill and Line Properties dialog.
the Custom button. The Colors dialog
opens, allowing you to set additional options.
Line Style
The line Style controls the line style for the outline of the base fill. Choose None from
the Style list if you do not want to outline the base. Choose Solid from the Style list to
outline the base with a solid line.
Line Color
Click the Color button to set the color of the base line. To change the base line Color,
click on the current color next to Color. Click on the new color in the drop-down list. To
use a custom color or set additional color options, click on the Custom button. The
Colors dialog opens, allowing you to set additional options.
Line Width
The Width controls the thickness of the base line. To change the Width, highlight on
the current width and type a new value or use the up and down arrows to
incrementally change the value. Enter a Width value from 0.000 to 0.500 inches
(0.000 to 1.270 centimeters) for the base outline.
384
Chapter 13 – 3D Surfaces
3D Surface Tips
• Image base maps can be added to surface maps if both maps contain the same
coordinate ranges. You may need to change the image coordinates so the maps
use the same coordinates.
• Two or more 3D surface maps can be overlaid with one another. This is useful if
you want to join two adjacent surface maps. Alternatively, you can use Grid |
Mosaic to create one grid.
• Surface maps do not have a source coordinate system. All maps that are overlaid
onto a surface map must have the same coordinates.
385
Surfer
386
Chapter 14
Common Map Properties
Introduction to Common Map Properties
Map properties common to all layers are located in the Property Manager when the
Map object is selected in the Object Manager. These properties include the View,
Scale, Limits, Frame, and Coordinate System. If there are multiple map layers in a
map frame, the changes made on the View, Scale, Limits, Frame, and Coordinate
System pages apply to all layers.
The map scale for the X axis and the map scale for the Y axis can be set in unison
(proportionally), or they can be set independently. On 3D wireframes and 3D surfaces,
the map scale for the Z axis can also be set.
Map limits are defined as the X and Y extents of the map. When a map is first created,
the map limits are set to the minimum and maximum X and Y coordinate values in the
grid file, base map, or data file used to create the map. You can accept these as the
limits for the map, or you can specify custom limits using the options on the Limits
tab. Custom limits are useful when plotting only a portion of a map.
In addition to adding color to maps, a background can be added behind the map. The
Frame page sets the background fill properties and the border line properties for a
map. The map background limits coincide with the axis limits on a contour, base, post,
387
Surfer
and vector maps. On 3D wireframes, the map background refers to the bottom plane
of the base. On 3D surfaces, the background color is blended with the surface.
The map coordinate system is the target coordinate system for the map. A coordinate
system has a defined projection and datum. If some map layers are using a different
coordinate system, the layer is converted to the map coordinate system. The map's
Coordinate System is the new coordinate system that you want to use to project
your X, Y coordinate data. 3D surface maps and wireframe maps do not have a
coordinate system associated with them. When the map Coordinate System
changes, these maps do not change.
388
Chapter 14 – Common Map Properties
Map Properties
The Map Properties control View, Scale, Limits, Frame, and Coordinate System
of Surfer maps. You can specify the View, Scale, Limits, Frame, and Coordinate
System in the Property Manager when a map is selected.
View Page
Maps can be displayed at any
orientation using the map properties,
View tab. The projection, rotation, tilt,
and field of view of a map are changed
on this page.
Multiple Maps
Control the orientation of the map
When you have more than one map on the or maps on the View page.
page, the View settings are applied to all
selected maps. For example, this command is useful if you have a contour map and
3D wireframe based on the same grid file and displayed in the same plot window. You
can select the map object for both the contour map and 3D wireframe. In the
Property Manager, click on the View tab to change the settings for both maps at
one time.
Projection
The Projection group sets the type of projection for the selected maps. Perspective
projections more closely simulate reality, but Orthographic projections maintain
parallel lines and allow accurate measurements to be taken from the drawing.
Perspective Projection
The Perspective projection creates a visual effect whereby the size of the surface
varies with the distance from the observer. When a Perspective projection is used, you
can change the Field of View value to increase or decrease the perspective effect.
389
Surfer
Orthographic Projection
The Orthographic projection creates a plot with a projection of the surface onto a
plane, oriented perpendicular to the line of sight between the observer and the
surface.
This is the same wireframe using different projection parameters. The map on the left
uses an Orthographic projection. The map in the middle uses a Perspective projection
with a Field of View value of 20 degrees. The map on the right uses a Perspective
projection with a Field of View value of 75 degrees.
Rotation
The Rotation scroll bar controls the rotation of the map about the center. As the
Rotation value increases, the map rotates in a counterclockwise direction.
This is the same wireframe displayed at the same tilt angle but different rotation angles.
390
Chapter 14 – Common Map Properties
Tilt
Tilt refers to the orientation of the Z axis
in the map display. A zero degree tilt
means the Z axis lies in the plane of the
page or screen. As the angle of tilt
increases, the Z axis tilts toward the
viewer. A 90 degree tilt means the XY
plane lies in the plane of the page or
screen and is orthogonal to the viewing
direction. The default tilt is 30 degrees
for 3D wireframes and 3D surfaces, and
90 degrees for all other map types.
When you tilt three dimensional maps
(i.e. 3D surface) to 90 degrees, the The Tilt angle is defined by increasing the
surface relief is no longer visible. viewing plane, as shown here.
This is the same wireframe displayed at the same rotation angle but
different tilt angles: 10, 30, and 45 degrees.
Field of View
The Field of view controls the
perspective effect of the
Perspective projection option. The
perspective effect is the visual
effect of the map changing size
relative to the distance from the
observer.
perspective as if the observer was very close to the viewpoint. The Field of view angle
is formed by the left edge of the bounding box, the viewpoint, and the right edge of
the bounding box. The image below illustrates the bounding sphere wedged into the
viewing cross section.
With an Orthographic projection the Field of view values have no effect. Note that the
Field of view parameter does not influence the map scale.
Scale Page
The scale controls the size of a map on the
printed page. This is accomplished by defining
a correspondence between lengths on the map
(in map units) and lengths on the printed page
(in page units). The map scale is specified
using the Scale page in the map properties.
The scale for the X axis and the scale for the Y
axis can be set in unison (proportionally), or
they can be set independently. On three-
dimensional maps (i.e. wireframes and surface
maps), the scale for the Z axis can also be set.
For example, consider a map extending 60 map units in the X dimension and 40 map
units in the Y dimension. Since the extent in the X dimension is longer than the extent
in the Y dimension, the map is drawn six inches wide. The resulting scale is 10 map
units per inch. The scale in the Y dimension is also 10 map units per inch, so the map
is drawn four inches in height.
392
Chapter 14 – Common Map Properties
These are two 3D wireframe maps of the same grid, each using a
different Z scale. The Z scale is exaggerated in the top view.
Use the Scale page to change the length of the Z axis.
On three-dimensional maps the default scale in the Z dimension is defined such that
the vertical extent of the map is one-fourth the maximum horizontal extent.
The default scales are a function of the map limits. Map limits are determined by the
file used to create the map, or they can be defined using Limits page.
X, Y, and Z Scale
The X Scale, Y Scale, and Z Scale sections
specify the scale along the indicated axis.
Each axis can be scaled independently. When
the Proportional XY Scaling box is checked,
any changes made to the scale for the X or Y
dimensions is automatically reflected in the
other dimension. Z scaling is always
independent of the X and Y scaling.
For example, if the map is 8000 units in the dimension you are setting, the map is 8
inches long in that dimension.
393
Surfer
Length
The Length (page units) option sets the length of the map in the X, Y, or Z dimension.
When the Length (page units) value is changed, the Map units per In. (cm.) box is
automatically updated to reflect the change.
Proportional XY Scaling
The Proportional XY scaling check box ensures that the X and Y dimensions are scaled
equally. When the box is checked, a change in either the X or Y dimension is reflected
in the other dimension by a proportional amount. To scale the axes independently,
uncheck the box.
Sizing a map with its selection handles does not rescale the map internally, it just
resizes the map on the screen. To return to the proper scale, use the Arrange |
Transform command to clear the transform, and then use the Scale page to scale
the map.
For example, consider a contour map of soil temperature as a function of depth and
time. Depth is measured in feet, while time is measured in days. Clearly, one day is
not equivalent to one foot. The two axes must be scaled differently because two
different types of units are used for the two axes. Depth data might be collected every
half foot from zero to four feet in depth, and the time data might be collected every
day over a 30-day period. The depth axis extends four units and the time axis extends
30 units. Default scaling would produce a map six inches long in the time dimension
by 0.8 inches high in the depth dimension. You uncheck the Proportional XY scaling
box on the Scale page and then set the map scaling so 30 units in the time dimension
is equal to four units in the depth dimension. The map is then plotted at six inches by
six inches.
394
Chapter 14 – Common Map Properties
This shows the map of California before and after scaling. The map on the
right is scaled up in the Y dimension so the map does not appear compressed.
This equation assumes a Clark 1866 reference ellipsoid. Note: For kilometers, you can
substitute the number 111.3 for 69.172 in the formula above.
The following table illustrates the change as you move from the equator to the poles.
Latitude Distance Covered by One Degree of Longitude
0° (equator) 69.172 miles
30° 59.956 miles
60° 34.674 miles
90° (poles) 0 miles
395
Surfer
So, how can you put this information to use? Remember that you are plotting degrees
of latitude and longitude, but what you really want to show on the map are the correct
distances. You must scale the longitude values correctly for the correct distances to be
represented on the map. The scaling factor to apply for maps is based on the cosine of
the latitude for the area you are working on.
Example
For an example, consider a map of the state of Montana. When you plot the map on a
one to one scale, the map appears stretched in the east-west direction. To understand
this problem, consider that for Montana the latitude ranges from 44.36° to 49°. The
latitude for the center of the map is determined from this to be 46.68°. The cosine of
46.68° is 0.686. The distance covered by one degree of longitude at this latitude is
only 0.686 times the distance covered
by one degree of latitude. To reduce
the distortion on this map, you must
correct for this difference.
396
Chapter 14 – Common Map Properties
Limits Page
The Limits page in the Property Manager lets you
define the X and Y minimum and maximum map
coordinates (specified as xMin, xMax, yMin, and
yMax values). The Limits page is unavailable if When you apply scaling factors,
there is a 3D wireframe layer in a multi-layer map distances are represented
map. more accurately. The rectangular
spacing of graticule lines indicates
the difference in scaling.
When a map is created, the limits are
automatically defined by the coordinate values contained in the file used to create the
map. The limits of the selected map can be adjusted on the Limits page of the map
properties.
397
Surfer
Example
398
Chapter 14 – Common Map Properties
Example
The map limits have been reset on this map. The Left Axis and Top
Axis use automatic scaling and match the new map limits. The
Right Axis and Bottom Axis do not use automatic scaling,
and reflect the original limits of the map.
399
Surfer
Frame Page
The map properties Frame page sets the map border line properties and the
background fill properties for the selected map. The map background limits coincide
with the axis limits on contour, base, post, 3D surface, and vector maps.
Map backgrounds lie underneath all other objects on the map. This means that the
background can be obscured by other map features. For example, when you create
color filled contour maps, the fill between contours obscures the map background
wherever a solid or image pattern is used for the contour fill. Similarly, the outline of
the map background can be obscured by the map axes.
400
Chapter 14 – Common Map Properties
The Frame page is located in the Property Manager when a Map object is selected.
Specify the map border and background properties on the Frame page.
401
Surfer
3D surface maps and wireframe maps do not have a coordinate system associated
with them. When a map with a Coordinate System is overlaid onto either of these
maps, the map coordinate system is removed and the maps are displayed in the
Cartesian coordinates.
The Coordinate System page is located in the Property Manager when a Map
object is selected.
402
Chapter 15
Coordinate Systems
Introduction to Coordinate Systems
A coordinate system is method of defining how a file's point locations display on a
map. There are different types of coordinate systems that control how the coordinates
are shown on the map. In Surfer, a map can be unreferenced in local coordinates,
referenced to a geographic lat/long coordinate system, or referenced to a known
projection and datum.
403
Surfer
The standard procedure for creating maps in a specific coordinate system is as follows:
1. Create the map by clicking on the appropriate Map | New command.
2. Click on the map layer to select it. In the Property Manager, click on the
Coordinate System tab.
3. If the Coordinate System is not correct, click the Set button next to Coordinate
System. The Assign Coordinate System dialog opens.
4. Make any changes in the dialog. This is the existing coordinate system for the map
layer. When finished making changes, click OK.
5. To change the coordinate system for the map, click on the Map object. In the
Property Manager, click on the Coordinate System tab.
6. If the Coordinate System is not correct, click on the Change button next to
Coordinate System to set the desired target coordinate system. When finished,
click OK.
7. The entire map is now displayed in the desired target system.
Surfer does not require a map projection be defined. Maps can be created from non-
referenced data, grid, and map layers, working in the same manner as previous
versions of Surfer worked to create unreferenced maps. If you do not specify a source
coordinate system for each map layer, it is highly recommended that you do not
change the target coordinate system for the map. Changes to the target coordinate
system for the map can cause the unreferenced map layers to appear incorrectly.
3D surface maps and wireframe maps do not have a coordinate system associated
with them. When a map with a Coordinate System is overlaid onto either of these
maps, the map coordinate system is removed and the maps are displayed in the
Cartesian coordinates.
404
Chapter 15 – Coordinate Systems
When you change a vector map coordinate system, only the location of the vectors
changes. The components of the grids, including the direction of the vectors, are not
projected. It is assumed that the grid components are in the map coordinate system
units.
The Coordinate System page is located in the Property Manager when a map layer
object is selected.
Click the Set button next to Coordinate System to open the Assign Coordinate
System dialog. This dialog lets you set the source coordinate system. This is the
coordinate system for the original data, grid, or base map.
405
Surfer
The Coordinate System page is located in the Property Manager when a Map
object is selected.
Click the Change button next to Coordinate System to open the Assign Coordinate
System dialog. This dialog lets you set the desired target coordinate system. This is
the coordinate system in which you want the map to be displayed.
406
Chapter 15 – Coordinate Systems
The standard procedure for creating maps in a specific coordinate system is as follows:
1. Create the map by clicking on the appropriate Map | New command.
2. Click on the map layer to select it. In the Property Manager, click on the
Coordinate System tab.
3. If the Coordinate System is not correct, click the Set button next to Coordinate
System. The Assign Coordinate System dialog opens.
4. Make any changes in the dialog. This is the existing coordinate system for the map
layer. When finished making changes, click OK.
5. Add the second map to the first using the appropriate Map | Add command.
6. After the second map layer appears, click once on it to select it. In the Property
Manager, click on the Coordinate System tab.
7. If the Coordinate System is not correct, click the Set button next to Coordinate
System. The Assign Coordinate System dialog opens.
8. Make any changes in the dialog. This is the existing coordinate system for the
second map layer. This coordinate system can be different from the first map layer
and has no effect on the first map layer. When finished making changes, click OK.
9. To change the coordinate system for the map, click on the Map object. In the
Property Manager, click on the Coordinate System tab.
10. If the Coordinate System is not correct, click on the Change button next to
Coordinate System to set the desired target coordinate system. When finished,
click OK.
11. The entire map is now displayed in the desired target coordinate system.
407
Surfer
Notes
Currently, imported metafiles do not change coordinates. When the coordinate system
changes from the source coordinate system, the metafile is removed from the map
view. When the coordinate system changes back to the metafile's coordinate system,
the metafile reappears. To have metafile coordinate system changed, the metafile
needs to be broken apart. To do this, click once on the metafile to select it. Click the
Arrange | Ungroup command. The metafile becomes a collection of lines, text,
polygons, and images.
3D surface layers and wireframe layers do not have a coordinate system associated
with them and cannot be converted to a different coordinate system. For this reason,
there is not a Coordinate System tab in the Property Manager for the surface
layer, the wireframe layer, the Map object, or any other map layer when either a
surface layer or wireframe layer exists in the Map.
When a surface map or wireframe map is created first, the Map object and Surface
layer or the Map object and Wireframe layer are set to an unreferenced coordinate
system. Any map layers subsequently added to the Map must be in the same units as
the surface or wireframe layer.
When a surface layer or wireframe layer is added to an existing map, the coordinate
system of the existing map must first be set to the same coordinate system as the
surface or wireframe map to be added. To determine the coordinate system for the
surface or wireframe layer, you may need to create a contour map from the grid file,
first. Match the Map coordinate system to this grid file. Then, add the surface map or
wireframe map.
Text is stretched slightly in the horizontal and vertical directions (before rotation) so
that the text will occupy the same overall space as it did before being geotransformed.
This can cause the individual characters to be spaced slightly closer together or further
apart than the characters appeared before the coordinate system conversion. The text
is still in the correct geographic location as it appeared before the transformation.
Image base maps do change coordinates when the map target coordinate system
changes. Surfer does not cache the image in the transformed georeferenced
coordinates. This means every time the zoom is changed, or the map is scrolled, or
the map properties change, the image is re-transformed. With large images, this may
lead to slow redraw times.
408
Chapter 15 – Coordinate Systems
Assign Coordinate
Assign a projection to your file or map layer in
System Dialog the Assign Coordinate System dialog.
The Assign Coordinate System
dialog provides the following options:
Projection Categories
Click the button to expand the options in the Assign Coordinate System dialog.
Click the button to collapse the options.
Local System
Expand Local System to select the Unreferenced local system, which contains a
Projection of None, a Datum of None, and a Warp of None.
For example, you may have a data set with an arbitrary coordinate system (i.e. not
real world X, Y coordinates). You would assign this data to a Local System, if a
coordinate system is necessary.
409
Surfer
Predefined
Expand the Predefined section by clicking the button. The Predefined section
includes all coordinate systems that have been predefined for Surfer.
Geographic (lat/lon)
Expand Geographic (lat/lon) to select a Latitude/Longitude coordinate system and
datum that fits your needs. Detailed information about each projection is listed at the
bottom of the dialog when the system is selected. If your data is currently in a form of
lat/lon, you would want to select one of the options in Geographic (lat/lon).
Projected Systems
Expand Projected Systems to select a predefined Polar/Arctic/Antarctic,
Regional/National, State Plane, UTM, or World coordinate system. Detailed information
about each projection is listed to the right when the datum is selected.
Templates
Expand the Templates section to select a predefined template. Click the desired
template and press the Modify button to change the properties. Once modified, the
new coordinate system is added to the Custom section.
Favorites
Select a coordinate system and click the Add to Favorites button to add a coordinate
system to your Favorites list. Select a coordinate system and click the Remove from
Favorites button to remove a coordinate system from your Favorites list. By default,
no favorite coordinate systems are specified. It is recommended that systems that you
use frequently and Custom systems that you intend to use more than once be added
to the Favorites section for ease of navigation.
Custom
Expand Custom to see the custom coordinate system you have defined for the current
file. Custom systems can be defined by clicking the New button. By default, no custom
coordinate systems are specified. Custom coordinate systems are only listed in the
dialog when the file using the custom coordinate system is open.
If a Custom coordinate system is defined and intended to be used more than once, it
is highly recommended that the system be added to the Favorites section by clicking
the Add to Favorites button.
410
Chapter 15 – Coordinate Systems
Add to Favorites
Click the Add to Favorites button to add a projection to your Favorites list. This is very
useful if you frequently use the same projection, such as World Geodetic System
1984. This is also useful for Custom systems that will be used on multiple project files.
Adding the projection to the Favorites list makes selecting the projection easier in the
future.
Remove
Select a coordinate system in the Favorites list and click the Remove from Favorites
button to delete the system.
411
Surfer
Name
Specify a custom name for the new coordinate system in the Name box.
412
Chapter 15 – Coordinate Systems
Projection
Select a projection from
the Projection drop-down
list. Specify custom
Parameter and Value
options. Unprojected
Lat/Long does not have
Parameter and Value
options to specify.
Datum
Select a datum from the Datum drop-down list. Specify custom Parameter and Value
options to fit your needs.
OK
Click OK to create your new custom coordinate system. The coordinate system will be
listed in the Custom section of the Assign Coordinate System dialog for this file. If
you want to save the custom coordinate system for future use, add the custom
coordinate system to the Favorites section.
413
Surfer
Cancel
Click Cancel to return to the Assign Coordinate System dialog without creating a
custom coordinate system.
Map Projection
Maps are usually seen in a flat, two-dimensional medium such as a drawing on paper
or an image on a computer screen. Since the surface of the Earth is curved, or three-
dimensional, the visual elements on the surface must somehow be transformed from
three dimensions to two in order to display a map of the Earth's surface. Projections
are a mathematical process by which the visual elements are transformed from three
dimensions to two.
Surfer supports several of the projections that are most often used in modern
cartography and related fields. The Surfer worksheet allows you to load data and
define the projection using the Data | Assign Coordinate System. You can then
convert the data to another coordinate system using the Data | New Projected
Coordinates command to project the data in another projection, ellipsoid, or datum.
Surfer's plot window allows you to assign a coordinate system to a grid file using the
Grid | Assign Coordinate System. You can also load maps, assign map coordinate
systems using the Source Coordinate System for each map layer, and convert the
entire map to another system using the Target Coordinate System.
There are many excellent textbooks and publications on this subject, and we do not
attempt to explain projections in full detail here. If you need or want more
information, you might consider reading the references that provide good introductory
discussions of map projections.
414
Chapter 15 – Coordinate Systems
Ellipsoids
For maps of the Earth where accuracy is not of particular concern, we can safely
assume that the Earth is perfectly spherical in shape. For small-scale maps, the
difference between a sphere and ellipsoid is not detectable on the map.
While an ellipsoid is a closer approximation of the Earth's shape than a sphere, the
Earth's surface is not entirely uniform in curvature, so any ellipsoidal representation of
the Earth is still only an approximation. This being the case, cartographers have
historically used a number of slightly different ellipsoidal representations in attempts
to produce more accurate maps of different regions of the Earth.
Ellipsoids are defined by the ellipse being used and by the amount of rotation of the
ellipse. An ellipse has two axes. The longer axis is the Semimajor Axis. The shorter
axis is the Semiminor Axis. Rotating the ellipse around the semiminor axis creates the
ellipsoid.
415
Surfer
In Surfer, the ellipsoid can be defined by the Semimajor Axis and the Semiminor Axis
or by the Semimajor Axis and the Inverse Flattening (1/f) value. The flattening value
ranges from zero to 1, so the Inverse Flattening (1/f) value must be larger than 1. The
flattening value is determined by:
In the Assign Coordinate System dialog, click the New button to define a new
coordinate system. In the Define Coordinate System dialog, the Datum group
allows you to specify parameters for the datum. The Ellipsoid can be customized in
terms of Name, Semimajor Axis, Semiminor Axis, and Inverse Flattening (1/f). The
Semimajor Axis, Semiminor Axis, and Inverse Flattening ratio should be set in meters.
If you do not understand ellipsoids and datum definitions, it is recommended you use
the defaults.
Datums
Since coordinates on the Earth's surface can be recorded under widely varying
assumptions about the shape and size of the Earth and the locations of the poles and
prime meridian, cartographers have developed a standard for identifying the frame of
reference for a coordinate system. This standard is called the datum. Because the
frames of reference differ, a coordinate recorded in one datum usually has slightly
different latitude and longitude values from the same point recorded in any other
datum.
When combining data from multiple sources into a single map, it is important that all
of the coordinate systems being combined specify the projection and datum
accurately. Since each datum has slightly different latitude and longitude values for
the same coordinates, mixing coordinates from multiple datums together without fully
defining the datum introduces inaccuracies into the map. Surfer will automatically
convert different source coordinate systems from different datums to the target
coordinate system.
416
Chapter 15 – Coordinate Systems
A datum conversion can be used to convert coordinates from one datum to another
using the Data | New Projected Coordinates command. Click the ... next to the
Target Coordinate System to open the Assign Coordinate System dialog. Click New
to define a new projection and datum. The Define Coordinate System dialog has the
Conversion Method and Ellipsoid parameters necessary to allow you to define a
coordinate system with a custom datum.
Several different Conversion Methods may be used for converting coordinates from
one datum to another:
Molodensky The Molodensky method is the most widely used method of datum
conversion. It adjusts latitude and longitude coordinates by taking
into account the displacement between two datum's ellipsoids on all
three axes. It does not take into account any rotational differences
between the two ellipsoids.
Bursa- The Bursa-Wolfe method is similar to the Molodensky method, but in
Wolfe some instances it produces more accurate results because it takes
into account both displacement and rotational differences between
two ellipsoids. Surfer supports the Bursa-Wolfe method for
conversions from the WGS84 datum to the following datums: World
Geodetic System 1972, DHDN-1, DHDN, Australian Geodetic 1984,
ANS84, MRT - Everest Modified, Switzerland - CH1903, NTF France -
Paris Meridian, and Pulkovo 1942 - Hungary.
Datum
The Datum drop-down list contains predefined datums. Select a datum to populate the
Parameter and Value columns. Customize the parameters and values as needed.
Conversion Method
The Conversion Method controls the method of datum conversion and the conversion
parameters. The conversion methods include Molodensky, Bursa-Wolfe, and None.
417
Surfer
• The Molodensky method is the most widely used method of datum conversion. It
adjusts latitude and longitude coordinates by taking into account the displacement
between two datum's ellipsoids on all three axes. It does not take into account any
rotational differences between the two ellipsoids.
• The Bursa-Wolfe method is similar to the Molodensky method, but in some
instances it produces more accurate results because it takes into account both
displacement and rotational differences between two ellipsoids.
• Choose None if the predefined methods do not suite your purpose. If you select
<custom> from the Ellipsoid Name list, you can specify your own ellipsoid model
parameters.
Ellipsoid
The Ellipsoid group contains options for defining the ellipsoid. Use these settings to
define the ellipsoid model that best approximates the curvature of the Earth's shape in
the map region. If you do not understand ellipsoids and datum definitions, it is
recommended you use the defaults.
• The Name list contains a collection of ellipsoid models that cartographers have
historically used in attempts to produce more accurate maps of different regions of
the Earth. The Name list also contains the option to create a <custom> ellipsoid.
• The Semimajor Axis box can be edited to define the major axis.
• The Semiminor Axis box can be edited to define the minor axis.
• The Inverse Flattening (1/f) can be edited to define the flattening ratio.
• The X Displacement, Y Displacement, and Z Displacement are the axis
displacements in meters.
Prime Meridian
The Prime Meridian section contains options for defining the prime meridian Name and
Prime Meridian Shift. A meridian is a line of constant longitude running north-south on
a map. The zero meridian or prime meridian is used as a reference line from which
longitude east and west is measured. The prime meridian passes through Greenwich,
England. The Prime Meridian Shift is the shift from the prime meridian, typically 0
degrees, in decimal degrees.
418
Chapter 15 – Coordinate Systems
The ellipsoid is used to approximate the global differences. But additional differences
exist because of the actual topographic surface. Local datums were created to locally
account for these differences. The datum includes the ellipsoid, the prime meridian
shift, and any offsets in the X or Y direction. Because local datums align the ellipsoid
with a particular location on the earth's surface, local datums are not suitable for use
outside the designed area.
In the Define Coordinate System dialog, you can choose how datums are converted
from one datum to another. This is the Conversion Method. The Molodensky method is
the most widely used method of datum conversion. It adjusts latitude and longitude
coordinates by taking into account the displacement between two datum's ellipsoids on
all three axes. It does not take into account any rotational differences between the
two ellipsoids. The Bursa-Wolfe method is similar to the Molodensky method, but in
some instances it produces more accurate results because it takes into account both
displacement and rotational differences between two ellipsoids. Surfer supports the
Bursa-Wolfe method for conversions from the WGS84 datum to the following datums:
World Geodetic System 1972, DHDN-1, DHDN, Australian Geodetic 1984, ANS84, MRT
- Everest Modified, Switzerland - CH1903, NTF France - Paris Meridian, and Pulkovo
1942 - Hungary.
419
Surfer
Changing the datum incorrectly can cause maps to appear wrong or not appear at all.
It is adviced that chaning the datum be done with caution and a basic understanding
of the local datums is advised.
Types of Projections
Most forms of projection operate by projecting Earth coordinates onto a geometric
shape that can be easily flattened to a two-dimensional image. This mathematical
transformation is commonly referred to as a map projection. A map projection
systematically projects locations from the surface of the spheroid to represent
positions on the geometric shape.
Three geometric shapes are frequently used: Cylinder, Cone and Plane. Apart from
these there are other types of mathematical projections based on mathematical
tables.
Cylinder
Earth coordinates may be projected onto a cylinder. The cylinder is cut lengthwise and
unrolled to make a two-dimensional map. This type of projection is called a cylindrical
projection.
Examples of this type of projection are: Cassini, Equidistant Cylindrical, Hotine Oblique
Mercator, Mercator, Miller Cylindrical, Oblique Mercator, Transverse Mercator, and
Universal Transverse Mercator.
Cone
Earth coordinates may be projected onto a cone. The point of the cone is usually
directly above the pole and the sides of the cone pass through the globe at two user-
defined latitudes, called the Standard Parallels. At the standard parallels, there is no
difference between the east-west and north-south scales. The cone is cut from tip to
base and unrolled to make a two-dimensional map. This type of projection is called a
conic projection.
420
Chapter 15 – Coordinate Systems
Examples of this type of projection are: Albers Equal Area, Equidistant Conic, Lambert
Conformal Conic, Polyconic, and Bonne.
Plane
Earth coordinates may be projected directly onto a flat plane. This type of projection is
called an azimuthal projection. Projections of this type are recommended for maps of
polar regions because cylindrical and conic projections generally either have severe
distortion in polar regions or are unable to project coordinates in polar regions.
Other Projections
There are some other projections which do not belong to either of the above
categories. These are Pseudocylindrical, Pseudoconic, or based on some other
mathematical projection or mathematical tables.
Examples of this type of projection are: Eckert IV, Eckert VI, Mollweide, Robinson,
Robinson-Sterling, Sinusoidal, State Plane*, Unprojected Lat/Long, and Van der
Grinten.
421
Surfer
Characteristics of Projections
Some projections are imbued with characteristics that tell us if certain types of
measurements (e.g. measurements of distance, area, etc.) are accurate on the
projected map. Some of these characteristics could be categories as: Equal Area,
Conformal, Equidistant, Azimuthal, and Other category.
Equal Area
An equal area projection is when the area of any given part of the map is preserved.
This means that the any object that covers the same area on the Earth as any other
part of the map will be the same size.
For example, if a one inch diameter circle on the map covers a 100 mile diameter
circle on the Earth's surface, then we know that a one inch diameter circle anywhere
else on the map is known to cover another 100 mile diameter circle on the Earth.
Examples of this type of projects are: Albers Equal Area, Bonne, Eckert IV, Eckert VI,
Lambert Azimuthal Equal Area, Mollweide, and Sinusoidal.
Conformal
A conformal projection preserves local shapes. This means that when the local angles
for points on the map are represented accurately. This means that the angles between
any given point and any nearby points are accurate, but are not necessarily accurate
for widely separated points on the map.
However, the drawback of this type of project is that in order for a projection to be
conformal, consistency in the surface areas, shapes, and/or scales across the map
must be sacrificed. An area enclosed by a series of arcs may be greatly distorted.
422
Chapter 15 – Coordinate Systems
Examples of this type of projects are: Hotine Oblique Mercator, Lambert Conformal
Conic, Mercator, Oblique Mercator, State Plane Coordinate System, Transverse
Mercator, and Universal Transverse Mercator.
Equidistant
An equidistant projection is when the scale between at least one specific origin point
on the map with respect to every other point on the map is represented accurately.
Azimuthal
An azimuthal projection is when the direction of (or angle to) all points on the map are
accurate with respect to the center point of the projection.
Other
Some projections try to minimize the effects of all distortions and as a result do not
minimize any one distortion in particular. Examples being: Polyconic, Robinson and
Robinson-Sterling, Unprojected Lat/Long, and Van der Grinten.
423
Surfer
Expand the Predefined section by clicking the + button. The Predefined section
includes all coordinate systems that have been predefined for Surfer.
424
Chapter 15 – Coordinate Systems
Several different projections fit into this category: Albers Equal Area Conic, Azimuthal
Equidistant, Cassini, Gnomonic, Hotine Oblique Mercator, Lambert Azimuthal Equal
Area, Lambert Conformal Conic, Mercator, Polyconic, Stereographic, Transverse
Mercator, and UTM.
Coordinates are in latitude and longitude, feet, meters, or occasionally other units. The
differences between the projections are in the definition of the false easting, northing,
central longitude, central latitude, standard parallel or datum. Projections are defined
for specific countries or specific regions. Properties for each coordinate system and
datum are listed in the dialog by clicking on the desired system.
425
Surfer
central latitude, standard parallel or datum. Projections can be used for multiple
countries or specific regions, depending on the projection type. Properties for each
coordinate system and datum are listed in the dialog by clicking on the desired
system.
Supported Projections
In this section the supported projections and different parameters of each projection,
are discussed in detail.
426
Chapter 15 – Coordinate Systems
Parameter Description
Name Specifies the units used in the map.
Scale Specifies the unit scale of the projected map, relative to meters. For example, a
scale of one means one unit in the projected map equals one meter; a scale of
two means two units in the projected map equal one meter; etc.
False Easting Specifies the false easting, or horizontal offset, of the projected coordinates, in
meters. False Eastings and False Northings are added to the underlying
"projected" coordinates as a way to arbitrarily offset their internal XY
coordinates after the projection. Unless you have a reason for using these offset
values, do not use them. These values do not affect the latitude/longitude
coordinates for the map, only the internal coordinates used to plot the map on
the screen. If you use False Easting and False Northing offsets for a map, any
subsequent boundaries you append to the map must also use these same
offsets if you want the imported boundaries to be drawn in the correct relative
position to the existing boundaries.
False Specifies the false northing, or vertical offset, of the projected coordinates, in
Northing meters. See above.
Central Specifies the central longitude of the projection in degrees. The Central
Longitude Longitude value typically should be defined as the longitudinal center of the
map you are going to produce. For example, the value -95.5 represents the
geographic center of the United States, so the map of the U.S. is drawn upright.
Central Specifies the central latitude of the projection in degrees. The Central Latitude
Latitude value should be defined as the latitudinal center of the map you are going to
produce. This value is only significant when you define False Easting and False
Northing values.
Standard Specifies the latitude of the first of two standard parallels, in degrees. The
Parallel standard parallels typically are defined at approximately one-sixth of the
distance inside the north and south limits of the map. For example, if your map
latitude ranges from 30° to 36°, you could place your Standard Parallels at 31°
and 35°. There are alternative methods for determining the best position of the
standard parallels. Please see Snyder for more information.
2nd Specifies the latitude of the second of two standard parallels, in degrees. See
Standard above.
Parallel
427
Surfer
Parameter Description
Name Specifies the units used in the map.
Scale Specifies the unit scale of the projected map, relative to meters. For
example, a scale of one means one unit in the projected map equals one
meter; a scale of two means two units in the projected map equal one
meter; etc.
False Easting Specifies the false easting, or horizontal offset, of the projected coordinates,
428
Chapter 15 – Coordinate Systems
in meters. False Eastings and False Northings are added to the underlying
"projected" coordinates as a way to arbitrarily offset their internal XY
coordinates after the projection. Unless you have a reason for using these
offset values, do not use them. These values do not affect the
latitude/longitude coordinates for the map, only the internal coordinates used
to plot the map on the screen. If you use False Easting and False Northing
offsets for a map, any subsequent boundaries you append to the map must
also use these same offsets if you want the imported boundaries to be drawn
in the correct relative position to the existing boundaries.
False Northing Specifies the false northing, or vertical offset, of the projected coordinates, in
meters. See above.
Central Specifies the central longitude of the projection in degrees. The Central
Longitude Longitude value typically should be defined as the longitudinal center of the
map you are going to produce.
Standard Specifies the central latitude of the projection in degrees. The Standard
Parallel Parallel value typically should be defined as the latitudinal center of the map
you are going to produce.
Bonne Projection
The Bonne projection is a
pseudo-conical, equal area
projection. The scale is
constant along any given
parallel, and accurate along
the specified standard
parallels. The Bonne projection
is distortion-free along the
central longitude and the
parallels. This projection is
used for continental and
topographic mapping.
Parameter Description
Name Specifies the units used in the map.
Scale Specifies the unit scale of the projected map, relative to meters. For
example, a scale of one means one unit in the projected map equals one
meter; a scale of two means two units in the projected map equal one
meter; etc.
429
Surfer
False Easting Specifies the false easting, or horizontal offset, of the projected coordinates,
in meters. False Eastings and False Northings are added to the underlying
"projected" coordinates as a way to arbitrarily offset their internal XY
coordinates after the projection. Unless you have a reason for using these
offset values, do not use them. These values do not affect the
latitude/longitude coordinates for the map, only the internal coordinates
used to plot the map on the screen. If you use False Easting and False
Northing offsets for a map, any subsequent boundaries you append to the
map must also use these same offsets if you want the imported boundaries
to be drawn in the correct relative position to the existing boundaries.
False Northing Specifies the false northing, or vertical offset, of the projected coordinates,
in meters. See above.
Central Specifies the central longitude of the projection in degrees. The Central
Longitude Longitude value typically should be defined as the longitudinal center of the
map you are going to produce.
Standard Specifies the central latitude of the projection in degrees. The Standard
Parallel Parallel value typically should be defined as the latitudinal center of the map
you are going to produce.
430
Chapter 15 – Coordinate Systems
Cassini Projection
The Cassini projection is a cylindrical projection.
The scale is accurate along the central longitude
and along latitude lines perpendicular to the
central longitude.
Parameter Description
Name Specifies the units used in the map.
Scale Specifies the unit scale of the projected map, relative to meters. For example,
a scale of one means one unit in the projected map equals one meter; a scale
of two means two units in the projected map equal one meter; etc.
False Easting Specifies the false easting, or horizontal offset, of the projected coordinates,
in meters. False Eastings and False Northings are added to the underlying
"projected" coordinates as a way to arbitrarily offset their internal XY
coordinates after the projection.
Unless you have a reason for using these offset values, do not use them.
These values do not affect the latitude/longitude coordinates for the map, only
the internal coordinates used to plot the map on the screen. If you use False
Easting and False Northing offsets for a map, any subsequent boundaries you
append to the map must also use these same offsets if you want the imported
boundaries to be drawn in the correct relative position to the existing
boundaries.
False Specifies the false northing, or vertical offset, of the projected coordinates, in
Northing meters. See above.
Central Specifies the central latitude of the projection in degrees. The Central Latitude
Latitude value typically should be defined as the latitudinal center of the map you are
going to produce.
Central Specifies the central longitude of the projection in degrees. The Central
Longitude Longitude value typically should be defined as the longitudinal center of the
map you are going to produce.
431
Surfer
Eckert IV Projection
The scale is constant along any given parallel and accurate along the parallels 40°30'
north and south in the Eckert IV projection. This is a pseudo-cylindrical, equal area
projection with the central longitude half the length of the equator. The poles are
represented by lines half the distance of the equator as well. The meridians are semi-
ellipses. Eckert IV is designed to produce aesthetically pleasing world maps.
432
Chapter 15 – Coordinate Systems
Eckert VI Projection
The scale is constant along any given parallel, and accurate along the parallels 49°16'
north and south in the Eckert VI projection. This is a pseudo-cylindrical, equal area
projection with the central longitude half the length of the equator. The poles are
represented by lines half the distance of the equator as well. The meridians are
sinusoidal. The Eckert VI projection is useful for world maps.
Parameter Description
Name Specifies the units used in the map.
Scale Specifies the unit scale of the projected map, relative to meters. For example,
a scale of one means one unit in the projected map equals one meter; a scale
of two means two units in the projected map equal one meter; etc.
False Easting Specifies the false easting, or horizontal offset, of the projected coordinates,
in meters. False Eastings and False Northings are added to the underlying
"projected" coordinates as a way to arbitrarily offset their internal XY
coordinates after the projection. Unless you have a reason for using these
offset values, do not use them. These values do not affect the
latitude/longitude coordinates for the map, only the internal coordinates used
to plot the map on the screen.
If you use False Easting and False Northing offsets for a map, any subsequent
boundaries you append to the map must also use these same offsets if you
want the imported boundaries to be drawn in the correct relative position to
the existing boundaries.
False Specifies the false northing, or vertical offset, of the projected coordinates, in
433
Surfer
Parameter Description
Name Specifies the units used in the map.
Scale Specifies the unit scale of the projected map, relative to meters. For example,
a scale of one means one unit in the projected map equals one meter; a scale
of two means two units in the projected map equal one meter; etc.
False Easting Specifies the false easting, or horizontal offset, of the projected coordinates,
in meters. False Eastings and False Northings are added to the underlying
"projected" coordinates as a way to arbitrarily offset their internal XY
coordinates after the projection. Unless you have a reason for using these
offset values, do not use them. These values do not affect the
latitude/longitude coordinates for the map, only the internal coordinates used
434
Chapter 15 – Coordinate Systems
435
Surfer
Parameter Description
Name Specifies the units used in the map.
Scale Specifies the unit scale of the projected map, relative to meters. For example,
a scale of one means one unit in the projected map equals one meter; a scale
of two means two units in the projected map equal one meter; etc.
False Easting Specifies the false easting, or horizontal offset, of the projected coordinates, in
meters. False Eastings and False Northings are added to the underlying
"projected" coordinates as a way to arbitrarily offset their internal XY
coordinates after the projection. Unless you have a reason for using these
offset values, do not use them. These values do not affect the
latitude/longitude coordinates for the map, only the internal coordinates used
to plot the map on the screen. If you use False Easting and False Northing
offsets for a map, any subsequent boundaries you append to the map must
also use these same offsets if you want the imported boundaries to be drawn in
the correct relative position to the existing boundaries.
False Specifies the false northing, or vertical offset, of the projected coordinates, in
Northing meters. See above.
Central Specifies the central longitude of the projection in degrees. The Central
Longitude Longitude value typically should be defined as the longitudinal center of the
map you are going to produce. This value is only
significant when you define False Easting and False Northing values, and has no
apparent effect on the map.
Standard Specifies the central latitude of the projection in degrees. The Standard Parallel
Parallel value typically should be defined as the latitudinal center of the map you are
going to produce.
436
Chapter 15 – Coordinate Systems
Gnomonic Projection
The Gnomonic projection is an azimuthal projection. It is represented as a plane
tangent to the globe. At this point of tangency, which is called the standard parallel, all
major characteristics are retained. When you move away from the standard parallel in
any direction the map is not conformal, not equal-area, and distances are not true to
scale. Only areas of less than a hemisphere can be shown and distortion increases
noticeably as you move further from the standard parallel.
437
Surfer
Parameter Description
Name Specifies the units used in the map.
Scale Specifies the unit scale of the projected map, relative to meters. For example,
a scale of one means one unit in the projected map equals one meter; a scale
of two means two units in the projected map equal one meter; etc.
False Easting Specifies the false easting, or horizontal offset, of the projected coordinates, in
meters. False Eastings and False Northings are added to the underlying
"projected" coordinates as a way to arbitrarily offset their internal XY
coordinates after the projection. Unless you have a reason for using these
offset values, do not use them. These values do not affect the
latitude/longitude coordinates for the map, only the internal coordinates used
to plot the map on the screen. If you use False Easting and False Northing
offsets for a map, any subsequent boundaries you append to the map must
also use these same offsets if you want the imported boundaries to be drawn in
the correct relative position to the existing boundaries.
False Specifies the false northing, or vertical offset, of the projected coordinates, in
438
Chapter 15 – Coordinate Systems
Parameter Description
Name Specifies the units used in the map.
Scale Specifies the unit scale of the projected map, relative to meters. For
example, a scale of one means one unit in the projected map equals
one meter; a scale of two means two units in the projected map
equal one meter; etc.
False Easting Specifies the false easting, or horizontal offset, of the projected
coordinates, in meters. False Eastings and False Northings are added
to the underlying "projected" coordinates as a way to arbitrarily offset
439
Surfer
440
Chapter 15 – Coordinate Systems
Parameter Description
Name Specifies the units used in the map.
Scale Specifies the unit scale of the projected map, relative to meters. For
example, a scale of one means one unit in the projected map equals
one meter; a scale of two means two units in the projected map equal
one meter; etc.
False Specifies the false easting, or horizontal offset, of the projected
Easting coordinates, in meters. False Eastings and False Northings are added to
the underlying "projected" coordinates as a way to arbitrarily offset
their internal XY coordinates after the projection. Unless you have a
reason for using these offset values, do not use them. These values do
not affect the latitude/longitude coordinates for the map, only the
internal coordinates used to plot the map on the screen. If you use
False Easting and False Northing offsets for a map, any subsequent
boundaries you append to the map must also use these same offsets if
you want the imported boundaries to be drawn in the correct relative
position to the existing boundaries.
False Specifies the false northing, or vertical offset, of the projected
Northing coordinates, in meters. See above.
441
Surfer
Central Specifies the central scaling factor for the projection. This value is often
Scale set to 1.0, but may be set to another value for specific applications.
Factor (KO)
Use Alpha If False, use Snyder's Alternate A form; if True use the azimuthal form
Parameter (Alternate B) of the Hotine equation.
Alpha The angle in degrees in which to rotate the central line. Zero is north,
(Azimuth) and rotation is clockwise. This value cannot equal zero or a multiple of
90 degrees.
Central Specifies the central latitude of the projection in degrees. The Central
Latitude Latitude value typically should be defined as the latitudinal center of
the map you are going to produce, and should typically be defined as
the center of the map.
Standard Defines one end of the Y extent for the central line.
Parallel
1st Defines one end of the X extent for the central line.
Meridian
2nd Defines the other end of the Y extent for the central line.
Standard
Parallel
2nd Defines the other end of the X extent for the central line.
Meridian
Rotate U/V u,v are unrectified coordinates that follow the central line of the
to X/Y projection. x,y are rectified rectangular coordinates. When True, u,v
are rotated to x,y. See Snyder page 70.
Offset by U When True, u coordinatess are offset to remove the Us center
component, to normalize the origin of the u axis. This is typically
required for State Plane coordinate systems that use the Hotine
Oblique Mercator projection method.
442
Chapter 15 – Coordinate Systems
443
Surfer
False Northing Specifies the false northing, or vertical offset, of the projected coordinates, in
meters. See above.
Central Specifies the central longitude of the projection in degrees. The Central
Longitude Longitude value typically should be defined as the longitudinal center of the
map you are going to produce.
Standard Specifies the central latitude of the projection in degrees. The Standard
Parallel Parallel value typically should be defined as the latitudinal center of the map
you are going to produce.
Parameter Description
Name Specifies the units used in the map.
Scale Specifies the unit scale of the projected map, relative to meters. For example,
a scale of one means one unit in the projected map equals one meter; a scale
of two means two units in the projected map equal one meter; etc.
False Easting Specifies the false easting, or horizontal offset, of the projected coordinates,
in meters. False Eastings and False Northings are added to the underlying
"projected" coordinates as a way to arbitrarily offset their internal XY
coordinates after the projection. Unless you have a reason for using these
offset values, do not use them. These values do not affect the
latitude/longitude coordinates for the map, only the internal coordinates used
444
Chapter 15 – Coordinate Systems
to plot the map on the screen. If you use False Easting and False Northing
offsets for a map, any subsequent boundaries you append to the map must
also use these same offsets if you want the imported boundaries to be drawn
in the correct relative position to the existing boundaries.
False Northing Specifies the false northing, or vertical offset, of the projected coordinates, in
meters. See above.
Central Specifies the central longitude of the projection in degrees. The Central
Longitude Longitude value typically should be defined as the longitudinal center of the
map you are going to produce. For example, the value -95.5 represents the
geographic center of the United States, so the map of the U.S. is drawn
upright.
Central Specifies the central latitude of the projection in degrees.
Latitude
The Central Latitude value should be defined as the latitudinal center of the
map you are going to produce. This value is only significant when you define
False Easting and False Northing values.
Standard Specifies the latitude of the first of two standard parallels, in degrees. The
Parallel Standard Parallels typically are defined at approximately one-sixth of the
distance inside the north and south limits of the map. For example, if your
map latitude ranges from 30° to 36°, you could place your Standard Parallels
at 31° and 35°. There are alternative methods for determining the best
position of the standard parallels. Please see Snyder for more information.
2nd Standard Specifies the latitude of the second of two standard parallels, in degrees. See
Parallel above.
Mercator Projection
The Mercator projection is a cylindrical
projection and it is conformal. In a
Mercator projection, scale is constant
along any given parallel and accurate
along the specified center latitude. Scale
is the same in all directions near any
given point. Distortion is minimal near
the center parallel, but becomes extreme
toward the poles. All lines of constant
direction (rhumb lines) are known to be
straight, thereby making this projection
very desirable for producing navigational
charts. A limitation of this projection is
that coordinates at or near the poles
cannot be projected due to constraints of
the mathematical formulas used.
445
Surfer
Parameter Description
Name Specifies the units used in the map.
Scale Specifies the unit scale of the projected map, relative to meters. For
example, a scale of one means one unit in the projected map equals one
meter; a scale of two means two units in the projected map equal one
meter; etc.
False Easting Specifies the false easting, or horizontal offset, of the projected coordinates,
in meters. False Eastings and False Northings are added to the underlying
"projected" coordinates as a way to arbitrarily offset their internal XY
coordinates after the projection. Unless you have a reason for using these
offset values, do not use them. These values do not affect the
latitude/longitude coordinates for the map, only the internal coordinates used
to plot the map on the screen. If you use False Easting and False Northing
offsets for a map, any subsequent boundaries you append to the map must
also use these same offsets if you want the imported boundaries to be drawn
in the correct relative position to the existing boundaries.
False Northing Specifies the false northing, or vertical offset, of the projected coordinates, in
meters. See above.
Central Specifies the central longitude of the projection in degrees. The Central
Longitude Longitude value typically should be defined as the longitudinal center of the
map you are going to produce.
Central Latitude Specifies the central latitude of the projection in degrees. The Central
Latitude value typically should be defined as the latitudinal center of the map
you are going to produce.
446
Chapter 15 – Coordinate Systems
Miller Cylindrical maps do not represent relative land areas accurately, but do
approximate the relative shapes of individual land areas. Miller Cylindrical projection
maps are useful for displaying the entire world.
447
Surfer
Central Specifies the central longitude of the projection in degrees. This value should
Longitude be defined as the longitudinal center of the map you are going to produce.
This value is only significant when you define False Easting and False
Northing values and it has no apparent effect on the map.
Mollweide Projection
The Mollweide projection is a pseudo-cylindrical, equal area projection. Scale is
constant along any given parallel, and true along 40°44' north and south. The central
longitude is half the length of the equator. This projection was designed to produce
aesthetically pleasing world maps.
Parameter Description
Name Specifies the units used in the map.
Scale Specifies the unit scale of the projected map, relative to meters. For example,
a scale of one means one unit in the projected map equals one meter; a scale
of two means two units in the projected map equal one meter; etc.
False Easting Specifies the false easting, or horizontal offset, of the projected coordinates,
in meters. False Eastings and False Northings are added to the underlying
"projected" coordinates as a way to arbitrarily offset their internal XY
coordinates after the projection. Unless you have a reason for using these
offset values, do not use them. These values do not affect the
latitude/longitude coordinates for the map, only the internal coordinates used
to plot the map on the screen. If you use False Easting and False Northing
offsets for a map, any subsequent boundaries you append to the map must
448
Chapter 15 – Coordinate Systems
also use these same offsets if you want the imported boundaries to be drawn
in the correct relative position to the existing boundaries.
False Northing Specifies the false northing, or vertical offset, of the projected coordinates, in
meters. See above.
Central Specifies the central longitude of the projection in degrees. The Central
Longitude Longitude value typically should be defined as the longitudinal center of the
map you are going to produce.
Parameter Description
Name Specifies the units used in the map.
Scale Specifies the unit scale of the projected map, relative to meters. For
example, a scale of one means one unit in the projected map equals one
meter; a scale of two means two units in the projected map equal one
meter; etc.
False Easting Specifies the false easting, or horizontal offset, of the projected coordinates,
in meters. False Eastings and False Northings are added to the underlying
"projected" coordinates as a way to arbitrarily offset their internal XY
coordinates after the projection. Unless you have a reason for using these
offset values, do not use them. These values do not affect the
latitude/longitude coordinates for the map, only the internal coordinates
used to plot the map on the screen. If you use False Easting and False
Northing offsets for a map, any subsequent boundaries you append to the
map must also use these same offsets if you want the imported boundaries
to be drawn in the correct relative position to the existing boundaries.
False Northing Specifies the false northing, or vertical offset, of the projected coordinates,
in meters. See above.
449
Surfer
1st Meridian Defines one end of the X extent for the central line.
Standard Defines one end of the Y extent for the central line.
Parallel
2nd Meridian Defines the other end of the X extent for the central line.
2nd Standard Defines the other end of the Y extent for the central line.
Parallel
Central Scale Specifies the central scaling factor for the projection. This value is often set
Factor (KO) to 1.0, but may be set to another value for specific applications.
Orthographic Projection
The Orthographic projection is an azimuthal
projection. In an Orthographic projection, scale
is accurate at the center and along any circle
circumscribed around the center. Distortion is nil
at the center, and increasingly extreme with
increasing distance from the center.
450
Chapter 15 – Coordinate Systems
also use these same offsets if you want the imported boundaries to be drawn in
the correct relative position to the existing boundaries.
False Specifies the false northing, or vertical offset, of the projected coordinates, in
Northing meters. See above.
Central Specifies the central longitude of the projection in degrees. The Central
Longitude Longitude value typically should be defined as the longitudinal center of the
map you are going to produce.
Central Specifies the central latitude of the projection in degrees. The Central Latitude
Latitude value typically should be defined as the latitudinal center of the map you are
going to produce.
Polyconic Projection
The Polyconic projection is useful for maps of continental or smaller regions.
Generally, this projection is not used for world maps due to extreme distortion at any
significant distance from the center of the projection. Only the central meridian is
distortion-free. Notice in the sample map shown above that Africa is relatively
undistorted, but the rest of the world is barely recognizable. Scale is true along the
central longitude and along each parallel.
451
Surfer
Robinson and
Robinson-Sterling
Projections
These projections are
pseudo-cylindrical. Scale
and area are always
distorted by the Robinson
and Robinson-Sterling
projections. These
projections are designed to
produce aesthetically
pleasing world maps.
452
Chapter 15 – Coordinate Systems
use two entirely different mathematical processes. As a result, the numeric values of
the projected coordinates produced by these two methods are slightly different. For
most applications, these differences are not significant.
453
Surfer
Sinusoidal Projection
The Sinusoidal projection is a pseudo-cylindrical, equal area projection. Scale is
accurate along any given parallel and along the specified central longitude. This
projection is useful for continental or world maps, particularly for high-aspect regions
(regions taller than they are wide). To get good results with the Sinusoidal projection,
the map must have coordinates between +/-180 degrees longitude and +/- 90
degrees latitude.
454
Chapter 15 – Coordinate Systems
False Specifies the false northing, or vertical offset, of the projected coordinates, in
Northing meters. See above.
Central Specifies the central longitude of the projection in degrees. The Central
Longitude Longitude value typically should be defined as the longitudinal center of the
map you are going to produce.
Stereographic Projection
The Stereographic projection is an azimuthal, conformal projection. In a Stereographic
projection, scale is constant along any circle circumscribed around the center of the
projection. Distortion is minimal at the center and becomes extreme with distance
from the center. Generally, this projection is not used for regions larger than a
continent or a hemisphere due to distortion effects. The Stereographic projection is
often used for maps of the poles.
455
Surfer
False Eastings and False Northings are added to the underlying "projected"
coordinates as a way to arbitrarily offset their internal XY coordinates after
the projection. Unless you have a reason for using these offset values, do
not use them. These values do not affect the latitude/longitude
coordinates for the map, only the internal coordinates used to plot the
map on the screen. If you use False Easting and False Northing offsets for
a map, any subsequent boundaries you append to the map must also use
these same offsets if you want the imported boundaries to be drawn in the
correct relative position to the existing boundaries.
False Specifies the false northing, or vertical offset, of the projected coordinates,
Northing in meters. See above.
Central Specifies the central scaling factor for the projection. This value is often
Scale Factor set to 1.0, but may be set to another value for specific applications.
(KO)
Central Specifies the central longitude of the projection in degrees. The Central
Longitude Longitude value typically should be defined as the longitudinal center of
the map you are going to produce.
Central Specifies the central latitude of the projection in degrees. The Central
Latitude Latitude value typically should be defined as the latitudinal center of the
map you are going to produce.
456
Chapter 15 – Coordinate Systems
Parameter Description
Zone Specifies which one of the predefined zone projections to use for this
coordinate system.
Feet or Meters Most SPCS have both a meters and feet option available in the predefined
list.
457
Surfer
458
Chapter 15 – Coordinate Systems
If you use False Easting and False Northing offsets for a map, any subsequent
boundaries you append to the map must also use these same offsets if you
want the imported boundaries to be drawn in the correct relative position to the
existing boundaries.
False Specifies the false northing, or vertical offset, of the projected coordinates, in
Northing meters. See above.
Central Scale Specifies the central scaling factor for the projection. This value is often set to
Factor (KO) 1.0, but may be set to another value for specific applications.
Central Specifies the central longitude of the projection in degrees. The Central
Longitude Longitude value typically should be defined as the longitudinal center of the
map you are going to produce.
Central Specifies the central latitude of the projection in degrees. The Central Latitude
Latitude value typically should be defined as the latitudinal center of the map you are
going to produce.
459
Surfer
460
Chapter 15 – Coordinate Systems
The Golden Software Reference files contain the projection settings used to project the
data in Surfer. Projection, datum, and georeference information are stored in the
.GSR2 file. When you create a map from data or a grid that has an associated .GSR2
file into Surfer, the projection information is used when displaying the map. If the
Golden Software Reference file is deleted, the boundary can be imported but it will not
be projected properly.
Surfer .SRF file format retains all of the information in a map, including projection
information.
461
Surfer
Latitude and longitude are spherical coordinates used to locate a point on the earth.
Many maps do not need to take the curvature of the earth into account. For maps
covering relatively small land areas, such as a state or small group of states, the earth
can be assumed to be flat. In these cases, the latitude/longitude coordinates can be
plotted on a Cartesian coordinate system. Maps plotted in this way must use different
scaling in the two dimensions to minimize distortion on the map.
Parallels define lines of constant latitude. Meridians define lines of constant longitude.
This Albers projected map makes use of graticule lines to indicate the relationship.
462
Chapter 15 – Coordinate Systems
Latitude
Latitude is the Y coordinate and defines north-south global position measured from the
equator. Lines of constant latitude are called parallels because they define a series of
rings parallel to the equator.
Parallels run east-west, but define north-south position on the globe. Parallels are
designated in degrees from 0° at the Equator to 90° at the poles. Surfer uses the
convention that parallels are positive north of the equator (north latitudes), and
negative south of the equator (south latitudes). Designations such as 45° indicate a
position 45 degrees north of the equator, while -65° indicates a position 65 degrees
south of the equator. At any position on the globe, the distance covered by a degree
of latitude remains nearly constant.
Longitude
Longitude is the X coordinate and indicates east-west position on the globe. Lines of
constant longitude are called meridians. Meridians lie at right angles to the parallels
and are half-circles drawn from the North Pole to the South Pole. One meridian is
designated as the prime meridian.
The prime meridian most commonly in use in the United States runs through
Greenwich, England, although there are several other prime meridians in use
throughout the world. Longitude is measured 180° east and 180 degrees west from
the prime meridian. In Surfer, longitude is positive east (east longitude) of the prime
meridian, and negative west of the prime meridian (west longitude). A designation
such as -105° is used to indicate a location 105 degrees west of the prime meridian.
Meridians converge at the poles so the distance covered by one degree of longitude
decreases as you move north or south from the equator.
Converting from degrees, minutes, and seconds is actually quite easy. There are 60
minutes in one degree and 3600 seconds in one degree. To convert minutes and
seconds to decimal degrees, divide minutes by 60, divide seconds by 3600, and then
add the results to obtain the decimal equivalent.
463
Surfer
Conversion Equation:
Decimal Degrees = Degrees + (Minutes / 60) + (Seconds / 3600)
Example
Consider the latitude value 39°25'30". This value needs to be converted to decimal
degree in order to use it in Surfer.
To convert 39°25'30" to decimal degrees:
1. First, convert minutes (25') and seconds (30") to their degree equivalents and
add the results.
25'/60 = 0.4167
30"/3600 = 0.0083
0.4167 + 0.0083 = 0.425
2. Then, add this number to the number of degrees.
39 + 0.425 = 39.425
3. The final result is the decimal degree value.
39°25'30" = 39.425°
Digitize
The Map | Digitize command allows you to write map coordinates to a data file. As
you move the pointer across the selected map, the X, Y map coordinates for the
current mouse position are shown in the status bar. Left-click on a map to write
digitized points to the Digitized Coordinates dialog.
To use the Digitize command, you must select a horizontal planar map. To ensure
that your map is horizontal planar, click on the Map object in the Object Manager.
Click on the View tab in the Property Manager. Change the Tilt (degrees) to 90.
464
Chapter 15 – Coordinate Systems
The coordinates for the clicked point are written to the Digitized Coordinates window.
Each time the map is clicked, a small, temporary red symbol is drawn on the map, and
the map coordinates for the current mouse position are written to the Digitized
Coordinates window. In this way, you can digitize boundaries from maps and easily
create boundary files from the digitized information. You can also create a blanking file
with Map | Digitize.
The Digitized Coordinates window has three menus: File, Edit, and Options.
The File menu allows you to save or open an ASCII data file or .BLN file.
The Edit menu command allows for common editing, such as undo, redo, cut, copy,
paste, delete, find, replace, and select all. These commands work in much the same
way as the commands in the Edit menu for a worksheet.
The Options menu allows the user to set the numeric format with the Options |
Coordinate Format command. This opens the Label Format dialog, where the
numeric format can be set.
The Options menu also allows the user to specify whether the Z value is included when
digitizing a grid based map. Click the Options | Include Z coordinate command.
465
Surfer
The points you digitize after selecting this command will have a Z value when
digitizing a grid based map. When digitizing other maps, such as base maps, or when
you are digitizing outside the gridded area, the Z value is not included.
When multiple grid based maps are overlaid, the Z value is determined by the Track
map coordinate of option in the Tools | Options dialog. When this option is set to
Topmost map/layer, the map layer that is above all others in the Object Manager is
used for the Z value. When the Track map coordinate of option is set to Selected
map/layer, the digitized Z value is determined by the current map layer that is
selected in the Object Manager. If the Track map coordinate of option is set to
Selected map/layer and you select a different map layer while digitizing, the Z value
will come from the newly selected map layer for new digitized points.
2. Choose the Map | Digitize command, click the button, or right-click and select
Digitize. The cursor becomes a cross hair to indicate digitize mode.
3. As you move the cross hair cursor within the plot window, the map coordinates for
the position are displayed in the status bar. If the map is a grid based map, like a
contour map, the Z values are also displayed in the status bar.
4. The status bar displays the X, Y, and Z coordinates before you click on the map.
5. Click the left mouse button in the plot window to write the current coordinates to
the Digitized Coordinates window. Continue adding points in this manner. Digitized
points appear as temporary small red plus-signs on the map.
6. When you are finished using the Digitize command, click on any tool button or
command, or press the ESC key on the keyboard. You are prompted to save the
data as Boundary Files [*.BLN] or Data Files [*.DAT]. Select Yes to save the data,
No to discard the data, or Cancel to return to the map and remain in the digitize
mode.
466
Chapter 15 – Coordinate Systems
If you want to digitize information in a map layer's source coordinate system, you will
need to change the map's target Coordinate System information to match the map
layer's coordinate system.
2. Click the Map | Digitize command, or click the button. The cursor becomes a
cross hair.
3. Click the left mouse button in the plot window to
write the current coordinates to the Digitized
Coordinates window. Continue adding points in
this manner. Digitized points appear as
temporary small red plus-signs on the map.
4. If you wish to create multiple polylines, click the
Digitized Coordinates window. Manually insert
a blank line between the coordinates that make
up each polyline. Each group of contiguous
coordinates will form a separate polyline in the
blanking file.
5. If you wish to create a closed polygon, ensure
the first and last coordinate are identical. You Two polylines are defined in
may need to copy the first line and paste it as this window. The first
the last line. polyline has two vertices and
467
Surfer
6. When you are finished defining the polyline(s) or polygon(s), select the File |
Save As command in the Digitized Coordinates window. Save the file using a
.BLN extension. Press ESC on the keyboard or choose any toolbar button to exit
digitize mode.
Projection References
Dent, Borden D., Cartography, Thematic Map Design, Wm. C. Brown Publishers,
Dubuque, 1990.
Greenhood, David, Mapping, The University of Chicago Press, Chicago, 1964, pp. 113-
171.
Robinson, A.H., et al., Elements of Cartography, Fifth Edition, John Wiley & Sons, New
York, 1984, pp. 75-105.
Snyder, John P., Map Projections - A Working Manual, U.S. Geological Survey
Professional Paper 1395, Washington D.C., Department of the Interior, 1987.
Verhoogan, John, Francis., J. Turner, Lionel E. Weiss, Clyde Wahrhaftig, William S.
Fyfe, The Earth: An Introduction To Physical Geology, Holt, Rinehart and
Winston, Inc., New York, 1970.
Coordinate Systems Overview,
http://www.colorado.edu/geography/gcraft/notes/coordsys/coordsys_f.html,
July 2, 2001.
Map Projection Overview,
http://www.colorado.edu/geography/gcraft/notes/mapproj/mapproj_f.html,
July 2, 2001.
Map Projection Home Page, http://www.geography.hunter.cuny.edu/mp/, June 16,
2004.
Datums, Ellipsoids, Grids, and Grid Reference Systems, Defense Mapping Agency
Technical Manual 8358.1, August 2, 2004.
Matching the Map Projection to the Need, http://www.gis.psu.edu/projection/, June
16, 2004.
468
Chapter 16
Axes
Introduction to Axes
Four axes are automatically created for each map in Surfer. Axes are named by their
relative positions on the map and are called the Left Axis, Right Axis, Top Axis, and
Bottom Axis. The Left Axis and Right Axis are Y axes, and the Top Axis and Bottom
Axis are X axes. 3D wireframe and 3D surface maps also have a single Z Axis.
Variograms have two axes with the default names of X Axis and Y Axis.
By default, axis limits match the X, Y limits of the grid file, boundary file, or data file
used to create the map. When a map is first created, the Left Axis and Bottom Axis
display major ticks and tick labels, and the Top Axis and Right Axis display only major
ticks. The tick spacing is automatically scaled so a reasonable number of ticks are
drawn along each axis. Tick scaling and label format parameters can be independently
specified for the axes on the map.
469
Surfer
Editing Axes
To edit axes, click on the axis to select it. The axis properties are listed in the
Property Manager on the General, Ticks, Scaling, and Grid Lines tabs.
Axis Visibility
When the map or the variogram is created, the axes are displayed automatically. You
can turn off the display of any or all of the axes on the map by enabling the visibility
of the axis with the Object Manager. Click the check box adjacent to the axis name
to turn on or off the axis. On a 3D wireframe or 3D surface, only the Left Axis, Bottom
Axis, and Z Axis are initially displayed.
Axis Position
Individual axes cannot be moved with the mouse, but you can position axes relative to
the map layers on the Scaling page in the axis properties. Open the axis properties by
clicking on the axis name in the Object Manager.
Ticks
Map axes can display both major and minor ticks. Major ticks can display tick labels.
Minor ticks are displayed at regular intervals between major ticks, and do not have
associated tick labels. When tick labels are displayed, all major ticks along the axis are
represented with a label. The display of tick marks is controlled from the Ticks page in
the axis properties. The spacing of the major ticks along the axis is controlled from the
Scaling page in the axis properties. Major tick labels are controlled by the Labels
group on the General page in the axis properties.
On this axis, four minor ticks are included with every major tick.
470
Chapter 16 - Axes
Selecting an Axis
Click an axis in the Object Manager or plot window
to select it. When selecting in the plot window, place
the pointer on the tick marks or tick labels when
clicking. Hollow blue circle handles appear at each
end of the axis. Because the axes are part of the map
on which they are drawn, the eight solid green
square handles appear around the entire map. In
addition, the name of the axis is displayed in the
middle left side of the status bar.
Click on the axis to open the axis properties and change the position of the axis by
changing the Crosses At value on the Scaling page.
471
Surfer
Axis Properties
Add an axis title, change axis line properties, display labels, or change the axis plane
to make an axis more informative and customized. These items are set on the
General page for axis properties. To display the axis properties, click once on the
axis. The properties are displayed in the Property Manager.
General Page
The General page controls the
display of axis titles, axis lines, tick
labels, and the plane of the axis.
Axis Attributes
Click the button next to Line
Properties to display the Line
Properties options. Choose the line
Style, Color, Width, and Opacity for
the selected axis.
Axis Plane
Specify the general axis settings in
The Axis Plane option specifies the
the Property Manager on the
plane in which the tick labels are
General page.
drawn. For maps with a 90-degree
tilt, axis tick labels must appear in
the XY plane to be seen. The XY option draws the tick labels in the plane defined by
the X and Y axes. For planar view maps (the default orientation for base maps,
contour maps and post maps), use this setting.
The XZ option draws the tick labels in the plane defined by the X and Z axes. The YZ
option draws the tick labels in the plane defined by the Y and Z axes. These options
are used only when the tilt for the map is less than 90 degrees.
472
Chapter 16 - Axes
Axis tick labels can be drawn in different axis planes, and can be
rotated to make reading easier. In this example, the bottom axis is
on the XZ Axis Plane and the right axis is on the XY Axis Plane.
Title
Axis titles can use any text properties including math text formatting instructions.
Type the axis title on the Title text line. Titles can contain multiple lines. To create a
multiple line title, press the button. A Multiline Text dialog appears. Type the
text in the dialog. To add a new line of text, press the ENTER key on the keyboard.
When finished, click OK. You are returned to the Property Manager.
473
Surfer
Angle (degrees)
The Angle (degrees) box controls the angle at which the title is drawn. Positive angles
rotate the title in a counterclockwise direction. Values must be between 0 and 360. To
change the Angle (degrees), highlight the existing value and type a new number. Or,
click and drag the bar to the desired location. The text moves in the plot
window as the slider moves.
Font Properties
Click the button next to Font Properties to specify the text properties for the axis
title. Refer to Chapter 22 for more information on font properties.
Labels
Tick labels are the numbers or text that appear at major tick mark locations. Tick
labels indicate the axis values in data units.
Show
The Show check box controls the display of tick labels. When the Show box is checked,
major ticks on the selected axis are displayed with a label.
Angle (degrees)
The Angle (degrees) box specifies the angle at which the tick labels are drawn.
Positive angles rotate each axis tick label in a counterclockwise direction. Values must
be between 0 and 360. To change the Angle (degrees), highlight the existing value
and type a new number. Or, click and drag the bar to the desired location.
The text moves in the plot window as the slider moves.
Label Format
Click the button next to Label Format to display the Label Format options. This sets
the numeric format used for the tick labels. Refer to Chapter 22 for more information
on label format.
474
Chapter 16 - Axes
Font Properties
Click the button next to Font Properties to display the text properties for the axis
tick labels. Refer to Chapter 22 for more information on font properties.
Ticks Page
Axes can display both major
and minor ticks. When a map is
created, the display of major
ticks is on by default. Major
ticks display tick labels along
the axis. Minor ticks on an axis
are not represented with a tick
label, and are not drawn on an
axis by default. Minor ticks are
defined as the number of minor
ticks to be drawn between
adjacent major ticks.
Major Ticks
The Major Ticks section controls the display of the major tick marks. Click the next to
Major Ticks to open the Major Ticks section.
Style
Click the Style option to display a drop-down list. In the list, select the desired tick
mark location. Options are Outside, Inside, or Cross the selected axis. If you do not
want to show ticks, select None from the list.
Length
The Length box controls the length of the major tick marks. The tick lengths are in
page units.
Minor Ticks
The Minor Ticks section controls the display of the minor tick marks. Click the next
to Minor Ticks to open the Minor Ticks section.
475
Surfer
Style
Click the Style option to display a drop-down list. In the list, select the desired tick
mark location. Options are Outside, Inside, or Cross the selected axis. If you do not
want to show minor ticks, select None from the list.
Length
The Length box controls the length of the minor tick marks. The tick lengths are in
page units.
For example, if you want the minor ticks to indicate 10 divisions, the Minor ticks per
major value should be set to 9.
Scaling Page
Axis scaling controls the axis limits,
the major tick starting and ending
values, and the position of the axis
relative to the other axes in the
map. To set axis scaling, click on the
axis to select it. Click on the Scaling
page in the Property Manager.
476
Chapter 16 - Axes
The Scaling page for an axis in the Property Manager controls the axis scaling
properties.
Automatic Scaling
The Automatic check box uses the
limits of the map as the limits for
the axes and uses a reasonable tick
mark spacing along the axis. When
any parameters are changed on the
axis properties Scaling page, the
Automatic check box is automatically
unchecked. After making any
changes, you can return to the
automatic settings by checking the
Automatic box.
Axis Minimum
The Axis minimum box specifies the
minimum axis value.
Major Interval
The Major interval box contains the value of the spacing, in data units, between major
ticks along the selected axis. The major tick marks occur at values
Tick = First major tick + n* Major interval n = 0, 1, ..., N
where N is the largest integer such that Tick < Last major tick. Thus, a tick mark is
placed at the value of the Last major tick only if the interval (Last major tick - First
major tick) is evenly divisible by Major interval.
477
Surfer
Axis Position
Axes are a part of the map on which they are placed. By default, axes are drawn at
the edge of a map or surface. Map axes are placed in relation to the other axes on the
map.
A contour map has two Y axes: the Left Axis and Right Axis. The placement of the Y
axes are relative to the data units along the X axes (the Top Axis and Bottom Axis) on
the map. By default, the left Y axis crosses the X axes at the minimum X axis value.
Cross Y Axis At
The Cross Y axis at box is only displayed when an X or Z axis is selected. This specifies
the position of the X or Z axis along the Y axis. The value is entered in Y data units.
Cross Z Axis At
The Cross Z axis at box specifies the position of the X or Y axis relative to the Z axis
on a 3D wireframe or surface map. The value is entered in Z data units. By default,
the X and Y axes are drawn at the elevation of the base defined for the wireframe or
surface map. For example, if the base for the wireframe is set to be 25, the X and Y
axes cross the Z axis at an elevation of 25.
Cross X Axis At
The Cross X axis at box is only displayed when an Y or Z axis is selected. This specifies
the position of the Y or Z axis along the X axis. The value is entered in X data units.
478
Chapter 16 - Axes
Specify the tick spacing to use for the grid lines on the Scaling page. The ticks do not
need to be displayed for the grid lines to be drawn.
479
Surfer
The Grid Lines page controls the visibility and properties of major and minor grid
lines.
The grid lines are drawn on the map as you make changes in the Property Manager.
480
Chapter 17
Adding Color to Maps
Introduction to Color Spectrums
Color fill can be added to several map
types and objects in Surfer. Contour
maps can be line drawings or they can
have color fill. The vector symbols on a
vector map can be colored. You can
choose a preset color spectrum for
image maps, shaded relief maps,
contour maps, and 3D surface maps or
you can create and save your own
color spectrum.
Contour Maps
Contour maps have two different ways of setting the contour fill color, depending on if
you are using the simple or advanced Level Method.
481
Surfer
Contour map lines also use the Colormap dialog if the gradational line color option is
selected. To set the gradational line option and set the line color:
1. Click on the contour map to select it.
2. In the Property Manager, click the Levels tab.
3. Set the Level method to Advanced.
4. Click the Edit Levels button next to Contour levels.
5. In the dialog, click the Line button.
6. In the Line dialog, select Gradational.
7. Click the Color button. The Colormap dialog opens.
482
Chapter 17 – Adding Color to Maps
Vector Maps
In a vector map, the symbols can use a colormap to gradationally color the vector
symbols. To set the gradational symbol option:
1. Click on the vector map to select it.
2. In the Property Manager, click the Symbol tab.
3. Open the Color Scaling section.
4. Change the Scaling method to either By magnitude or By grid file.
5. Click the color bar next to Vector colors and select a new color scale.
6. To open the Colormap dialog, click the Custom button at the bottom of the Vector
colors list.
3D Surface Maps
To open the Colormap dialog for a surface map,
1. Click on the surface map to select it.
2. In the Property Manager, click on the General tab.
3. Open the Material Color section.
4. Click the color bar next to Upper.
5. Click the Custom button at the bottom of the Upper color list to open the
Colormap dialog.
483
Surfer
other maps. Although the colors are assigned to specific values on a map, the
spectrum can be used with maps containing different Z ranges because the node
values are stored as percentages. Several predefined colormaps are available in the
SAMPLES directory and are shown in the Presets drop-down list.
Use the Colormap dialog to assign colors to a map.The Colormap dialog provides the
following options:
Presets
The Presets drop-down list allows you to select a predefined .CLR file created by
Golden Software. Custom colormaps cannot be added to the preset drop-down list.
Data Value
The Value displays the data value of the node selected. The selected node may be
accurately repositioned by entering a new value in the Value box. The first and last
nodes cannot be changed and this control is disabled when an end node is selected.
Colormap files can be used with maps of varying Z ranges since the anchor nodes are
stored as percentages rather than as data values. To use the exact same colors in the
exact same data locations when the Z ranges vary slightly, override the default data
limits and assign custom values in the Data to Color Mapping group.
Saving a Colormap
Click the Save button in the Colormap dialog to create a colormap .CLR file based on
the current colormap settings. When you click the Save button, the Save As dialog is
displayed. Type the File name for the colormap file and click Save. The file is saved for
use with other files.
Reversing a Colormap
The Reverse button flips the order of colors in the colormap so that colors currently
associated with low data values will be mapped to high values and colors currently
associated with high values will be mapped to low values. The sample colormap
updates to show the new color order.
484
Chapter 17 – Adding Color to Maps
Colormap Sample
The sample of the generated colormap is display directly above the anchor nodes.
Assigning Colors
The Colormap dialog allows you to specify the colors to associate with a range of data
within the map. Blended colors are achieved by creating anchor nodes along a color
bar and assigning specific colors to the specified anchor nodes. Colors are linearly
interpolated between adjacent anchors.
Adding a Node
You can add additional anchor nodes at any position along the colormap. To create a
new anchor node, left-click below or on the colormap where you want the new node
added. The new anchor is automatically assigned a color in the color palette, and the
value is displayed in the Value box. You can add as many anchor nodes as you want.
This lets you blend colors in many different ways on the colormap.
Deleting a Node
Left-click on an anchor node and press the DELETE key on the keyboard to delete a
node. Nodes can also be dragged outside the top or bottom of the dialog to remove it
from the spectrum. The first (far left) and last (far right) anchor nodes cannot be
deleted.
Scroll Control
The scroll control appears as a horizontal bar with draggable end handles. Drag a
handle left or right to zoom the colormap in or out. Drag the center section to scroll
the visible portion left or right. Double-click the center section to return it to the fully
visible state.
485
Surfer
Anchor Nodes
The color spectrum is defined by anchor nodes at user-defined points along a color
spectrum in the Colormap dialog. Colors are automatically blended between adjacent
anchors.
Anchor nodes are represented by a slider button below the color spectrum. A node
with a colored arrow and an orange boundary indicates the node is currently
selected.
Initially, the minimum grid value and the maximum grid value anchor node colors are
defined as black and white, respectively. You can change either of the colors by
clicking once on the anchor slider button and then clicking on any color in the color
palette. The color spectrum is updated to show the change.
486
Chapter 17 – Adding Color to Maps
487
Surfer
Example
The following example contains steps on how to create maps in a series that contain
the same color spectrums although the data minimums and maximums differ. The
example image maps show the same gridded area at three different points in time. To
accurately compare the maps, the color spectrum needs to be the same through time
even when the range of values fluctuates between grids.
The three maps shown above all use the same color spectrum
range, even though the grid minimums and maximums differ.
488
Chapter 17 – Adding Color to Maps
The three maps above show the same phenomena over a period of time. The grid
ranges are not the same, but since the maps are to be compared, the colors need to
map to the same data values for all maps. Using the same color spectrum .CLR file
and changing the minimum and maximum spectrum data values allows you to quickly
compare the maps visually. The color scale bar to the right is used for all three maps.
The map on the left contains a dark black area because it has some extreme negative
values, but it does not have any pure white because it does not have extreme positive
values. The map on the right is opposite, it contains extreme positive values so there
is an area of pure white, but the negative values are not extreme so there is no pure
black. The map in the center does not contain extremes in either direction so it is
mostly red. Note that these maps have "stair step" edges due to blanking in the
corners. A smaller grid spacing or interpolating the pixels would smooth the edges.
489
Surfer
Level Files
Level files [.LVL] contain information needed to set the contour interval and basic line
and fill information for contour and wireframe maps. Label and hachures information is
also retained in the .LVL file. .LVL files can be created from the contour map,
wireframe map, or in the worksheet.
Level files can be used in contour maps, 3D wireframe maps, and the grid node editor.
490
Chapter 17 – Adding Color to Maps
To create a .LVL level file containing contour level information in the advanced contour
map level properties:
1. Click once on a contour map to select it. The contour map properties will be shown
in the Property Manager.
2. Click on the Levels tab. Change the Level method to Advanced.
3. Click the Edit Levels button next to Contour levels. The Properties dialog opens.
4. Change any of the contour parameters, including the contour levels, line
properties, fill properties, contour labels, and hachure information.
5. After changing the settings, click Save.
6. In the Save As dialog, type the name of the level file and click the Save button.
The level file is saved with a .LVL extension.
7. Click OK to close the dialog.
Note, all contour maps using the level file must have comparable Z data ranges,
otherwise contour lines and fill will not appear on the map.
491
Surfer
in a level file. This level file can be recalled for any other 3D wireframe or contour
maps.
Level files created from the wireframe properties dialog contain only information for
the Z level line properties. Color fill, contour label, or hachure information is not
written to the level file if the level file is created from the wireframe. However, a level
file created from the advanced contour map level properties dialog may contain such
additional information. A level file created from the wireframe properties dialog can be
used for a contour map and vice versa. Any additional information not used is ignored.
492
Chapter 17 – Adding Color to Maps
493
Surfer
494
Chapter 18
Positioning and Overlaying Maps
Introduction to Map Layers
A map layer is a single map type contained in a larger map object. The map layer may
be a contour map, a post map, a base map, or any other map type that Surfer can
create. The larger map object contains all of the individual map layers and axes used
to create the entire map. Map layers can be created separately or created in a single
map object.
495
Surfer
Consider a contour map and a base map that displays the outline of a lake on the
contour map. The limits of the base map are the X, Y extents of the lake and are not
the same as the contour map limits. If you create both the base map and the contour
map in a single plot window as separate maps by using the Map | New command for
both maps, they do not overlay correctly because the maps have different scaling. In
addition, each map uses a different set of X, Y axes. The two maps can be overlaid to
correctly position the lake on the contour map by dragging the base map layer to the
other map object that has the contour layer. The result will be a map object with a
base map layer and contour map layer. Alternatively, if you create the contour map
and then added a base map layer with the Map | Add | Base Layer command, the
two maps are automatically scaled and combined into a single map using a single set
of axes. The lake is correctly positioned on the contour map.
Overlay Maps
It is possible to combine several maps by overlaying the maps. You can overlay any
combination of contour, base, post, image, shaded relief, vector, or surface maps.
Overlays can contain only one wireframe, however. When you overlay maps, the
overlays use a single set of X, Y, and Z axes and the maps are positioned according to
the composite coordinate system. If two or more maps use the same limits, they will
overlay on top of one another. If maps cover adjacent areas, overlaying maps places
them in the correct position relative to one another and creates a single set of axes
that span the entire range. Overlaid maps become a single object and are moved and
scaled as a single entity.
Consider a contour map and a base map that displays the outline of a lake on the
contour map. The limits of the base map are the XY extents of the lake and are not
the same as the contour map limits. If you create both the base map and the contour
map in a single plot window, they do not overlay correctly because by default the
maps are scaled differently. In addition, each map uses a different set of XY axes. If
you select both maps and then choose Map | Overlay Maps, the contour map and
the base map are rescaled and combined into a single map using a single set of axes.
The lake is now correctly positioned on the contour map.
496
Chapter 18 – Positioning and Overlaying Maps
39.80 39.80
39.79
39.77
39.76 39.76
39.76
39.74 39.74
39.75
39.72 39.72
39.74
39.70 39.70
-105.24 -105.22 -105.20 -105.18 -105.16 -105.14 -105.24 -105.22 -105.20 -105.18 -105.16 -105.14
39.73
Before you overlay maps, the two maps might use different map limits, and each map
uses its own axes. When you overlay the maps, they are positioned properly with
respect to each other, and use only one set of axes.
Map Layers
You can add a Base Layer, Empty Base Layer, Contour Layer, Post Layer, Classed Post
Layer, Image Layer, Shaded Relief Layer, 1-Grid Vector Layer (aspect and gradient are
calculated), 2-Grid Vector Layer (X, Y or direction, magnitude), 3D Wireframe Layer,
3D Surface Layer, X Axis, Y Axis, Z Axis, or Scale Bar to the selected map.
Layers that cannot be added to the selected map are grayed out. For example, a 3D
wireframe map layer cannot be added to a 3D surface map.
Layers can be dragged between maps in the Object Manager. Layers can be
combined with the Map | Overlay Maps command to create a single Map object.
Adding a new layer to an existing map will not change custom scaling or map limits,
with the exception of 3D wireframe and 3D surface maps. Adding a 3D wireframe or
3D surface to an existing map will change custom scaling or map limits.
497
Surfer
498
Chapter 18 – Positioning and Overlaying Maps
Layer Exceptions
The Map | Add command allows you to add a map layer to the selected map. Most
combinations of map types can be layered. The exceptions are combining a 3D
wireframe and 3D surface map, adding a raster map layer to a wireframe, and adding
multiple wireframe layers.
Raster maps include shaded relief maps, image maps, surfaces, and base maps
containing an image. The options under the Add command change to fit the existing
map. For example, if a 3D wireframe map is selected, the Map | Add | 3D Surface
Layer command is grayed out.
499
Surfer
This method works well when you have multiple map layers that you want to combine.
The contour map layer and the post map layer are displayed in separate
Map objects in the Object Manager and the plot window.
500
Chapter 18 – Positioning and Overlaying Maps
First left-click and select the post map layer (left), then drag the
post map layer to the other map object. When the cursor is a
horizontal arrow, release the mouse button.
6. The end result is a single map object with two map layers: a post map layer and a
contour map layer. Additional map layers can be added with the Map | Add
command.
The result of this method is one Map object with two map layers.
501
Surfer
Resize Objects
You can resize objects graphically with the mouse or keyboard. Selected objects
appear with selection handles at the corners and sides of the bounding box for the
object. The size of a selected object is displayed in the status bar. The cursor changes
to a two-headed arrow when it is moved over one of the selection handles. Resize a
single selected object or several selected objects using the following methods.
• To drag a handle with the mouse, move the cursor over the handle and then press
and hold the left mouse button. Move the cursor to a new position. Release the left
mouse button and the object is resized.
• To drag a handle with the keyboard, move the cursor over the handle, press and
hold the SPACEBAR, and use the ARROW keys to move the cursor to a new
position. Release the SPACEBAR and the object is resized.
• Drag one of the four corner handles to size the object proportionally.
• Drag one of the side handles to stretch or compress the object in one dimension
only.
• Press and hold the ALT key while dragging a corner handle with the mouse to free
size an object.
• To resize a map, use the map properties Scale page to size the map.
STRETCHING THE MAP DOES NOT PRESERVE THE INTERNAL MAP SCALE. Use
Arrange | Transform to undo the effects of stretching a map.
• Set the size of axes in the axis properties dialog.
• Use the W and H fields in the Position/Size toolbar to change the width and
height of an object.
• To return an object to the original size, select the object. Click Arrange |
Transform and check the Identity (Clear Transforms) check box . The object is
returned to the original size and location.
Stacking Maps
The Map | Stack Maps command aligns individual maps horizontally so that their
coordinates align on the page. The Stack Maps command was designed to stack maps
using similar coordinates on each map. This command is useful for keeping two or
more maps separated on the page. The vertical position of individual maps on the
page is not changed by this command.
When using Map | Stack Maps the same View should be used for each map. This
ensures that points on the stacked maps are aligned properly. The View parameters
are applied to all selected maps. Stacking maps with perspective projections can be
problematic since the Z axis is not vertical on the page. It is better to use the
orthographic projection when stacking maps with different Z ranges.
502
Chapter 18 – Positioning and Overlaying Maps
The relative vertical placement of maps on the page defines how far apart the maps
are after they are stacked. Before using the Stack Maps command, position the maps
in the approximate location on the page where you want each map to be drawn. The
Stack Maps command only moves maps horizontally on the page, not up or down.
The STACKED MAPS.SRF sample file displays a contour map stacked on a 3D surface
map.
the . As you drag the slider next to the Rotation (degrees) and Tilt
(degrees) commands, the maps automatically update.
7. Position the surface and contour maps vertically on the page where you want them
to appear. For example, you might move the surface to the bottom half of the
page, and move the contour map to the top half of the page.
8. Select both the surface and the contour map with the Edit | Select All command
and click Map | Stack Maps or the button. The X and Y coordinates of the
two maps are aligned horizontally on the page.
9. To show vertical lines connecting the maps, use Draw | Polyline to draw the lines
at the corners of the map.
503
Surfer
1. Open each map using File | Open, or clicking the button. This opens a new
plot window for each map.
2. Choose the File | New | Plot command, or click the button to create a new
empty plot window. This window will contain all the maps to be displayed.
3. For each map, open the appropriate window by choosing the name of the plot
window from the Window menu or clicking on the appropriate tab at the top of the
plot window.
4. Select everything in the window by clicking Edit | Select All, or by pressing
CTRL+A.
5. Copy the items by clicking the Edit | Copy command, or by clicking the
button.
6. Switch to the window created in step two using the Window menu or clicking on
the appropriate tab at the top of the plot window.
7. Select the Edit | Paste command, or click the button. The map is pasted into
the plot window. You can still modify the map in any way.
8. Repeat steps 3 through 7 for each map to be placed in the plot window.
504
Chapter 18 – Positioning and Overlaying Maps
505
Surfer
506
Chapter 19
Grid Operations
Math
The Grid | Math command performs mathematical transformations on one or more
grid files. Grid files can have the blanking value set to any value for each grid
separately.
Calculus
The Grid | Calculus command calculates derivatives, curvature, slopes, aspects,
differentials, integrals, and spectral analysis.
Any operation used to modify grid files can also be performed on a variety of
supported grid files (i.e. USGS Digital Elevation Models .DEM or Digital Terrain
Elevation Data .DTED, etc.).
Filter
The Grid | Filter command applies methods of digital image analysis to grids,
including a broad suite of smoothing (low-pass) filters, contrast enhancement filters,
edge enhancement filters, edge detection filters, and general high-pass filters.
Spline Smooth
The Grid | Spline Smooth command produces grids that result in more rounded
shapes on maps.
507
Surfer
Blank
The Grid | Blank command removes data from specified regions of a grid. Contours
are not displayed in blanked regions, and 3D wireframes display blanked regions as
low flat regions.
Convert
The Grid | Convert command changes the grid from one file format to another.
Extract
The Grid | Extract command produces a subset of a grid.
Transform
The Grid | Transform command performs a mathematical transformation on the XY
coordinates of a grid.
Mosaic
The Grid | Mosaic command merges grid files.
Volume
The Grid | Volume command calculates the volume and area of a grid file.
Slice
The Grid | Slice command outputs a data file that can be used to produce a cross
section or profile line.
Residuals
The Grid | Residuals command calculates the difference between a grid and the
points in a data file. It is also used to calculate the Z value at a specified point.
508
Chapter 19 – Grid Operations
Grid Info
The Grid | Grid Info command displays statistics about the selected grid file,
including the grid size in rows x columns, and grid X, Y, and Z minimums and
maximums.
Note:
To filter your data before gridding, use the data filters in Grid | Data. We will discuss
Grid Filter and Spline Smooth in this section; smoothing contours is discussed in
Chapter 6, Contour Maps.
Grid Filter
The Grid | Filter command applies methods of digital image analysis to grids. This
includes a broad suite of smoothing (low-pass) filters, as well as contrast
enhancement filters, edge enhancement filters, edge detection filters, general high-
pass filters, etc. Surfer also includes the capability for user-defined, general linear
filters.
509
Surfer
The Neighborhood
When filtering a grid, each node of the output grid is computed as a function of the
corresponding node, and its neighbors, in the input grid. The concept of the
neighborhood is used in grid filtering. The neighborhood of an output grid node is a
rectangular sub-array of nodes in the input grid that is centered on the corresponding
input grid node.
A neighborhood has a non-zero width, and a non-zero height. Since the neighborhood
is centered on a node, the width and height must both be odd numbers. For example,
if the width and the height of the neighborhood are both three, the neighborhood of
the output grid node at (21, 35) is the following rectangular sub-array of input grid
nodes:
(20, 36) (21, 36) (22, 36)
(20, 35) (21, 35) (22, 35)
(20, 34) (21, 34) (22, 34)
S S T T
Z (r + i, c + j ) where i = − , , and j = − , ,
2 2 2 2
equals S × T. Furthermore, the nodes in the neighborhood can be enumerated as:
The box in the lower-right part of the dialog displays the neighborhood size, based on
the number of Rows and Cols, along with the weights for each grid node in the
neighborhood. Each element of the matrix is used to weight the grid node that lies
"below" it. The products are then summed, normalized, and assigned to the value
below the center node. The filter is then "moved" to the next node and the process is
repeated until all nodes have been processed.
510
Chapter 19 – Grid Operations
Filter Categories
There are two main categories of filters: Linear Convolution Filters and Nonlinear
Filters. Both of these general types are real space filtering methods.
least one non-blanked node. The button displays information about the grid file
used to produce the filtered grid. The information includes the grid size, the minimum
and maximum X, Y, and Z values contained in the grid file, and statistics. If the grid
file is large, click OK in the dialog that appears to create a detailed grid report or click
Cancel to create a shorter, less detailed grid report.
511
Surfer
the button to browse to a new path. The Save Grid As dialog appears. Enter a
grid file name and click Save. The grid file is displayed in the Output Grid File box.
Edge Effects
There are two settings for edge effects, how to calculate the edge of the grid and how
to calculate neighborhoods with blanked nodes.
Filter Size
Filter Size is available with user-defined linear convolution filters and some nonlinear
filters. You can use Filter Size to determine the size of the neighborhood.
Number of Passes
Set the number of times the filter is applied with the Number of Passes box.
S T
2 2
0 if Z (r + i, c + j ) is blank
Denominator = ∑S
∑
T
W (i, j ) otherwise
i =− j =−
2 2
where W(i, j) are the weights defined for the specified filter. The output grid node
value is then
512
Chapter 19 – Grid Operations
Numerator
Denominator if Denominator > 0
Z out (r , c ) =
Numerator otherwise
User-Defined Filters
There are two types of user-defined filters, Low-pass Filters and General User-defined.
With these filters, you can specify the height and width of the filter neighborhood.
Low-Pass Filters
A low-pass filter removes the high frequency noise with the resulting output being a
smoother grid. There are four user-defined low-pass filters. Each of these four filters
allows you to specify the size of the neighborhood. The width and height of the filter
neighborhood must both be positive, odd numbers. Let the neighborhood height be S
and width be T,
S S T T
W (i, j ) = 1 ∀ i = − , , ∀ j = − , ,
2
2
2 2
In the Moving Average (mxn) filter, the weights are all equal to one.
With the Distance Weighting (mxn) filter, the weights fall-off with increased distance.
p
2i 2 j S S T T
W (i, j ) = 1 − max , ∀ i = − , , ∀ j = − , ,
S +1 T +1
2
2
2 2
The distance weighing function is
Where, p is the specified Power. The higher the power the more rapidly the weights
fall-off with distance. The resulting iso-weight contour lines are concentric rectangles.
With the Inverse Distance (mxn) filter, the weights fall-off with increased distance.
With a neighborhood height S and width T, the distance weighing function is
513
Surfer
Wc
p if i = 0 and j = 0 S S T T
W (i, j ) = 1 2 ∀ i = − , , ∀ j = − , ,
2 otherwise 2 2 2 2
i + j 2
Where, WC is the specified Central Weight and p is the Power. The higher the power p,
the more rapidly the weights fall-off with distance. The resulting iso-weight contour
lines are concentric circles.
With the Gaussian Low-pass (mxn) filter, the weights fall-off with increased distance.
i 2 j 2 S S T T
W (i, j ) = exp − α + ∀ i = − , , ∀ j = − , ,
S T
2
2
2 2
With a neighborhood height S and width T, the distance weighing function is
where α is the Alpha value (positive). This weight function takes the form of half the
common bell-shaped curve. The parameter controls how quickly the weights fall-off
with distance. The resulting iso-weight contour lines are concentric ellipses.
The grid matrix can be selected and copied using CTRL+C and pasted into the user-
defined matrix. This allows a pre-defined matrix to be used as a base and then be
modified.
Predefined Filters
The predefined filters are a large collection of 3×3 filters defined in the references.
• Low-pass Filters are also known as smoothing or blurring filters. These filters
remove the high frequency variation.
• High-pass Filters are also known as sharpening or crispening filters. They have
the opposite effect of blurring. They tend to remove the background variation and
emphasize the local details.
514
Chapter 19 – Grid Operations
• Order 1 Derivative Filters are used to find horizontal and vertical edges.
• Order 2 Derivative Filters are another set of edge enhancement filters.
• Shift and Difference Filters are the two simplest horizontal and vertical differential
operators.
• Gradient Directional Filters compute and return the directional derivatives in each
of the eight compass directions.
• Embossing Filters identify and enhance edges aligned in one of the eight compass
directions.
Nonlinear Filters
The Nonlinear Filters are not weighted averages of the neighboring input grid values;
however, they are simple functions of the neighboring input grid values.
Filter Description
Minimum (mxn) The output grid node value equals the minimum of the neighboring
values.
Lower Quartile The output grid node value equals the twenty-five percentile of the
(mxn) neighboring values.
Median (mxn) The output grid node value equals the fifty percentile of the
neighboring values.
Upper Quartile The output grid node value equals the seventy-five percentile of the
(mxn) neighboring values.
Maximum (mxn) The output grid node value equals the maximum of the neighboring
values.
Range (mxn) The output grid node value equals the maximum minus the minimum
of the neighboring values.
Filter Description
Standard The output grid node value equals the standard deviation of the neighboring
Deviation values. The standard deviation is the square root of the variance (see below).
(mxn)
Variance The output grid node value equals the variance of the neighboring values. The
(mxn) computation involves three steps. First, count the number of non-blank input
grid node values in the neighborhood. With a neighborhood height S and width
T, compute
515
Surfer
S 2 T 2
0 if Z(r + i, c + j ) is blank
N= ∑ ∑
1 otherwise
2
i =− S 2
j =− T
S 2 T 2 if Z(r + i, c + j ) is blank
∑ ∑
1 0
Z =
N
i =− S 2 j =− T 2 Z (r + i, c + j ) otherwise
S 2 T 2 if Z(r + i, c + j ) is blank
∑ ∑
1 0
Variance =
N
2
i =− S 2
j =− T
(
Z (r + i, c + j ) − Z )
2
otherwise
Coef. of The output grid node value equals the coefficient of variation of the neighboring
Variation values. The coefficient of variation is the standard deviation divided by the
(mxn) average. If the average (the denominator) is too small, then the coefficient of
variation is arbitrarily set equal to 0.
Standard Deviation
Coefficient of Variation =
Z
Filter Description
Median Difference (mxn) For each output grid node, (r, c), identify the set of non-blank,
neighboring input grid node values. Compute the median of
these neighboring values. Let B represent this median value.
Then the output grid node value is set equal to
Z out (r , c ) = Z (r , c ) − B
516
Chapter 19 – Grid Operations
Z (r , c ) if Z (r , c ) − A ≤ Threshold
Z out (r , c ) =
A if Z (r , c ) − A > Threshold
Edge of Grid
When computing the Grid | Filter values of the output nodes near the edge of the
grid, the specified neighborhood may extend outside the range of the grid. This
presents an issue because the output grid nodes are then functions of non-existent
input grid nodes. There are three general ways of dealing with this issue: blank the
output grid nodes near the edge, modify the defining function near the edge, or
generate artificial input grid nodes beyond the edge upon which the defining function
operates. The following methods for handling the edge are:
• Blank - Any grid node, for which its neighborhood overlaps one or more edge, is
blanked. For example, if the neighborhood size is 3×3 then every application of
the filter blanks one line of nodes on each edge. Every application of the filter
shrinks the active grid by two rows and two columns: one row on the top, one
row on the bottom, one column on the left edge, and one column on the right
edge. Similarly, a 5×5 filter neighborhood blanks four rows and four columns
every application.
• Ignore - This is the default setting. In this case, the filter function is modified by
truncating the neighborhood at the edge of the grid. For example, in The
Neighborhood section, even though the general neighborhood is specified to be
3×3, the effective neighborhood of node (21, 0), on the left edge of the grid, is
only 3×2:
(22, 0) (22, 1)
(21, 0) (21, 1)
(20, 0) (20, 1)
517
Surfer
• This approach to handling the edges applies an essentially different function near
the edges than in the middle of the grid. This can cause unexpected, visually
apparent, artifacts in some extreme cases.
• Replicate - The edge grid node value is copied. For a grid with M rows and N
columns, the rules are
Z (r , c ) = Z (a, b )
where
0 if r < 0 0 if c < 0
a= r if 0 ≤ r < M b= c if 0 ≤ c < N
M − 1 if r ≥ M N −1 if c ≥ N
• Mirror - The grid node value pattern at the edge is mirrored. For a grid with M
rows and N columns, the rules are
Z (r , c ) = Z (a, b )
where
−r if r < 0 −c if c < 0
a= r if 0 ≤ r < M b= c if 0 ≤ c < N
2 M − 2 − r if r ≥ M 2 N − 2 − c if c ≥ N
• Cyclic Wrap - The grid is wrapped in two dimensions. If you go off the grid on the
right edge, you come back on the left; if you go off on the top, you come back on
the bottom, etc. For a grid with M rows and N columns, the rules are
Z (r , c ) = Z (a, b )
where
r + M if r < 0 c + N if c < 0
a= r if 0 ≤ r < M b= c if 0 ≤ c < N
r − M if r ≥ M c − N if c ≥ N
• Fill - Fill the edge with a specified constant. A common value for the fill is the
arithmetic average of the grid.
Z (r , r ) if 0 ≤ r < M and 0 ≤ c < N
Z (r , c ) =
A otherwise
where A is the user-specified constant. Enter a number into the Value
box to the right when using this option.
518
Chapter 19 – Grid Operations
Blanked Nodes
There are several ways to handle blanked nodes in a neighborhood in filtering. If all
nodes in a neighborhood are blanked, the output node is also blanked. Blanked node
must be exactly equal to the blank value. It provides the following options:
• Expand the blanked regions. If the neighborhood of an output grid node contains
a blanked node in the input grid, then the output node is blanked. Like blanking
on the edge, this approach leads to blanked areas that grow with every application
of the filter.
• Leave the blanks. This is the default setting. Blank every output grid node for
which the corresponding input grid node is blank. When the corresponding input
grid node is not blank, but a neighboring grid node is blank, modify the filter to
ignore the blank; essentially, remove the blank node from the neighborhood. For
example, if the filter called for computing the median value in the neighborhood,
the blanked values would not be considered when determining the median. This
keeps the blanked areas constant, but can cause internal artifacts for some filter
types.
• Ignore the blanks by filtering across them. The blank nodes are removed from the
neighborhood. For example, if the filter called for computing the median value in
the neighborhood, the blanked values would not be considered when determining
the median. This option is similar to Leave, however, this option does not blank
the output grid nodes corresponding to blank input grid nodes. This is essentially
a simultaneous filtering and interpolation. Every application of the filter would see
a shrinking of the blanked regions, since the only blank output grid nodes are
those with completely blank neighborhoods.
• Fill blanks with a user-specified constant prior to filtering. When using this option,
enter the Fill number into the Value field.
519
Surfer
A spline is really nothing more than the graphs of a set of contiguous (end-point
adjacent) cubic polynomials with the same slopes at their endpoints. Cubic spline
smoothing may increase the maximum Z value and decrease the minimum Z value
from the input grid.
There are two ways to perform spline smoothing; by expanding the grid or by
recalculating the grid. When you expand the grid, nodes are inserted between existing
nodes in the original grid.
The original grid node values and grid limits are preserved in the smoothed grid, and
the new grid nodes are calculated so the smoothest possible contour map or wireframe
can be drawn.
When the grid is recalculated, all the grid nodes in the smoothed grid are completely
recalculated. This option can either increase or decrease the number of rows and
columns in the smoothed grid relative to the original grid. The original grid values are
lost unless their locations correspond exactly with the grid nodes in the output grid.
The smoothed grid file is still an accurate representation of the original data.
Spline smoothing can be used to reduce grid file density. If a dense grid is created,
producing a map from this grid might take a considerable amount of time. The less
dense grid can be used to produce the contour map or wireframe in less time. USGS
GTopo30 files are quite dense and it is necessary to thin them out before attempting
to plot a map of the grid.
One of the purposes of spline smoothing is to fill in a sparse grid. A map produced
from a sparse grid may have an angular appearance. For example, spline smoothing
can be used to increase a 10 x 10 grid (a sparse grid) to a 50 x 50 grid. Denser grids
produce smoother maps.
520
Chapter 19 – Grid Operations
A 10 x 10 Grid
A 50 x 50 Grid
Expanding a Grid
When a grid is expanded, the original grid nodes are preserved in the smoothed grid,
and new grid nodes are added between existing grid nodes. The number of added grid
nodes is defined by the Number Nodes to Insert boxes in the Spline Smooth dialog.
Let us take up an example of a simple three by five grid. Each grid node is
represented by an "o". When expanding the grid, two grid nodes are inserted between
each existing grid node to produce the grid on the bottom. The original grid nodes are
indicated with "o", and the new grid nodes are indicated with "x." The original grid is
three by five and the smoothed grid is seven by thirteen.
521
Surfer
To expand a grid:
5. If you need information on the original grid file, click the button in the Input
Grid File section to display the number of rows and columns, minimum and
maximum X, Y, Z values, and statistics.
522
Chapter 19 – Grid Operations
6. To change the name for the smoothed grid file, click the button in the Output
Grid File section, specify the path and file name in the Save Grid As dialog, and
click Save.
7. Click OK and the smoothed grid is created.
Recalculating a Grid
When a grid file is recalculated, the number of rows and columns are increased or
decreased relative to the original grid. The original grid values are lost unless their
locations correspond exactly with the grid nodes in the output grid. The smoothed grid
file will still be an accurate representation of the original data. For example, you might
have a 75 x 75 grid and need a 100 x 100 grid to perform grid math with another grid.
You can recalculate the grid to have exactly the number of rows and columns needed.
To recalculate a grid:
7. If you need information on the original grid file, click the button in the Input
Grid File section to display the number of rows and columns, minimum and
maximum X, Y, Z values, and statistics.
8. To change the name for the smoothed grid file, click the button in the Output
Grid File group, specify the path and file name in the Save Grid As dialog, and
click Save.
9. Click OK and the smoothed grid is created.
523
Surfer
To expand a grid, choose the Insert Nodes option in the Spline Smooth
dialog. When recalculating a grid, choose the Recalc Grid
option in the Spline Smooth dialog.
Insert Nodes
Choose the Insert Nodes option in the Method section to activate the Number Nodes to
Insert section.
524
Chapter 19 – Grid Operations
Recalculate Grid
Choose the Recalc Grid option in the Method section to activate the Final Grid Size
section. This group specifies the number of rows and columns to produce in the
smoothed grid. You can increase or decrease the number of rows and columns in the
grid file.
# Rows
The # Rows box specifies the number of rows for the smoothed grid file. Enter the
desired value, or use the up and down arrows to change the values for the number of
rows to be produced in the smoothed grid.
# Columns
The # Cols box specifies the number of columns for the smoothed grid file. Enter the
desired value, or use the up and down arrows to change the values for the number of
columns to be produced in the smoothed grid.
If you need information on the original grid file, click the button in the Input Grid
File group to display the number of rows and columns, and the minimum and
maximum X, Y, and Z values. If the grid file is large, click the OK button in the
message box that appears to create a detailed grid report or click Cancel to create a
shorter, less detailed grid report.
To change the name for the smoothed grid file, click the button in the Output Grid
File group, specify the path and file name in the Save Grid As dialog, and click Save.
525
Surfer
Grid Mosaic
The Grid | Mosaic command combines two or more input grids of the same
coordinate system into a single output grid. For example, if you have four USGS SDTS
Raster Profiles (DEMs), you can easily combine them into one grid with Grid | Mosaic.
Click the Grid | Mosaic command, or click the button, specify the grid file to
mosaic in the Open Grid(s) dialog, and click Open to display the Grid Mosaic dialog.
Use the Grid Mosaic dialog to combine two or more input grids into a single output grid.
526
Chapter 19 – Grid Operations
Add
Click the Add button to open the Open Grid(s) dialog and add additional grids to the
mosaic. Added grids will be listed in the Input Grid Files section. All grids must be in
the same coordinate system. For example, this means that 30 meter DEM files must
be in the same UTM zone.
Remove
Select a grid and click the Remove button to remove a grid from the mosaic. One grid
can be removed at a time.
Info
Click the Info button to obtain information about the selected grid, including the grid
file name and statistics. If the grid file is large, click OK in the message box that
appears to create a detailed grid report or click Cancel to create a shorter, less
detailed grid report.
Resample Methods
There are three Resample Methods from which to choose: Bilinear Interpolation,
Nearest Neighbor, and Cubic Convolution.
527
Surfer
Overlap Method
When grids overlap, choose an Overlap Method to determine the value of the grid
node in the new grid: Average, First, Last, Minimum, Maximum, or Sum. The First and
Last are the first and last grids listed in the Input Grid Files section.
a path and file name, or click the button to browse to a new path and enter a file
name in the Save Grid As dialog.
Grid Extents
The Grid Extents group graphically displays the Input Grid Files. Each grid that is
added to the Input Grid Files group is displayed in the Grid Extents group. Black boxes
represent input grids. Red boxes represent the selected input grid. The solid gray box
represents the output extents. The input grid boxes can be clicked with the mouse to
graphically select the grid in the Grid Extents group. Alternatively, select a grid file in
the Input Grid Files group to select a grid box.
528
Chapter 19 – Grid Operations
Mosaic Tips
• When a blanked node overlaps a non-blanked node, the blanked node is ignored.
• The default output grid spacing is set to the minimum spacing of the input grids.
• By specifying First for the Overlap Method, a second overlapping grid can be used
to fill in blanked values in the first grid.
• Some grid files, such as USGS DEM files, are not seamless. Occasionally, a grid
node is missing along an edge. Sometimes, the reported corner points for adjacent
files are slightly different, which causes the neat lines between grids to be slightly
off, which causes some edge nodes to be excluded from both grids. This shows up
as a blanked node along the seam.
• It is possible to resample a single grid with Grid | Mosaic by specifying a single
grid and changing the grid spacing.
Resample Methods
When using Grid | Mosaic, Surfer uses resampling methods to assign data values in
the new grid. For each grid node location in the output grid (X, Y) the Z value is
located in the set of input grids. The Z value is computed according to the specified
resample method.
Note that all resample methods are exact interpolators - that is, if the X, Y location
falls exactly on a grid node, the grid node’s Z value is returned. If more than one grid
can supply a Z value at the specified X, Y position, they are combined according to the
specified Overlap Method.
529
Surfer
The resampling methods do not extrapolate outside the grid limits. This means that
blanked nodes may be inserted between adjacent input grids if the input grids to not
each include the common boundary.
Nearest Neighbor
The Nearest Neighbor method applies the closest grid node value on the original grid
to the grid node value in the new grid. When the original grid and the new grid differ
in size, more than one original node may be applied to the new grid and some original
grid cells may not be applied to the new grid.
The Nearest Neighbor method is the fastest resampling method, though it can result in
distorted output if the original grid and new grid differ in size.
Bilinear Interpolation
The Bilinear Interpolation method uses a weighted average of four nodes in the
original grid and applies this to the new grid node. The new grid is smoothed
compared to the original grid.
Cubic Convolution
The Cubic Convolution method uses a weighted average of 16 nodes in the original
grid and applies this to the new grid. The new grid is smoother than the original grid.
This method is best for continuous data. This is the slowest resampling method, but it
results in a sharper grid than the Bilinear Interpolation or the Nearest Neighbor
methods.
Blanking boundaries are defined in a blanking file, which is a special ASCII format file
containing the X, Y coordinates defining the boundary. Blanking files can be made in
the Surfer worksheet. Blanking files can also be created with the Map | Digitize
command. Blanking can be assigned to areas inside or outside the blanking boundary.
530
Chapter 19 – Grid Operations
Alternatively, blanking regions can be specified using the Blank Node command in
the Grid Node Editor window. Grid Node Editor is discussed in the next section.
531
Surfer
Before blanking:
After blanking:
Blanking marks areas of a grid or map as "no data" areas. In blanked areas of a grid:
• Contours are not drawn.
• A separate fill color can be assigned to blanked regions/missing data in contour
maps, image maps, and shaded relief maps.
• 3D wireframe maps display a flat surface at the minimum Z value in the grid file.
• Volumes are not calculated and areas are calculated separately.
532
Chapter 19 – Grid Operations
• Grid | Math operations produce a blanked node if one of the grids contains a
blanked node at a given location, unless a Remap to is selected for the grid.
The left map shows an unfilled contour map with a base map layer displaying
the circular blanking boundary. Contour lines are truncated within one
grid cell width of the blanking boundary. The right map shows a filled
contour map with a forward slash fill pattern assigned to blanking areas.
Starting with a data file, the Grid | Data command blanks grid nodes:
• where the search criteria are not satisfied.
• outside the convex boundary of the data set if the triangulation or natural
neighbor gridding methods are used.
533
Surfer
• within an area delineated by a fault polygon if there are no data values within that
area.
The problem can be resolved by combining the two polygons into a single polygon.
Edit the blanking file in the Surfer worksheet or in a text editor, repeating the first
polygon vertex at the end of each polygon, and editing the header to reflect the total
number of vertices. The new blanking file is best suited for blanking, with the original
blanking file used for display as a base map. The header consists of the total number
of values followed by a 1 (blank inside) or a 0 (blank outside).
534
Chapter 19 – Grid Operations
535
Surfer
536
Chapter 19 – Grid Operations
The grid node editor allows you to change or blank Z values at individual grid nodes in
a grid file. Each grid node is indicated with a "+" in the grid editor window by default.
Each blanked grid node is indicated with a blue "x" by default. The active node is
highlighted with a red diamond. To move between grid nodes, press the arrow keys, or
click a node to make it the active node.
The active node XY map coordinates and grid coordinates are displayed at the top of
the window, and the Z value is given in the Z box. You can enter a new Z value for the
selected grid node into the box. Press ENTER, an arrow key, or click another node to
enter the new value into the grid. The contour map is redrawn with your change when
the Options | Show Contours menu option is selected. You can save the edited grid
file with the same name or a different name.
The Grid Node Editor also allows you to open an image file and save as a grid file.
The grid node editor modifies individual grid nodes in a grid file.
537
Surfer
The following table describes different components of the Grid Node Editor:
Component Component Definition
Name
Active Node The node that is currently selected. The active node is highlighted
with a red diamond.
Grid Node Each grid node is indicated with a "+" in the grid editor window
by default.
Grid Coordinate The location of the active node, specified by row and column
number.
Map Coordinate The X and Y coordinates of the active node.
Z Value Box The Z coordinate of the active node. You can enter a new Z value
for the selected grid node into the box. Press ENTER, an arrow
key, or click another node to enter the new value into the grid.
The contour map is redrawn with your change when the Options
| Show Contours menu option is selected.
The Show Contours command controls the display of contour lines on the map.
When the command is checked, the contours are displayed on the map. Click on the
command to toggle between showing and hiding contours. As individual grid nodes
are modified, the contours are redrawn to reflect the change.
The Contour Levels command displays the Contour Levels dialog, allowing you to
control the display of the contours.
The Show Nodes command turns on the display of grid node markers on the map.
When the command is checked, a + appears at the location of each grid node. When
the command is not checked, the crosses are not shown, but you can still edit the
grid. Some node markers are not displayed if the zoom or density is such that they
are too close. Although not all of the markers are shown, the active node indicator
still "snaps" to each grid node as the arrow keys and mouse are used.
The Blank Node command assigns the blanking value (1.70141e+038) to the
selected node. Contour lines are not drawn in the blanked regions of grid files. When
538
Chapter 19 – Grid Operations
you display a blanked grid file as a wireframe, the blanked regions appear as low, flat
regions at the same level as the minimum Z value in the blanked file.
The Unblank Node command is grayed unless a grid node blanked during the current
grid node editor session is selected. During the session, if a grid node is blanked, the
original Z value for that node is preserved in memory, so you can return the grid node
to its pre-blanked value. If the grid file you are editing was blanked before you
opened the grid editor window, you cannot unblank the node with this command.
Click the Grid Info command to obtain information about the grid, including the grid
file name and statistics. If the grid file is large, click OK in the message box that
appears to create a detailed grid report or click Cancel to create a shorter, less
detailed grid report.
539
Surfer
Grid Convert
The Grid | Convert command converts a grid file to another grid format, or an ASCII
XYZ data file format.
To convert a grid:
1. Click the Grid | Convert command.
2. In the Open Grid dialog, select a grid file and click Open.
3. In the Save Grid As dialog, enter a file name in the File name box.
4. Select a file format from the Save as type drop-down list. The options are .ADF,
.AM, .COL, .BIL, .BIP, .BSQ, .DAT, .DEM, .ERS, .FLD, .FLT, .GRD, .GXF, .HDF,
.IMG, .LAT, .RAW, .BIN, and .VTK.
5. Click the Save button to create the new file.
Grid Extract
The Grid | Extract command creates a subset of an existing grid file. Grid files consist
of rows and columns (lines of constant Y and X value) containing Z values. When you
extract information from a grid file, you can specify the starting and ending rows and
columns to extract. For example, you can create a new grid file that consists of only
the center portion of an existing grid by specifying the middle columns and rows from
the original grid.
Consider a grid file that has 100 rows and 100 columns. You might want to create a
grid that contains the information from row 25 to row 75 and column 25 to column 75.
In this example, specify 25 as the first row and first column to extract and 75 as the
last row and last column to extract. The grid file you create in this case would consist
of 51 rows and 51 columns of data (from 25 to 75 rows and columns, inclusive).
Subsets can also be based on every nth row or column read from the input grid file,
reducing the density of the grid. In this case, you specify a step factor that skips rows
and columns when reading information from the original grid file.
540
Chapter 19 – Grid Operations
The Extract Grid dialog displays information about the input grid file, lets
you specify a subset of a grid, and writes the subset to a new grid file.
Input File
In the Input File section, the file name and statistics about the grid are listed. The
information includes the # of Nodes, Minimum, Maximum, and Spacing in both the X
and Y directions. This is provided as information only for adjusting the output grid.
This information cannot be changed.
Output File
In the Output File section, click the button to specify a different path or file name
for the grid file to be created.
541
Surfer
Read Every
The Read Every boxes specify a skip factor to "thin out" a grid. A value of one reads
every row or column within the selected limit. A value of two reads every other row or
column, and so on.
Grid Transform
The Grid | Transform command contains several options that modify the X and Y
map coordinates of grid nodes within the grid file. It does not alter the Z values. The
Transform options are used to shift, scale, rotate, or mirror grid nodes within a grid
file.
542
Chapter 19 – Grid Operations
The button displays information about the grid file used in the transformation.
The information includes the grid size, the minimum and maximum XYZ values
contained in the grid file, and statistics. If the grid file is large, click OK in the
message box that appears to create a detailed grid report or click Cancel to create a
shorter, less detailed grid report.
In the Output Grid File group click the button to open the Save Grid As dialog.
Specify a different path or file name for the grid file to be created. Select a supported
file type for output.
Operation
The Operation list controls the transformation type. Click on the box or drop-down
arrow and select an option from the list.
543
Surfer
The Offset option adds or subtracts a number from the X and Y dimensions. Specify
the Offset option from the Operation list, and then set the amount of the offset in the
X Offset and Y Offset boxes in positive or negative units. For example, if the input
grid ranges are X: 1 to 9 and Y: 2 to 8, and the offsets are 10.0 for both the X Offset
and Y Offset, then the output grid ranges will be X: 11 to 19 and Y: 12 to 18.
The Scale option multiplies the X and Y ranges by a factor. Specify the Scale option
from the Operation list, and then specify the scaling factors in the X Scale and Y Scale
boxes displayed in the Grid Transform dialog. The scaling origin is the lower left
corner of the grid, so only the xMax and yMax values are changed. For example, if the
input grid ranges are X: 1 to 9
and Y: 2 to 8 and the X Scale and
Y Scale factors are both 3.0, then
the output grid ranges will be X:
1 to 25 (((9 - 1) x 3.0) + 1) and
Y: 2 to 20 (((8 - 2) x 3.0) + 2).
Rotate
The Rotate option rotates a grid 90 degrees
in multiples of 90 degrees (0, 90,
180, 270, …). Select the Rotate Rotate 180 degrees
option in the Operation list, and
specify the rotation angle in the
Angle box. The origin of the map
remains in the lower left, and the
axes continue to increase in the
same direction, with the X axis
increasing to the right, and the Y
axis increasing upwards.
544
Chapter 19 – Grid Operations
nodes reversed in the Y direction. The output grid file uses the same minimum and
maximum X and Y coordinates as the input grid file. The origin of the grid remains in
the lower left corner, with X increasing to the right and Y increasing upward. The X
order remains unchanged.
The Mirror X option creates a mirror image of the grid file with the X order reversed.
545
Surfer
Grid Math
The Grid | Math command creates a new grid file that transforms the Z values of a
single grid file or combines Z values from multiple grid files. The output grid file is
based on a mathematical function of the form f(A,B, C, D), where A, B, C, D represent
input grid files. The defined function is performed on corresponding nodes with the
same row and column coordinates from the input grid files, and the result of the
calculation is placed at the same coordinates in the output grid file. For example, the
function log10(A) creates an output grid file with the logarithmic base 10 values for
each of the grid nodes in Grid A.
By default, if a node is blanked in any input grid, it is blanked in the output grid.
However, you can change the Blank Handling for each grid so that blanked nodes are
assigned a value. The output grid file will then have a value when the input grid
contains a blank.
Specify grid files and define a math function in the Grid Math dialog.
546
Chapter 19 – Grid Operations
Input Grid
The Input Grid column displays the selected grid files. The X and Y limits and grid size
of these files define the output grid. Place the mouse over any grid file to reveal the
full path and file name for the grid.
Variable
By default, Surfer defines each grid with a Variable name letter. The first grid is A,
the second grid is B, and so on. To change the Variable name for a grid, click in the
Variable name box next to the current Variable name. Delete the existing text and
type a new name. The variable name is case insensitive, so Blanking is the same as
blanking. Variable names must start with an underscore (_) or letter and can only
contain alphanumeric characters.
Blank Handling
The Blank Handling option allows you to specify the value to use for any blanked
nodes in the grid. If a blanked node is found in the grid, the Blank output option
blanks the output grid file for the same node. If the Blank Handling is changed to
Remap to:, the blanked node in the input grid is changed to the value in the Remap
Value column. To change the Blank Handling option, click on the existing option and
select the desired option from the list.
Remap Value
When the Blank Handling is set to Remap to:, the Remap Value box becomes
available. Highlight the existing value and type in a new value to change the blank
value. This sets every blanked node in the input grid to this new Remap Value. Each
grid file can contain a different Remap Value.
Add Grids
Click the Add Grids button to open the Open Grid(s) dialog. To perform an operation
on a single grid, select only one grid file. To perform an operation on multiple grids,
select multiple grid files using the CTRL and SHIFT keys. You can select any number of
grid files at once. When all grids are selected, click the Open button. The grid file
names are displayed in the Input Grid list. All selected grids must contain the same
number of grid rows and columns, and should extend over the same X and Y ranges.
Remove Grid
To remove a grid from the Input Grid list, click once on the grid to select it. Click the
Remove Grid button. The selected grid is removed from the list.
547
Surfer
Grid Info
Click the Grid Info button to display the number of grid rows, number of grid columns,
X, Y, Z minimums and maximums, and statistics for the selected grid. If the grid file is
large, click OK in the message box that appears to create a detailed grid report or click
Cancel to create a shorter, less detailed grid report.
To use a stored function, click the next to the current function. This will display the
ten most recent functions used. The functions are stored in the registry, so the
equations are stored between Surfer sessions. You can also start typing the function
in the function box. If the function is in the ten function history, the entire function will
auto-complete.
In the Output Grid File section, click the button to specify a different path or file
name for the grid file to be created. The Save Grid As dialog appears. Type a grid file
name and click Save. The grid file is displayed in the Output Grid File box. Click the
3. In the Output Grid File section, click the button to specify a different path or
file name for the grid file to be created.
4. In the Enter a function of the form f(A,B, ...) where A, B, ... are the variables in
the list above box, enter a function that represents the output grid file, and where
A and B refer to the input grid files.
5. Click OK to create the new grid file.
548
Chapter 19 – Grid Operations
For example, let's say you have drill hole data that provides the elevation of the top
and bottom of a coal seam, and want to generate a contour map representing the
thickness of the seam. The elevation of the top of the coal seam can define the upper
surface, and the elevation of the base of the coal seam could define the lower surface.
Using grid math to subtract the lower surface from the upper surface would generate a
grid file that represents the thickness of the coal seam.
4. Click the button next to Output Grid File, enter the name for the thickness
grid file in the Save Grid As dialog, and click Save.
5. In the Enter a function of the form f(A,B,...) where A, B, ... are the variables in
the list above. box, enter the formula A - B. This formula assumes that the top of
the surface is the Variable A and the bottom of the surface is the Variable B.
6. Click OK and a grid file is created which can be used to generate the isopach map
of the thickness between the two input grid files.
7. To view a contour map of the thickness grid file, choose the Map | New |
Contour Map command and choose the grid file you created with the Grid Math
command.
549
Surfer
button.
5. In the Enter a function of the form f(A,B,...) where A, B, ... are the variables in
the list above. box, enter max(a,0). This tells the program to return whichever is
greater, the value in the grid or zero.
6. Click OK and the new grid without negative values is created.
Grid Calculus
The Grid | Calculus command provides you with tools to interpret your grid files. Grid
calculus can help you define and quantify characteristics in the grid file that might not
be obvious by looking at a contour or 3D wireframe of the grid.
The Grid | Calculus command creates a new grid file of the generated data.
Generated grid files use the same dimensions as the original grid file but might use
different ranges of data depending on the type of output.
When a numerical derivative is needed, central difference formulae are used in the
calculus computations in Surfer. Because a central difference approach is used, values
on both sides of the location for which the derivative is computed are required. This
leads to blanking along the edges of the derivative grids, otherwise known as an edge
effect.
Surfer uses "compass-based" grid notation to indicate the neighboring grid nodes
used for many of the Grid Calculus operations, as illustrated below:
550
Chapter 19 – Grid Operations
Using this grid notation, we can write the difference equation approximations for the
necessary derivatives at location Z as follows:
dz Z E − Z W
≈
dx 2∆x
dz Z N − ZS
≈
dy 2∆y
d 2 z Z E − 2Z + Z W
≈
dx 2 ∆x 2
551
Surfer
d 2 z Z N − 2Z + ZS
≈
dy 2 ∆y 2
d 4 z Z WW − 4Z W + 6Z − 4Z E + Z EE
≈
dx 4 ∆x 4
d 4 z Z NN − 4 Z N + 6Z − 4 ZS + ZSS
≈
dy 4 ∆y 4
552
Chapter 19 – Grid Operations
is a grid file of the generated data. The generated grid files use the same dimensions
as the original grid file but might use different ranges of data depending on the type of
output.
6. Click the button to display the grid rows, grid columns, X, Y, Z minimums and
maximums, and statistics. If the grid file is large, click OK in the message box that
appears to create a detailed grid report or click Cancel to create a shorter, less
detailed grid report.
7. Click the button to set the output grid path and file name.
8. Click OK and the new grid file is created.
Directional Derivatives
The Grid | Calculus directional derivatives provide you with information about the
slope, or rate of change of slope, of the gridded surface in a specified direction.
Because this takes a specified direction into account, this slope, or rate of change in
slope, might not be the steepest slope at a given point. For example, if the specified
direction is due East, but the gradient is due North, the directional derivative slope is
zero at that point. In the specified direction, there is no slope at that point, although
there is a slope to the North.
Directional derivatives are different from the values given in terrain modeling where
the direction of the slope is defined as the gradient, or the direction of steepest ascent
at a given point (i.e., straight uphill at that point). In the above example, the terrain
modeling would report the slope in the north direction at that point. The two methods
would report different values at that particular point on the grid.
553
Surfer
direction, the rate of change for Z is ∂z / ∂x , and the rate of change in the Y axis
direction for Z is ∂z / ∂y .
There are three Directional Derivative options available: First Derivative, Second
Derivative, and Curvature. You can specify the angular direction for the operation.
First Derivative
The Grid | Calculus
directional derivative First
Derivative calculates the
slope of the surface along
the Direction line. First
Derivative grids produce
contour maps that show
isolines of constant slope
along lines of fixed direction.
554
Chapter 19 – Grid Operations
The directional derivative at a point is equal to the dot product between the gradient
vector and a unit vector in the direction of interest:
df cos(α )
= g⋅
ds sin(α )
df df cos(α )
= , ⋅
dx dy sin(α )
df df
= ⋅ cos(α ) + ⋅ sin(α )
dx dy
where α is the user-specified angle (see Schwartz, 1974, p. 785, or Tuma, 1979, p.
89). Using compass-based grid notation, the equation takes the following form:
dZ Z E − Z W Z − ZS
≈ ⋅ cos(α ) + N ⋅ sin(α )
ds 2∆x 2∆y
Second Derivative
The Grid | Calculus directional
derivative, Second Derivative,
calculates the rate of change of slope
along a given direction. Second
derivative grid files produce contour
maps that show isolines of constant
rate of change of slope across the
surface. If the slope is uphill, the
rate of change is positive and
downhill is negative.
555
Surfer
The compass-based grid notation difference equation used in Surfer takes the form:
d 2 Z Z E − 2Z + Z W Z − Z NW − ZSE + ZSW
≈ ⋅ cos 2 (α ) + NE ⋅ cos(α ) ⋅ sin(α ) +
ds 2
∆x 2
4∆x∆y
Z N − 2Z + ZS
⋅ sin 2 (α )
∆y 2
Curvature
The Grid | Calculus directional
derivative, Curvature, is a measure
of the rate of change of the
inclination angle of tangential planes
on a profile line defined by the
surface along a specified direction.
Curvature is reported as the
absolute value of the rate of change
and is, therefore, a positive number.
Curvature is similar to the Second
Derivative.
556
Chapter 19 – Grid Operations
The directional curvature is the absolute value of the rate of change, in a specified
direction, of the inclination angle of the tangent plane.
d 2f
ds 2
Ks = 3/2
df 2
1 +
ds
(see Schwartz, 1974, p. 592)
d 2f d 2f d 2f
⋅ cos 2
(α ) + 2 ⋅ cos(α ) ⋅ sin(α ) + ⋅ sin(α )
dx 2 dxdy dy 2
Kα = 3/2
df df
2
1 + ⋅ cos(α ) + ⋅ sin(α )
dx dy
557
Surfer
10.0 15.00
Curvature
9.0
5.00
8.0
7.0 -5.00
20.00
6.0 Second Derivative
5.0 0.00
Direction
4.0
-20.00
0.0 -4.00
0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0
10.00
Grid Surface
This map shows the profile line
for the directional derivative and 5.00
directional curvature
calculations. 0.00
0 1 2 3 4 5 6 7 8 9 10
558
Chapter 19 – Grid Operations
Terrain Modeling
The Grid | Calculus terrain modeling option provides additional tools to analyze the
surface geometry of a grid file. Results are based on the gradient direction (direction
of steepest slope) and not a predefined direction as with Directional Derivatives. For
each grid node location on a surface, Surfer determines the magnitude and direction
of the steepest slope.
Threshold
When you choose the Terrain Aspect, Profile Curvature, Plan Curvature, or Tangential
Curvature options, you can also specify a Threshold value. In areas where the steepest
slope approaches zero (where the surface is nearly horizontal), the gradient direction
is somewhat difficult to ascertain (i.e., the definitions "downhill" and "uphill" are rather
arbitrary). In these cases, it is preferable to classify the surface as flat. The Threshold
value is the minimum value for the slope for which the aspect and curvature values
are computed. In locations where the Threshold value is not met, the grid node value
in the output grid is blanked. The Threshold value is, by default, set to a very small
value.
Terrain Slope
The Grid | Calculus terrain
model, Terrain Slope, calculates
the slope at any grid node on the
surface. Terrain Slope is reported
in degrees from zero (horizontal)
to 90 (vertical). For a particular
point on the surface, the Terrain
Slope is based on the direction of
steepest descent or ascent at that
point (Terrain Aspect).
559
Surfer
This operation is similar to the way the First Directional Derivative defines the slope at
any point on the surface but is more powerful in that it automatically defines the
gradient direction at each point on the map.
The slope, S, at a point P is the magnitude of the gradient at that point. From the
definition of the gradient:
2 2
∂z ∂z
S = +
∂x ∂y
S≈ E + N
2∆x 2∆y
The terrain slope is represented as a slope angle ST in degrees in keeping with the
terrain modeling literature, such Moore et al. (1993):
2
Z E − Z W Z N − ZS
2
360
ST ≈ ⋅ arctan +
2π 2∆x 2∆y
Terrain Aspect
The Grid | Calculus terrain model, Terrain Aspect, calculates the downhill direction of
the steepest slope (i.e. dip direction) at each grid node. It is the direction that is
perpendicular to the contour lines on the surface, and is exactly opposite the gradient
direction. Terrain Aspect values are reported in azimuth, where 0 degrees points due
North, and 90 degrees points due East.
In keeping with the terrain modeling literature, e.g. Moore et al. (1993), Surfer
represents the terrain aspect, AT, as an azimuth (in degrees, not radians):
560
Chapter 19 – Grid Operations
Profile Curvature
The Grid | Calculus terrain model, Profile Curvature, determines the downhill or
uphill rate of change in slope in the gradient direction (opposite of slope aspect
direction) at each grid node. Grid files of Profile Curvature produce contour maps that
show isolines of constant rate of change of steepest slope across the surface. This
operation is comparable to the Second Directional Derivative but is more powerful
because it automatically determines the downhill direction at each point on the
surface, and then determines the rate of change of slope along that direction at that
point.
561
Surfer
Negative values are convex upward and indicate accelerated flow of water over the
surface. Positive values are concave upward and indicate slowed flow over the surface.
2
∂ 2 z ∂z ∂ 2 z ∂z ∂z ∂ 2 z ∂z
2
2 + 2 +
∂x ∂x ∂ x∂ y ∂ x ∂ y ∂ y 2 ∂ y
KP =
pq 3/2
where
2
∂z ∂z
2
p = +
∂x ∂y
q = 1+ p
562
Chapter 19 – Grid Operations
Plan Curvature
The Grid | Calculus terrain model, Plan Curvature, reflects the rate of change of the
Terrain Aspect angle measured in the horizontal plane, and is a measure of the
curvature of contours. Negative values indicate divergent water flow over the surface,
and positive values indicate convergent flow.
where
2
∂z ∂z
2
p = +
∂x ∂y
563
Surfer
Tangential Curvature
The Grid | Calculus terrain model, Tangential Curvature, measures curvature in
relation to a vertical plane perpendicular to the gradient direction, or tangential to the
contour. The negative and positive areas are the same as for Plan Curvature, but the
curvature values are different. Tangential Curvature is related to the Plan Curvature
KH by the sine of the slope:
where
2 2
∂z ∂z
p = +
∂x ∂y
q = 1+ p
564
Chapter 19 – Grid Operations
Select differential and integral operators from the list on the left side of the
Grid Calculus dialog. There are no options for Differential & Integral Operators.
565
Surfer
Gradient Operator
The Gradient Operator generates a grid of steepest slopes (i.e. the magnitude of the
gradient) at any point on the surface. This is similar to the Terrain Slope operation,
but the Gradient Operator is reported as a number (rise over run) rather than in
degrees, and the direction is opposite that of the slope. The Gradient Operator is zero
for a horizontal surface, and approaches infinity as the slope approaches vertical.
Using the compass based grid notation yields the equation used in Surfer:
2
Z − ZW Z − ZS
2
g ≈ E + N
2∆x 2∆y
Laplacian Operator
The Grid | Calculus differential and integral operator, Laplacian Operator, provides a
measure of discharge or recharge on a surface. In grid files generated with the
Laplacian Operator, recharge areas are positive, and discharge areas are negative.
Groundwater, heat, and electrical charge are three examples of conservative physical
quantities whose local flow rate is proportional to the local gradient. The Laplacian
operator, ∇ Z , is the mathematical tool that quantifies the net flow into (Laplacian >
2
∂ 2Z ∂ 2Z
∇2Z = +
∂ x 2 ∂ y2
Z − 2 Z + Z W Z N − 2 Z + ZS
∇ 2 Z(x, y) = E +
∆x 2 ∆y 2
566
Chapter 19 – Grid Operations
Biharmonic Operator
Bending of thin plates and shells, viscous flow in porous media, and stress functions in
linear elasticity are three examples of physical quantities that can be mathematically
described using the Grid | Calculus biharmonic operator. The Biharmonic Operator,
∇ 4 Z , is defined in multivariable calculus by
∂ 4Z ∂ 4Z ∂ 4Z
∇4 Z = + 2 +
∂ x4 ∂ x 2∂ y2 ∂ y4
Integrated Volume
The Grid | Calculus differential and integral operator, Integrated Volume, gives the
accumulated volume over the grid from the southwest to the northeast corner, or over
a subgrid from southwest to northeast. This method can calculate volumes over
subgrids of any shape. As an example, consider a Surfer-generated contour map
showing the thickness of a coal seam in a surface coal mine. The Integrated Volume
map could be used to compute the volume of coal mined in each month. Another
example is rainfall intensity for a thunderstorm. If you computed the Integrated
Volume and then overlaid a watershed boundary map, you could directly compute the
quantity of water flowing into each stream.
V(x, y) = ∫
α = xmin β
∫ z(α , β ) dα dβ
= ymin
567
Surfer
Consider a surface defined over a rectangular region extending from X min to X max
and Y min to Y max:
Y min
The Integrated Volume option enables easy X min X max
computation of volumes under rectangular
subgrids. For example, the volume under Y max
the shaded area in the figure at the right is
simply V(xr,yr) - V(xl,yr) - V(xr,yl) + (xl,yr) (xr,yr)
V(xl,yl). When applied to a surface
specified by a Surfer grid, the Integrated
Volume option generates a dimensionally
equivalent grid with the values at grid
nodes (xi,yi) equal to V(xi,yi). You can use
the grid node editor to obtain the volume
values at different XY locations. The
(xl,yl) (xr,yl)
integration is carried out if the surface
Y min
follows a bilinear functional form over each
X min X max
grid cell.
The integral of the bilinear form over the grid cell is the average value of the four
corners times the area of the grid cell. Therefore, the underlying formula is
568
Chapter 19 – Grid Operations
See, for example, Ripley (1981, Chapter 5), and Bras and Rodriguez-Iturbe (1985,
Chapter 6). The correlogram assesses spatial patterns and spatial correlation, while
the periodogram identifies periodicities in the data.
Grid Correlogram
The Grid | Calculus Fourier and spectral analysis, Grid Correlogram, assesses spatial
patterns and spatial correlation of a grid. Correlograms indicate how well grid values
correlate across the grid. They indicate underlying trends in the grid and give a
measure of the anisotropy of the grid.
Correlograms are symmetric; Z(x, y) = Z(-x,- y). Grid correlograms have the same
dimensions as the parent grids, but the axes represent separation distances.
Given gridded data z(u,v), where {u = 0, ..., NX-1} and {v = 0, ..., NY-1} the grid
auto-covariance, C(r,s) is defined as
1
C(r, s) = ∑ ∑ [ z(u, v) − z][ z(u + r, v + s) − z]
NX ⋅ NY u v
569
Surfer
0 ≤ u ≤ NX − 1 0 ≤ u + r ≤ NX − 1
0 ≤ v ≤ NX − 1 0 ≤ v + s ≤ NX − 1
The grid auto-covariance is the two-dimensional lattice equivalent of the time series
auto-covariance function. It is comparable to the two-dimensional variogram; under
the appropriate assumptions of statistical stationarity, there is a one-to-one
relationship between the grid auto-covariance function and the variogram. (Beware,
however, that the variogram of a raw data set - prior to gridding - is not the same as
the variogram of the resulting grid.)
The functions C(r,s) and corr(r,s) are symmetric in the sense that
C( − r,−s) = C(r, s)
but,
C( − r, s) ≠ C(r, s)
in general. As such, the grids generated by the grid correlogram option of the Grid |
Calculus sub-system show this symmetry.
570
Chapter 19 – Grid Operations
Grid Periodogram
The Grid | Calculus Fourier and spectral analysis, Grid Periodogram, is a
decomposition of the surface into the weighted sum of many two-dimensional
sinusoids. This operation shows hidden periodicity or repeating patterns that might not
otherwise be evident from looking at a contour map or surface.
Surfer computes the grid periodogram for the two-dimensional Fourier frequencies.
Grid periodograms have the same dimensions as the parent grids, but the axes
represent the wave numbers associated with the Fourier frequencies. The grid
periodogram surfaces are symmetric in the sense that Z(x, y) = Z(-x,- y).
Given gridded data z(u,v), where {u = 0, ..., NX-1} and {v = 0, ..., NY-1} the grid
periodogram, I(λ,µ) is formally defined as
2
N 1
I( λ , µ ) = ∑ ∑
4π N u v
2 [ z(u, v) − z] e − iλu e − iµv
where i = −1 .
571
Surfer
The value of I(λ,µ) is the weight or strength of the sinusoid with a two dimensional
frequency of (λ,µ).
Breaking this calculation into the component real and imaginary parts yields:
1
A( λ , µ ) = ∑ ∑ [ z(u, v) − z] cos(λr + µs)
N u v
1
B( λ , µ ) = ∑ ∑ [ z(u, v) − z] sin(λr + µs)
N u v
Then
I( λ , µ ) =
N
4π 2 [
⋅ A( λ , µ ) 2 + B( λ , µ ) 2 ]
where
-π < λ ≤ +π
-π < µ ≤ +π
Surfer does not compute the grid periodogram, I(λ,µ), for all possible frequencies
(λ,µ) in this range. Rather, it computes the grid periodogram for the two-dimensional
Fourier frequencies.
2π k
µ= k = − NY
2
, ,− 1,0,1, ,NY
2
NY
The indices (j,k) are called the wave number of the associated frequency (λ,µ).
Surfer follows the engineering convention (rather than the mathematicians'
572
Chapter 19 – Grid Operations
convention) of plotting the grid periodogram as a function of the wave numbers rather
than as a function of the frequency: I(j,k). The wave number is defined as:
wave number = 2π / wavelength (e.g. radians/meter)
The maximum wave number is the Nyquist frequency = π/∆X (or Y), which defines the
grid limits. Since Surfer maintains the grid dimensions (number of columns and
rows) from the source grid to the destination grid, there may not be exactly the same
number of rows and columns on both sides of the zero lines.
573
Surfer
574
Chapter 20
Volumes, Areas, Cross Sections, and
Residuals
Introduction to Volumes, Areas, Cross Sections, and
Residuals
The procedures described in this chapter are used to provide more information about
the data contained in grid files. The topics discussed in this chapter include volumes,
cross sections (slice), and residuals.
The Grid | Volume command calculates the volumes and areas for the surfaces
defined by grid files or a grid file and a horizontal plane. The Grid | Volume
computations contain the following information:
• Net volume between two grid files
• Net volume between a grid file and a horizontal plane
• Cut and fill volumes
• Surface area of a grid file above and below a specified level
• Planar area of a grid above and below a specified level
The Grid | Slice command outputs a data file that can be used to produce a cross
section or profile line. The Grid | Residuals command calculates the difference
between a grid and the original data. It is also used to calculate the Z value at a
specified point.
Volume calculations are performed on solids defined by an upper and lower surface.
The upper and lower surfaces are defined by a grid file or a plane of constant Z. When
two grid files are specified, the grid files must have the same XY limits and the same
number of rows and columns.
575
Surfer
The upper surface does not have to be above the lower surface at all points; the upper
surface may dip below the lower surfaces in some locations. Blanked regions on either
the upper or the lower surface are excluded from consideration during the volume
calculations.
Volume Accuracy
Volume calculations are generated for
each grid cell. In areas where the
surface is tilted at the top or bottom of
a grid cell, Surfer approximates the
volume of the prism at the top or
bottom of the grid cell column. For
very coarse grids, the prisms can
contain a significant volume. Volume
calculations become more accurate as
the density of the grid is increased
because the relative size of the prisms
is reduced compared to the size of the
associated column. Grids with
significant "noise" or with highly irregular
This grid has a highly irregular
surfaces are poor candidates for volume surface and is a poor candidate for
calculations. volume calculations.
These two grids are based on the same data but created at different grid densities.
The grid on the right is a better candidate for obtaining accurate volume information
because it is a much smoother and denser grid.
576
Chapter 20 – Volumes, Areas, Cross Sections, and Residuals
a. The button displays information about the grid file used in the volume
calculations. The information includes the grid size, the minimum and
maximum XYZ values contained in the grid file, and statistics. If the grid
file is large, click OK in the message box that appears to create a detailed
grid report or click the Cancel button to create a shorter, less detailed grid
report.
b. The Grid File option is used to specify a grid to use as the upper or lower
surface. To use the grid file for the surface, click the Grid File option. To
change the grid file for either the upper or lower surface, click the Grid File
Use the Grid | Volume command to calculate net volumes, cut and fill volumes,
planar areas, and surface areas.
577
Surfer
Grid File
The Grid File option is used to specify a grid to use as the upper or lower surface. To
use the grid file for the surface, click the Grid File option. To change the grid file for
either the upper or lower surface, click the Grid File option, and then click the
button to open the Open Grid dialog. Select another grid file and click the Open
button. The new grid file is now displayed in the Grid File box.
Constant Z
The Constant option is used to specify the level of the planar surface to use as the
upper or lower surface. Specify the level of the planar surface by entering the value
into the Z = box. The specified value is in Z data units.
Units
If the X, Y, and Z units are different, the resulting volume calculations are
meaningless. If, for example, your X, Y values are in meters but your Z values are in
feet, the volume results are square meters times feet, rather than cubic units. Z Scale
Factor can be used to adjust for this problem. In this example, setting the Z Scale
Factor to 0.3048 (number of meters in a foot) results in cubic meters for volume
calculations.
578
Chapter 20 – Volumes, Areas, Cross Sections, and Residuals
You will need to know the conversion factor to use this field.
A grid with X, Y, and Z units in feet, the units for the results are: Net Volume = (feet *
feet * feet) or ft3.
Grid Report
Click OK in the Grid Volume dialog and the results are displayed in the Grid Volume
Report. Use File | Save As to save the report, or you can copy the information to the
clipboard and paste it into another application.
The volume computations in the Grid Volume Report dialog include the following:
Volumes
The volume is calculated by three methods: Extended Trapezoidal Rule, Extended
Simpson's Rule, and Extended Simpson's 3/8 Rule. The reported volume is the sum of
the Positive Volume (Cut) and Negative Volume (Fill). The Z Scale Factor is also
reported in this section.
The Positive Volume (Cut) is the volume of material in those places where the upper
surface is above the lower surface. The Negative Volume (Fill) is the volume of
material in those places where the upper surface is below the lower surface. The Cut
Minus Fill is the difference between the cut and fill volumes. See Cut and Fill Volumes
for more information on cut and fill.
Areas
The Areas section reports both planar areas and surface areas. The Positive Planar
Area represents the planar area where the upper surface is above the lower surface.
The Negative Planar Area represents the planar area where the upper surface is below
the lower surface. The Blanked Planar Area is the sum of the areas over the blanked
regions on both the upper and lower surfaces.
579
Surfer
The Total Planar Area represents the planar area for the entire grid. Where two
surfaces coincide exactly, the area of coincidence is reported as part of the Positive
Planar Area.
The Positive Surface Area represents the area of the surface where the upper surface
is above the lower surface. The Negative Surface Area represents the area of the
surface where the upper surface is below the lower surface.
Net Volume
The volume calculation determines the net volume between the upper and lower
surface. The net volume is reported in the Volumes section of the Grid Volume Report.
See Cut and Fill Volumes for more information on the upper and lower surface.
To visualize net volume, consider a construction site where the topography must be
graded to a flat surface prior to the beginning of construction. The upper surface
represents the current topography, and the lower surface represents the final graded
site elevations. In some places, cut must be made into the current topography to
remove earth to the level of the final site. In other areas, earth may be needed to fill
in areas where the current topography is below the elevation of the final site. The net
volume is the difference between all cuts and all fills. If the volume is positive, earth
needs to be removed from the site to achieve the final level. If the volume is negative,
earth needs to be hauled into the site to achieve the final planned grade for the site.
Three methods are used to determine volumes. Surfer approximates the necessary
one-dimensional integrals using three classical numerical integration algorithms:
Extended Trapezoidal Rule, Extended Simpson's Rule, and Extended Simpson's 3/8
Rule; see Press et al., 1988, Section [4.1]. The difference in the volume calculations
by the three different methods measures the accuracy of the volume calculations. If
the three volume calculations are reasonably close together, the true volume is close
to these values. If the three values differ somewhat, a new denser grid file should be
used before performing the volume calculations again. The net volume can be reported
as the average of the three values.
580
Chapter 20 – Volumes, Areas, Cross Sections, and Residuals
In Surfer, this is computed by first integrating over X (the columns) to get the areas
under the individual rows, and then integrating over Y (the rows) to get the final
volume. This approach is explained in detail in Press, et al., 1988, Section [4.6].
Units
When the X, Y, and Z units are the same, volume results are given in cubic units.
Example 1
A grid with X, Y, and Z units in feet, the units for the results are (feet)3.
Example 2
A grid with X, Y, and Z units in meters, the units for the results are (meter)3.
A common situation is a grid with X, Y in latitude and longitude and Z in meters. The
grid may need to be converted to X, Y in meters to create useful results in (meter)3.
Blanked regions on either the upper or lower surface are excluded from consideration
during the cut and fill calculations.
Net Volume
To visualize net volume, consider a construction site where the topography must be
graded to a flat surface prior to the beginning of construction. The upper surface
represents the current topography, and the lower surface represents the final graded
site elevations. In some places, cut must be made into the current topography to
581
Surfer
remove earth to the level of the final site. In other areas, earth may be needed to fill
in areas where the current topography is below the elevation of the final site. The net
volume is the difference between all cuts and all fills. If the volume is positive, earth
needs to be removed from the site to achieve the final level. If the volume is negative,
earth needs to be hauled into the site to achieve the final planned grade for the site.
You can determine the volume of a pond for which you have generated a grid file. You
can define the grid file of the pond bottom as the upper surface, and use a plane set at
the level of the surface of the pond as the lower surface. The volume of the pond is
the Negative Volume (Fill) in the Cut & Fill Volumes section of the Grid Volume Report.
where:
is the grid column spacing, is the grid row spacing, is the grid node
value in row i and column j.
582
Chapter 20 – Volumes, Areas, Cross Sections, and Residuals
where:
is the grid column spacing, is the grid row spacing, is the grid node
value in row i and column j.
where:
is the grid column spacing, is the grid row spacing, is the grid node
value in row i and column j.
583
Surfer
Example
As an example, consider a grid file representing the bottom of a pond, with the water
level at a Z value of zero. If the grid representing the pond bottom is defined as the
upper surface and Z = 0 is defined as the lower surface, you can determine the
surface area of the bottom of the pond. Suppose you want to drain the pond and line it
with plastic. You need to know the area of the plastic necessary to line the pond
bottom. In this case, the negative surface area represents the surface of the pond
584
Chapter 20 – Volumes, Areas, Cross Sections, and Residuals
bottom. This would tell us precisely the amount of plastic necessary to line the pond
bottom.
The green line displays the negative surface area of the pond. This value determines the
amount of plastic needed to line the pond bottom in the example.
585
Surfer
7. To save the information, use the File | Save As command in the Grid Volume
Report window and specify a name and file extension.
Consider the way Surfer calculates the volume of a cube that is 1 foot x 1 foot x 1
foot. Surfer cannot generate a surface that is a perfect cube since each XY coordinate
can only have a single Z value. A diagonal line is drawn from the top surface to the
lower with a width of one grid unit. Using a grid with a one-foot grid line spacing, the
resulting surface looks like a pyramid with the top chopped off.
A cube with a coarse grid. Volume A cube with a finer grid. Volume
error is increased. error is reduced.
586
Chapter 20 – Volumes, Areas, Cross Sections, and Residuals
4. In the Lower Surface group, click the Grid File option button and click the
button.
5. In the Open Grid dialog, select the lower surface grid file and click the Open
button.
6. In the Grid Volume dialog, verify that the correct grid files are specified for the
upper and lower surfaces and click OK. The Grid Volume Report is generated.
The volume between the surfaces is reported as the Positive Volume (Cut), which,
in this case, is the same as the Volume calculation.
7. To save the volume information, use the File | Save As command in the report
window and specify a name and file extension. Click OK and the information is
saved.
Volume Reference
Press, W.H., Flannery, B.P., Teukolsky, S.A., and Vetterling, W.T. (1988), Numerical
Recipes in C, Cambridge University Press.
Cross Sections
The Grid | Slice command produces cross section
data. The cross section is generated by taking a
vertical slice through a gridded surface along a
boundary line. Surface traces on a cross section
are sometimes referred to as profile lines.
587
Surfer
the Output BLN File in the Grid Slice dialog by clicking the button next to Output
BLN File. The Save As dialog opens. Set the file name and path and click Save. The
blanking file contains three columns of data:
Column Contents
Column A X coordinate at each point where the boundary intersects a grid line.
Column B Y coordinate at each point where the boundary intersects a grid line.
Column C Z value at each point where the boundary intersects a grid line.
588
Chapter 20 – Volumes, Areas, Cross Sections, and Residuals
Specify the name for the Output DAT File by clicking the button next to Output
DAT File. The Save As dialog opens. Set the file name and path and click Save. The
ASCII data file consists of five columns of data. When the profile is written to the
ASCII file, a new row of data is generated for each point where the boundary line
intersects the grid lines in the data file. The columns in the data file are arranged as
follows:
Column Contents
Column X coordinate of the boundary line and grid line (row or column)
A intersection
Column Y coordinate of the boundary line and grid line (row or column)
B intersection
Column Z value at the boundary line and grid line (row or column) intersection
C
Column Column D contains the accumulated horizontal distance along the
D boundary line. This distance is accumulated even if the boundary lines
go outside the grid region. The distance is reset to zero for each new
boundary in the blanking file.
Column Column E contains the boundary number, used when more than one
E boundary line is contained in the file. Each new boundary line in the
blanking file is assigned a different number.
589
Surfer
The OK Button
Click OK and a data file (and a blanking file, if specified) is created.
5. Specify the name for the Output DAT File by clicking the button to open the
Save As dialog.
6. The Set values outside grid to option assigns a special Z value to points that lie
beyond the grid limits when the check box is active. If this option is not activated,
points outside the grid limit are not included in the output data file. The default
value is equal to the following equation:
7. The Set values in blanked grids to option assigns a special Z value to points that
lie inside blanked regions when the check box is active. If this option is not
activated, points inside the blanked areas are not included in the output data file.
The equation for the default value is given in step 6.
8. Click OK and a data file (and a blanking file, if specified) is created.
590
Chapter 20 – Volumes, Areas, Cross Sections, and Residuals
This is the cross section taken from the profile line on the map. The cross section was created
as a post map using column D as the X coordinate and column C as the Y coordinate.
591
Surfer
Residuals
The Grid | Residuals command computes the vertical difference between the Z value
in the data file and the interpolated Z value on a gridded surface. It gives a
quantitative measure of how well the grid file agrees with the original data. The
command can also be used to obtain the Z value of the surface at any point.
A residual is the difference between the Z value of a point in a data file and the
interpolated Z value at the same XY location on a gridded surface. Residual values are
reported as either positive or negative values. If the Z value in the data file is greater
than the Z value derived from the gridded surface, the residual value is positive. A
negative residual value indicates that the Z value from the data file is less than the
interpolated Z value at that point. If the grid file is blanked at the data point, the
residual value is left blank in the worksheet. Surfer uses a bilinear interpolation
method to calculate Z values at points that do not coincide with grid nodes.
592
Chapter 20 – Volumes, Areas, Cross Sections, and Residuals
Data Columns
Specify the location for the X, Y, and Z coordinates from the data file in the Data
Columns section.
Calculating Residuals
To calculate Residuals:
1. Click the Grid | Residuals command.
2. In the Open Grid dialog, select the grid file to be used for the residual calculation
and then click Open.
3. In the Open dialog, select the data file to be compared to the grid file, and then
click Open.
4. In the Grid Residuals dialog, specify the location for the X, Y, and Z coordinates
in the Data Columns section.
593
Surfer
5. In the Store residuals in column box, enter the column where you would like the
residuals stored. By default, Surfer selects the first empty column in the data file.
6. Click OK and the worksheet window opens. The worksheet window displays the
data file as it was specified in the Grid Residuals dialog with the additional
column for the residual data.
Calculating the Agreement between a Grid and the Original Data File
After performing the Grid | Residuals command:
1. In the worksheet, click the column letter for the column containing the residual
values to select the entire column. To get the statistics for just a portion of the
residual values, select only those particular values.
2. Choose the Data | Statistics command. Specify the desired parameters to be
reported.
3. If Show in a window is selected, the Statistics Results window is displayed with the
statistical information on the residual data. If the Copy to worksheet option is
selected, the residual results are placed directly into the specified columns of the
worksheet.
Consider a grid file that ranges from zero to 10 in the X and Y dimensions, and you
want to determine the value of the surface at the point (1,3) on the surface. If an XYZ
data file containing the coordinate (1,3,0) is created, you can use the Residuals
command to determine the value of the surface at this point.
1. Open a new worksheet window with File | New | Worksheet.
2. In column A, row 1, enter the X coordinate for the point at which you want to
determine the Z value. In column B, type in the Y coordinate, and in column C,
type the value zero. Add as many points as you want into the data file by entering
the coordinates for each point into a different row in the data file. Each Z value
should be zero.
3. Use the File | Save As command and enter a name for the data file, for example
RESID.DAT. Click Save and the XYZ data file is created.
4. Return to a plot window and click the Grid | Residuals command.
5. Select the grid file to use in the Open Grid dialog and click the Open button.
594
Chapter 20 – Volumes, Areas, Cross Sections, and Residuals
6. Select the data file you just created, for example RESID.DAT, in the Open Data
dialog and click the Open button.
7. In the Grid Residuals dialog, specify the columns for X, Y, and Z. Also, specify
the column to which the residual values are written in the worksheet.
8. Click OK and the worksheet window is opened with the data file including the
column with the residual values.
9. Use the Data | Transform command and multiply the reported residual values by
negative one (-1) to get the actual Z value of the surface at the points specified in
the data file.
595
Surfer
596
Chapter 21
Importing and Exporting Maps and
Graphics
Introduction to Importing and Exporting
Surfer supports several file formats to aid in the exchange of maps and graphics with
other applications. Files from other applications can be imported into Surfer as stand-
alone graphics or as a base map. For example, you can export files from Surfer as
metafiles and then import them into other software. The clipboard provides another
easy way to move maps to other Windows applications.
Click the File | Import command, or click the button, to import graphic "trim"
objects, background graphics, or some form of annotation. Use Map | New | Base
Map to import boundary information suitable for overlaying on top of other map types.
Look In
The Look in field shows the current directory. Click the down arrow to see the
directory structure. Click on the folders to change directories.
597
Surfer
File List
The file list displays files in the current directory. The current directory is listed in the
Look in field. The Files of type field controls the display of the file list. For example, if
Golden Software Boundary (*.GSB) is listed in the Files of type field only .GSB files
appear in the files list. To see all files in the directory, choose All Files (*.*) from the
Files of type list. Double-click on a file to open it or single-click the file and then click
the Open button.
File Name
The File name field shows the name of the selected file. Also, a path and file name can
be typed into the box to open a file.
598
Chapter 21 – Importing and Exporting Maps and Graphics
Files of Type
The Files of type field shows the file format to be opened. To change the file format,
click the down arrow and select the file type from the list.
The Common Graphic Files (*...) format type is selected by default. This displays all
the file formats that can be imported with File | Import in the navigation pane. If a
different format type is selected, Surfer will remember the setting until the end of the
current session. When Surfer is restarted, the default format type will be used.
To see all files in the directory, choose All Files (*.*) from the Files of type list.
Double-click on a file to open it or single-click the file and then click the Open button.
The All Files (*.*) option shows all of the file formats in the current directory, even if
the file type is not appropriate for the action chosen.
599
Surfer
Notes:
1. To open Golden Software Blanking .BLN and Atlas Boundary .BNA files in the
worksheet use File | Open rather than File | Import.
2. Images are typically imported into Surfer as a base map.
Look In
The Look in field shows the current directory. Click the down arrow to see the
directory structure and click on the folders to change directories.
600
Chapter 21 – Importing and Exporting Maps and Graphics
Specify files to import into the Surfer worksheet using the Merge dialog.
File List
The File list displays files in the current directory. The current directory is listed in the
Look in field. The Files of type field controls the display of the file list. For example, if
DAT Data (*.dat) is listed in the Files of type field only *.DAT files appear in the files
list.
601
Surfer
Files of Types
The Files of type field controls the display of the file list. For example, if DAT Data
(*.dat) is listed in the Files of type field only *.DAT files appear in the files list.
The All Recognized Types (*...) format type is selected by default. This displays all the
common file formats in the navigation pane. If a different format type is selected,
Surfer will remember the setting until the end of the current session. When Surfer is
restarted, the default format type will be used.
To see all files in the directory, choose All Files (*.*) from the Files of type list.
Double-click on a file to open it or single-click the file and then click the Open button.
The All Files (*.*) option shows all of the file formats in the current directory, even if
the file type is not appropriate for the action chosen. For example, a .GRD file may be
displayed, even though a .GRD file cannot be imported into the worksheet.
Select a file type from the Files of type drop-down list. The following formats are
supported:
Load Database
Click the Load Database button in the Merge dialog to open the Data Link
Properties dialog and import a database.
602
Chapter 21 – Importing and Exporting Maps and Graphics
Importing Databases
You can open database files in Surfer with the File | Import Database command in
the plot or worksheet window.
The data linking provides a method to link virtually any database supported by
Microsoft via an OLE DB Provider, ODBC, or some other supported format. Since the
data link provides access to many types of databases that vary by computer, and
since this link is provided by Microsoft, only general information is provided here.
Imported databases appear in a new worksheet window. Once the worksheet is saved,
the link to the database is removed.
603
Surfer
Exporting Files
The File | Export command saves files as graphic files to use in other programs.
Click the File | Export command, or the button, to open the Export dialog. The
File | Export command is disabled if there are no objects in the Surfer document.
Specify the save location, file name, and file type in the Export dialog.
604
Chapter 21 – Importing and Exporting Maps and Graphics
Save In
The Save in field shows the current directory. Click the down arrow to see the
directory structure and click on the folders to change directories. The buttons to the
right of the Save in field allow you to create new folders and change the view of the
file list.
File List
The file list displays the files using the extension specified in the Save as type box. A
file can be overwritten by selecting it from the file list.
File Name
The File name box displays the name of the selected file, or type in the path and file
name of the file to be exported.
Save As Type
The Save as type list box specifies the format of the file to be exported.
File Name
Export files typing a name into the File name box and then selecting the file type in
the Save as type list. For example, typing MYPLOT in the File name box and choosing
Tagged Image (TIFF) from the Save as type list results in MYPLOT.TIF. There is no
need to type in an extension because it is automatically added. If a file extension is
typed in the box along with the file name, the file type is determined by the typed
extension. For example, if MYPLOT.DXF is typed in the File name box, the resulting file
is in the AutoCAD DXF format, no matter what is set in the Save as type field.
605
Surfer
Notes:
1. When exporting as a Golden Software blanking file .BLN format, the BLN Options
page in the Export Options dialog allows you to break apart compound areas. If
this option is selected, compound areas are exported as separate simple areas.
Click the Defaults button to return the options to default values.
2. When exporting as an Atlas boundary file .BNA format, the BNA Options page in
the Export Options dialog allows you to break apart compound areas. If this option
is selected, compound areas are exported as separate simple areas. Click the
Defaults button to return the options to default values.
3. When exporting as a Computer Graphics Metafile .CGM format, the CGM Options
page in the Export Options dialog allows you to export all text as polygons. If this
606
Chapter 21 – Importing and Exporting Maps and Graphics
option is selected, all text objects will be exported as a series of polygons. Click
the Defaults button to return the options to default values.
4. When exporting as an AutoCAD .DXF file format, the DXF Options page in the
Export Options dialog allows you to specify export options for file format, file
compatibility, color mapping, and addition options. Click the Defaults button to
return the options to default values.
Exporting Contours
To retain the Z information for contour lines for use in other mapping programs, use
the Map | Export Contours command. The Export Contours command exports the
currently selected contour map as an AutoCAD .DXF, 2D ESRI .SHP, 3D ESRI .SHP, or
a .TXT text format.
• AutoCAD DXF: The contours are saved as elevated polylines. The polylines are
clipped to the map limits and scaled to the current map scale. Axes, labels,
contour fills, line properties (width, style, and color), etc. are not exported. The
contours are not affected by 2D page transformations or rotations. The
coordinates in the AutoCAD .DXF file are saved with 64-bit floating-point precision.
• 2D SHP: The 2D .SHP exports a shape 2D polyline type where each vertex along
the line comprises an X and Y coordinate. The Z coordinate for each vertex is
stored in the associated .DBF file.
• 3D SHP: The 3D .SHP exports a shape polyline Z type where each vertex along
the line comprises an X, Y, and Z coordinate. The Z coordinate for each vertex is
stored in the associated .DBF file.
• Text format: The text format .TXT exports each contour line as a series of X, Y, Z
points. Each point is on a separate line in the .TXT file.
If you would like to export the contours as part of a complete map, choose one of the
export options in File | Export.
607
Surfer
608
Chapter 22
Creating, Editing and Viewing Objects
Introduction to Surfer Objects
Surfer plot documents contain a collection of individual graphic objects. These
graphic objects include maps and drawing objects such as text blocks, lines,
rectangles, polygons, polylines etc. This chapter focuses on the drawing object,
creation of drawing objects, and their properties.
The Draw menu contains several objects that can be added to the plot window. You
can add text, polygons, polylines, symbols, rectangles, rounded rectangles, and
ellipses through the Draw menu, or through the draw toolbar.
Creating Objects
The Draw menu in the plot document has the following commands:
Command Description
Text Creates a text block
Polygon Creates a polygon
Polyline Creates a polyline
Symbol Creates a symbol
Rectangle Creates a rectangle or square
Rounded Creates a rectangle with rounded
Rectangle corners
Ellipse Creates an ellipse or circle
Spline Polyline Creates a polyline curve
Reshape Moves, adds, or deletes points in the
selected polyline, polygon, or spline
polyline
609
Surfer
Text
Use the Draw | Text command, or click the button to create text in the plot
document.
The font, height, color, opacity, and style can be set for text blocks in the Text
Properties dialog when typing text. These options can be set in the Property
Manager after the text is drawn.
You can set the default font properties with the Tools | Options command. On the
Default Attributes page, click the Font button to set the default font and text
properties.
The Default Attributes page in the Options dialog is used to specify the default line,
fill, symbol, and font attributes used when creating new objects. It is discussed in
Chapter 23, Options and Preferences.
Creating Text
To create text:
Editing Text
To edit text:
1. Click on the text in the plot window or in the Object Manager to select it.
2. The text properties appear in the Property Manager. You can change the Font
Properties of the text or type the Text to be displayed.
3. If the text contains multiple lines, click the next to Text to display the
Multiline Text dialog. When all edits are made in the dialog, click OK.
610
Chapter 22 – Creating, Selecting, and Editing Objects
Polygon
Use the Draw | Polygon command, or click the button to draw an irregularly
shaped area. Polygons must have at least three vertices (points).
Drawing Polygons
To draw a polygon:
The first and last points are automatically connected and the new polygon is drawn. To
end draw polygon mode, click on another toolbar button or press the ESC key on your
keyboard.
Drawing Tips
Following are some useful drawing tips for polygons:
• Click points on the page to draw a polygon, or click and hold the left mouse button
and drag the cursor to draw a continuous stream of points.
611
Surfer
• Click the right mouse button to remove the last drawn point. This can be done
repeatedly.
• If the CTRL key is pressed while clicking points, the points are constrained to 45-
degree angles.
• Double-click the left mouse button or press the ENTER key to close the polygon.
• To cancel drawing a polygon, press the ESC key before closing the polygon.
• Edit the polygon shape by using Draw | Reshape.
• Edit polygons by clicking on the polygon in the plot window or in the Object
Manager.
• Set default line and fill properties with the Tools | Options command. On the
Default Attributes page, click the Line or Fill button to set the default line or fill
properties.
• If you prefer to use the tool only one time, de-select the Retain tool mode option
in Tools | Options | General. When the Retain tool mode is not active, you can
double-click on the tool to use it multiple times.
Polyline
A polyline is a collection of one or more connected line segments. Use the Draw |
Drawing Polylines
To draw a polyline:
1. Click the Draw | Polyline command, or click the button to begin drawing a
polyline.
2. The cursor changes to a cross hair cursor to indicate drawing mode.
3. Move the cursor over the location for the start of the polyline and click the left
mouse button.
4. Move the cursor to the next position along the line and click again.
5. Continue this procedure until you click at the final point for the line. Press the
ENTER key.
6. To end drawing mode, click on another tool button or press the ESC key on your
keyboard.
Drawing Tips
Following are some useful drawing tips for polylines:
612
Chapter 22 – Creating, Selecting, and Editing Objects
• Click the endpoints of the line to draw a straight line, or click several points to
create an irregularly shaped line.
• Click the right mouse button to remove the last drawn point. This can be done
repeatedly.
• Click and hold the left mouse button to create a continuous stream of points.
• If the CTRL key is pressed while clicking points, the points are constrained to 45-
degree angles.
• Double-click the left mouse button or press the ENTER key to end the line.
• To cancel drawing the line, press the ESC key before ending the line.
• Edit the shape of the line using Draw | Reshape.
• Edit the line style and color by clicking on the line in the plot window or in the
Object Manager.
• Set default line properties with the Tools | Options command. On the Default
Attributes page, click the Line button to set the default line properties.
• If you prefer to use the tool only one time, de-select the Retain tool mode option
in Tools | Options | General. When the Retain tool mode is not active, you can
double-click on the tool to use it multiple times.
Symbol
Symbols are markers that are used to indicate point positions. Any TrueType font can
be used as a symbol, including several custom fonts provided with Surfer. You can
use the Draw | Symbol command to place symbols in the plot document.
The Symbol Set, Color, Size, Opacity, and Symbol can be customized in the Marker
Properties section.
Drawing Symbols
To draw a symbol:
Drawing Tips
Following are some useful drawing tips for symbols:
613
Surfer
• Edit a symbol style, color, and size by clicking on the symbol in the plot window or
in the Object Manager.
• Set default symbol properties with the Tools | Options command. On the
Default Attributes page, click the Symbol button to set the default symbol
properties.
• If you prefer to use the tool only one time, de-select the Retain tool mode option
in Tools | Options | General. When the Retain tool mode is not active, you can
double-click on the tool to use it multiple times.
Rectangle
You can use the Draw | Rectangle command to create a rectangle or square in the
plot document.
Drawing Rectangle
To draw a rectangle:
Drawing Square
To draw a square:
1. Hold down the CTRL key while dragging the mouse to draw a square rather than a
rectangle.
2. Hold down the SHIFT and CTRL keys while dragging the mouse to draw the square
from a center point rather than from end to end.
Drawing Tips
Following are some useful drawing tips for rectangles:
• Edit the rectangle or square properties by clicking on it in the plot window or in the
Object Manager.
614
Chapter 22 – Creating, Selecting, and Editing Objects
• Set default line and fill properties with the Tools | Options command. On the
Default Attributes page, click the Line or Fill button to set the default line or fill
properties.
• If you prefer to use the tool only one time, de-select the Retain tool mode option
in Tools | Options | General. When the Retain tool mode is not active, you can
double-click on the tool to use it multiple times.
Rounded Rectangle
You can use the Draw | Rounded Rectangle command to create a rounded
rectangle or square in the plot document.
Drawing Tips
Following are some useful drawing tips for rounded rectangles:
• Edit the rounded rectangle or square properties by clicking on it in the plot window
or in the Object Manager.
615
Surfer
• Set default line and fill properties with the Tools | Options command. On the
Default Attributes page, click the Line or Fill button to set the default line or fill
properties.
• If you prefer to use the tool only one time, de-select the Retain tool mode option
in Tools | Options | General. When the Retain tool mode is not active, you can
double-click on the tool to use it multiple times.
Ellipse
You can use the Draw | Ellipse command to create an ellipse or circle in the plot
document.
Drawing Ellipse
To draw an ellipse:
Drawing Circles
To draw a circle:
1. Hold down the CTRL key while dragging the mouse to draw a circle rather than an
ellipse.
2. Hold down the SHIFT and CTRL keys while dragging the mouse to draw the circle
from a center point rather than from end to end.
Drawing Tips
Following are some useful drawing tips for ellipse:
• Edit the ellipse or circle properties by clicking on the object in the plot window or
in the Object Manager.
616
Chapter 22 – Creating, Selecting, and Editing Objects
• Set default line and fill properties with the Tools | Options command. On the
Default Attributes page, click the Line or Fill button to set the default line or fill
properties.
• If you prefer to use the tool only one time, de-select the Retain tool mode option
in Tools | Options | General. When the Retain tool mode is not active, you can
double-click on the tool to use it multiple times.
Spline Polyline
A spline polyline is a smooth, flowing polyline with no sharp or distinct angles. Use the
Draw | Spline Polyline command, or click the button to draw a spline polyline.
You can change the line style, color, opacity, width, and end styles for the spline
polyline display.
1. Click the Draw | Spline Polyline command or the button to enter drawing
mode.
2. Move the cross hair pointer over the location for the start of the spline polyline and
click the left mouse button.
3. Move the mouse to the next position along the line and click again. Generate the
spline polyline by clicking on the anchor points during the polyline creation. The
anchor points identify a change in the spline polyline's shape and direction. Notice
that the spline polyline shape is visible and that you can change the curvature of
the line by moving the mouse in different directions.
4. Continue clicking on the anchor points until you click the last point.
5. Press the ENTER key on the keyboard or double-click the left mouse button to end
drawing mode. The new spline polyline is drawn.
6. Press the ESC key on the keyboard or click the button to exit drawing mode.
Drawing Tips
Following are some useful drawing tips for spline polylines:
• Click points on the page to draw a spline polyline.
• If the CTRL key is pressed while clicking points, the points are constrained to 45-
degree angles.
• Right-click to remove the last drawn point. Repeated clicking of the right mouse
button removes all points in reverse order.
617
Surfer
• Double-click the left mouse button or press the ENTER key to end drawing mode.
• Press the ESC key to cancel drawing the spline polyline before ending the line.
• Use the Draw | Reshape command to change the spline polyline's shape.
• Edit the spline polyline properties in the Property Manager.
• Change the properties for a group of selected spline polylines in the Property
Manager.
• Use the Tools | Options command to set the default line properties for the spline
polyline.
Reshape
Use the Draw | Reshape command to move, add, and delete vertices within a
selected polyline, polygon, or spline polyline. Objects such as metafiles, composites,
base maps, polygons, and polylines can be edited with Reshape.
click the button or right-click on the object and select Reshape. After selecting
Reshape, the cursor will change to to indicate reshape mode. When you select an
object that can be reshaped (a polyline, spline polyline, or polygon), all the vertices in
the selected object are shown with hollow squares. Reshape mode is persistent and
you can reshape multiple items until you exit the reshape mode. After you reshape an
object, select another object to reshape, or exit reshape mode.
Selecting Vertices
• Left-click on a vertex to select it. The selected vertex is indicated by a solid green
square.
• To select the first vertex, press the HOME key. To select the last vertex, press the
END key.
• To shift the selected vertices forward by one position, press the TAB key. To shift
the selected vertices backward by one position, hold the SHIFT key and press the
TAB key.
• To select multiple vertices, hold down the SHIFT key and left-click additional
vertices or left-click and drag the cursor to make a rectangular block selection.
618
Chapter 22 – Creating, Selecting, and Editing Objects
Vertices can be added or removed from the block selected vertices by holding
down the SHIFT key.
• Hovering the mouse over an unselected vertex will display a grey highlight around
the vertex indicating it may be selected or dragged.
• The cursor will change to a when it is over a vertex to indicate the vertex
may be selected or dragged.
• If you have multiple polyline or polygon objects in the plot window, you can edit
multiple objects while in the reshape mode. Vertices can only be edited for the
selected object.
Moving Vertices
Once a vertex or vertices are selected and the cursor display is a , hold the left
mouse button and drag the vertex to a new location. Release the left mouse button to
place the vertex in the new location.
Enter reshape mode Drag the vertex to a new Release the mouse button
and select a vertex location. The original line is and the vertex is moved.
displayed in addition to the new
line that will connect to the new
vertex position.
Alternatively, place the cursor over the vertex, hold the SPACEBAR, and use the
ARROW keys on the keyboard to move the vertex to a new location.
Deselecting Vertices
• A selected vertex can be deselected by holding down the SHIFT key and left-
clicking the vertex.
• All vertices can be deselected by clicking in an unused space.
619
Surfer
• Pressing ESC while dragging will cancel the drag. Pressing ESC while NOT dragging
(or by pressing ENTER) will exit the reshape tool.
• Each individual edit can be undone using the Edit | Undo command.
Adding Vertices
To enter insert mode, hold down the CTRL key. The cursor will change to . Left-
click anywhere in the plot window, or on the existing object and a new node will be
added at the closest point on the existing object.
Status Bar
When the reshape tool is active, the status bar updates with current position in world
coordinates and map coordinates (if available).
620
Chapter 22 – Creating, Selecting, and Editing Objects
is located at the exact anchor point controls the position of the anchor point. Click
and drag the green control point to a new location to move the line. The control
point that is connected by a line to the anchor point controls the degree of
curvature of the line. Click and drag the green control point to make the line more
or less curvy. The closer the control point is to the line, the straighter the line will
be.
5. For anchor points that are not the first or
last point on the spline polyline, three
control points will be active for each anchor
point. The three control points are
connected by a light blue line. The middle
control point determines the location of the
anchor point.
6. The two outer control points determine the
curvature of the line. Click the outer
control points and drag to a new location A middle anchor point is being edited. The
to make the line more or less curvy. The left and right green control points control the
curvature of the spline polyline. The center
line connecting the control points will
green control point determines the location
always be tangent to the anchor point on of the anchor point.
the spline polyline. The shorter the
connecting line, the sharper the angle at
the anchor point. The longer the
connecting line, the smoother the curve at the anchor point.
7. To add points to the spline polyline, hold down the CTRL key and click on the line.
A new control point is added.
8. To delete points, click on an existing point and press the DELETE key on the
keyboard.
9. The contents of all map layers are always constrained within the map limits. If an
object exceeds the map limits, the object is clipped. Change the map limits to
expand the map limits to include reshaped contents. Check the Use data limits box
to resize the map limits to fit your edited object.
621
Surfer
Selecting Objects
There are several ways to select objects in Surfer. An object is selected if there is a
bounding box with selection handles surrounding the object. The name of the selected
object appears in the status bar. You can set some selection options in Tools |
Options.
button. Once displayed, click on the object in the list you wish to select. The
object is then selected in the plot window. The object properties are displayed in
the Property Manager.
• Hold down the CTRL key while clicking on objects to select multiple objects in the
Object Manager, or hold down the SHIFT key to select adjacent objects.
• To select a single object in the plot window, move the cursor over the object using
the mouse or the arrow keys. When the cursor is over the desired object, click the
left mouse button or press the SPACEBAR on the keyboard. Eight rectangular
selection handles appear, indicating that the object is selected.
• If an object other than the one you want is selected, hold down the CTRL key and
continue clicking with the mouse or SPACEBAR until the desired object is selected.
Any objects that were previously selected become deselected. (The bounding
boxes for the objects are overlapping.)
• To select two or more objects in the plot window, hold down the SHIFT key while
making your selections. This retains previously selected objects and includes the
newly selected objects. You can hold down both the CTRL and SHIFT keys to select
several overlapping objects in the plot window.
• The block select allows you to select one or more objects contained in a user-
defined rectangle. Press and hold the left mouse button on an empty portion of the
plot window. Drag the mouse to form a rectangle around the group of objects you
wish to select. Alternatively, you can use the arrow keys to position the cursor on
an empty portion of the plot window, press and hold the SPACEBAR, and move the
cursor with the ARROW keys. If the Rectangle must fully surround check box is
activated in Tools | Options | Drawing, then only objects fully surrounded by
the selection rectangle are selected. If the check box is not activated, then all
objects with any portion of their bounding boxes within the block select rectangle
are selected.
• The Edit | Select All command is used to select all the objects in the plot window.
Pressing the CTRL+A keys performs the same command.
622
Chapter 22 – Creating, Selecting, and Editing Objects
• The Edit | Invert Selection command selects all unselected objects and
deselects all selected objects. This command is useful for selecting a large number
of objects and leaving a few isolated objects unselected. Select the objects you do
not want to select and use the Invert Selection command.
• The TAB key can be used to cycle through all objects, selecting each one at a time.
• When you select a nested object, the main object is also selected. For example, if
you select the contours map layer, the map object is also selected. Only one
nested object can be selected at a time. For example, it is not currently possible to
select two axes at once. It is also not possible to select any nested objects within a
composite object.
Block Select
Block select items by dragging a rectangle around them. You can use the block select
feature by:
• Clicking the Edit | Block Select command and dragging a rectangle around the
objects to select.
• Clicking the button to select items by dragging a rectangle around the objects
to select.
• Select one object in the plot window or Object Manager, hold the SHIFT key, and
select additional objects to add to the block selection.
• Use the mouse to drag a block selection.
• To avoid accidentally moving an object when in block selecting objects, choose the
Edit | Block Select command. If an object is properly selected a bounding box
will surround the object. The block select options are set in Tools | Options |
Drawing.
Deselecting Objects
Use the Edit | Deselect All command, or press CTRL+SHIFT+A on the keyboard, to
deselect all selected objects. This command is useful when zoomed in on objects.
Alternatively, you can deselect objects by clicking in the white space.
623
Surfer
Object Properties
Drawing and selecting objects have been discussed in the previous sections. All these
objects have their own properties, which could be set in the Property Manger or in a
properties dialog depending upon the object. In this section the properties are
discussed in detail.
624
Chapter 22 – Creating, Selecting, and Editing Objects
Font
Select the Font from the drop-down list. Click the arrow button or select a font and
use the ARROW keys on the keyboard to scroll through the Font list. The selected font
is displayed in the Sample group in the dialog. The font files that are installed on your
computer are displayed in the Font list. Surfer supports true type fonts. All text in a
text block uses the same Font, unless a math text operation is applied.
Size (points)
Set the text size in the Size (points) field. Use the arrow buttons to scroll to a new
number or type a number into the box. A Size (points) value between zero and 720
can be specified.
Style
Check the Bold, Italic, Strikeout, or Underline boxes to apply a style to the text. Note
that some typefaces, such as Symbol, do not support bold or italicized text.
625
Surfer
Alignment
The Alignment controls the location of the text relative to the reference point. A
reference point is the point clicked in the plot window when the crosshair cursor is
placing the text on the screen. The text box is horizontally and vertically aligned
relative to the reference point. The default position is that the reference point is at the
upper left corner of the bounding box (left, top).
• Left horizontally aligns the text box so that the reference point is to the left of the
text box.
• Center horizontally centers the text box on the reference point.
• Right horizontally aligns the text box so that the reference point is to the right of
the text box.
• Top vertically aligns the text box so that the reference point is above the text box.
• Center vertically centers the text box on the reference point.
• Baseline vertically aligns the text box so that the reference point is located at the
base of the text. The baseline is the imaginary line along which characters are
positioned as they are drawn. Descenders on characters are drawn below the
baseline.
• Bottom vertically aligns the text box so that the reference point is below the text
box.
Sample Preview
In the Text Properties dialog, a sample of the selected text options (Font, Style,
Opacity, Foreground and Background Color) appears in the Sample group. Text,
Alignment and Size changes are not displayed in the Sample preview.
Entering Text
In the Text Properties dialog, enter the text you wish to see in the document into
the bottom Text box. Press ENTER on your keyboard to start a new line of text. Press
TAB on your keyboard to exit the Text area.
In the Property Manager, click on the box to the right of the Text item. Click in the
box and type new text. If the text has multiple lines, click the to open the
Multiline Text dialog. To add a new line, press ENTER on your keyboard. When
finished making all edits to the text, click OK.
OK and Cancel
Click OK to save the text or font changes and exit the dialog. Click Cancel to exit the
dialog without saving changes.
626
Chapter 22 – Creating, Selecting, and Editing Objects
Fill Properties
Use the Fill Properties to change fill properties for selected objects in the document.
You can set default fill properties through Tools | Options | Default Attributes.
Fill Pattern
Change the Pattern by selecting a
pattern from the fill pattern palette.
Open the pattern palette by clicking the
pattern button. Click on a new pattern
in the list to select it.
627
Surfer
Foreground Color
Foreground Color is the color of the
pattern lines or pixels. Select a new
color by clicking on the color in the
color palette. Only the foreground
color can be applied to solid colors.
The foreground colors can be applied
to any stock hatch pattern or
grayscale image pattern. They
cannot be applied to the None
pattern or non-grayscale image
patterns. To create a custom color,
Specify fill properties in the
click on the Custom button at the
Fill Properties dialog.
bottom of the palette. This opens
the Colors dialog.
Foreground Opacity
Change the Foreground Opacity by entering a value from 0% (completely transparent)
to 100% (completely opaque) or dragging the slider to change the opacity
percentage. Opacity is disabled if it does not apply to the current pattern. Note that for
true color image fill patterns the Foreground Opacity applies to the image in its
entirety.
Background Color
Background Color is the color behind the pattern. All patterns must have a background
color. If you do not wish to see the background color, change the Background Opacity
to 0%. To create a custom color, click on the Custom button at the bottom of the
palette. This opens the Colors dialog.
Background Opacity
Change the Background Opacity by entering a value from 0% (completely transparent)
to 100% (completely opaque) or dragging the slider to change the opacity
percentage. Opacity is disabled if it does not apply to the current pattern.
Offset
The Pattern Offset can be changed for image patterns. The offset controls the location
of the pattern within the geometry. Change the X and Y values separately to move the
image in the desired direction.
628
Chapter 22 – Creating, Selecting, and Editing Objects
Scale
The Pattern Scale can be changed for image patterns. The scale controls the density of
the pattern. In the Property Manager, check the Proportional box to connect the X
and Y scale values.
When the scale is proportional, the current aspect ratio is maintained. Changing the X
or Y scale will cause the other scale to be adjusted proportionally to maintain the
aspect ratio at the time the scale was set to proportional.
Stretch
Check the Stretch option to stretch image fills to completely fill the geometry. If
Stretch is not selected, the image will be repeated to fill the geometry.
Sample
The sample shown next to the Fill Properties line shows the selected pattern,
foreground color, and background color.
Fill Palette
The fill pattern palette is opened by clicking on the fill
pattern in the Fill Properties section.
• The pattern name and type appears at the top of
the palette.
• Select a pattern by clicking on it.
• Hold the cursor over a pattern to display a tool tip
of the pattern name.
• Use the scroll bar to see all of the available fill
patterns.
629
Surfer
Line Properties
Use the Line Properties sections in
the Property Manager to change line
properties for selected lines in the
document. You can set default line
properties through Tools | Options |
Default Attributes.
Occasionally, objects will open a Line Properties dialog to access the line properties.
Sample
The sample of the line is
displayed next to Line
Properties. The sample
shows the line style,
color, opacity, and width
options.
630
Chapter 22 – Creating, Selecting, and Editing Objects
Color
Click the color next to Color to open the color palette. Click on a color to use it for the
selected line. The color box and the sample line update to show the new selection.
Click on the Custom button at the bottom of the color palette to choose a custom
color.
Opacity
Change the Opacity of the line by entering a value from 0% (completely transparent)
to 100% (completely opaque) or by dragging the to change the opacity
percentage.
Width
Change the line Width by typing a new number into the box or by using the arrow
buttons to the right of the box. The line width can be zero to 0.5 inches (1.27 cm)
wide. A width of zero is one pixel wide.
End Styles
The ends of the lines can have arrowheads on them as defined in the End Styles
section. The Start style is placed at the first vertex of the line. The End style is placed
at the last vertex. The Scale determines the size of the arrowhead. The End Styles
section is not present and/or active when editing some objects.
Info Page
The Info page for a polyline displays the Coordinate System, Number of vertices, and
Length. The Info page is discussed later in this chapter.
Line Palette
The line palette is opened by clicking the arrow to the
right of the line sample.
• The name of the line appears at the top of the palette.
• Select a line from the palette by clicking on a line.
• Create a custom line style by clicking on the Custom
button at the bottom of the line palette.
Select a predefined or
custom line from the
line palette.
631
Surfer
Color Palette
The color palette is opened by clicking on an existing
color button in the Colors drop-down.
• The name of the color appears at the top of the
palette.
• Select a color from the palette by clicking on a color.
• Create new colors by clicking on the Custom button
at the bottom of the color palette.
Symbol Properties
Use the Symbol Properties in the Property Manager
to change or set symbol properties. You can set default
symbol properties through Tools | Options | Default Select a predefined or
Attributes. custom color from the
Color Palette.
Symbol Page
The Symbol page allows you to customize the Symbol, Symbol Set, Size, Color, and
Opacity.
632
Chapter 22 – Creating, Selecting, and Editing Objects
Symbol Set
Select the Symbol Set from the list. The Symbol Set can be any True Type font
installed on your system. To change
the Symbol Set, click on the
existing font name. Select the new
font from the list.
Symbol
Choose the Symbol by clicking the
existing symbol and selecting a new
symbol from the symbol palette.
The number of the selected symbol
is indicated in the title bar above
the palette.
Size
Change the Size of the symbol by typing a new number into the box. Symbols can be
from 0 to 4.000 inches (0 to 10.160 centimeters) in size. Sizes are reported in page
units.
Color
Change the Color of the symbol by selecting a new color from the color palette. Create
new colors by clicking the Custom button at the bottom of the color palette.
Opacity
Change the Opacity of the symbol by entering a value from 0% (completely
transparent) to 100% (completely opaque) or dragging the slider to change
the opacity percentage.
Custom Symbols
Custom symbols can be created using a third party TrueType font editing software.
633
Surfer
Symbol Index
The symbol index is the symbol or glyph number as it appears next to the Symbol
option. This is the 0-based offset of the symbol within the symbol set. If the current
symbol set is not Default Symbols, then 32 must be added to the index value. This
makes the symbol index the same as its ASCII code. You can also use the Window’s
Character Map to determine the ASCII code for font symbols.
Info Page
The Info page in the Symbol Properties dialog displays the Position in terms of X, Y.
Metafile Properties
A metafile is a collection of
Windows graphic commands that
create text and images. Metafiles
are usually transferred through the
clipboard or by file. Metafiles can
be imported with the File | Import
command. Metafiles can also be
used to create a base map with the
Map | New | Base Map
command.
The Property Manager has information
and opacity control for a metafile.
General Page
The General page controls the metafile opacity. Change the Opacity of the metafile by
entering a value from 0% (completely transparent) to 100% (completely opaque) or
Info Page
The Info page for a metafile displays the type of metafile, description, number of
records, and size in bytes.
634
Chapter 22 – Creating, Selecting, and Editing Objects
Label Formats
The label format used by various objects may be modified using the Label Format
section in the Property Manager or the Label Format dialog. The label type, length,
prefix, and suffix may be set using the label format options.
The Label Format section in the Property Manager is typically accessed by clicking the
Labels tab and opening the Label Format section. The dialog is displayed for a contour
map that uses the Advanced Levels options. The options in both the Property Manager
and the dialog work in the same manner.
Type
The Type option changes how numbers are displayed. Setting Type to Fixed displays
numbers as dd.dd. The numbers to the right of the decimal are set in the Decimal
digits box. For example, if the numeric format is set to Fixed with three digits after the
decimal point, the number 1998 displays as 1998.000.
635
Surfer
The Exponential option displays numbers as d.ddE+dd where d is a single digit, dd can
be one or more digits, and +dd is a sign and three digits.
The numbers to the right of the decimal are set in the Decimal digits box. For
example, if the numeric format is set to Exponential with two Decimal digits, then
1998 displays as 1.99E+003.
The Compact option displays the labels in either fixed or exponential fashion,
whichever requires fewer digits. Enter the number of digits to display in the Significant
digits box. For example, if the numeric format is set to Compact with two total digits,
the year 1998 displays as 1.9E+003.
Decimal Digits
The numbers to the right of the decimal are set in the Decimal digits box when Type is
set to either Fixed or Exponential labels.
Significant Digits
The number of significant digits is set in the Significant digits box when Type is set to
Compact labels. Significant digits include numbers before and after the decimal. So, if
the Significant digits are set to 2 and posted numbers are larger than 100, rounding
will occur in the display of the labels.
Thousands
If the Thousands box is checked, a comma appears every three digits to the left of the
decimal point.
Absolute Value
Check the Absolute value check box to display the absolute value of the numbers.
Negative numbers are displayed without negative signs.
636
Chapter 22 – Creating, Selecting, and Editing Objects
Prefix
You can add a text string before each label using the Prefix box. For example, a "$"
could be used as a prefix. Type the text exactly as you want it to appear in the Prefix
box.
Suffix
You can add a text string after each label using the Suffix box. For example, a unit of
measure " ppm" could be used as a suffix. Type the text exactly as you want it to
appear in the Prefix box.
Surfer caches all data used by all maps within the .SRF file including the data points
used in a post map and the grids used in grid based maps.
If the original data file or grid file is changed and unsaved, the modified file will not be
used when the .SRF file is reopened. Use the File | Reload Map Data command to
update data or grid file information from the saved version of the files.
Unable to Locate
If the data is not found a dialog with the name of the map layer is displayed. Click the
Yes button to manually find the missing data file. Click the No button to skip the map
layer and choose not to update the file that cannot be located.
If the data is not found a dialog with the name of the map layer is displayed. Click the
Yes button to manually find the missing data file. Click the No button to skip the map
layer and choose not to update the file that cannot be located.
dialog by changing or reloading the file. Click the button to change or reload the
file used to create the map. For example, to update the grid file used to create a
contour map, click on the contour map to select it. In the Property Manager, click on
the General tab and change the file used in the Grid file box.
637
Surfer
Trackball
Use Map | Trackball command, or click the button to rotate, tilt, and change the
field of view of a selected map in the plot window. The cursor will change to a ,
indicating you are in trackball mode. The Map | Trackball command is similar to using
the map View tab in the Property Manager.
Field of View
In trackball mode, when you right-click in the map's bounding box, dragging up
increases the field of view and changes the Projection to Perspective. Dragging down
while right-clicking decreases the field of view, and the Projection changes to
Orthographic if the field of view is decreased to 1°. The field of view value is shown in
the status bar when the right mouse button is held down.
638
Chapter 22 – Creating, Selecting, and Editing Objects
Arranging Objects
The Arrange menu in the plot document is used for arranging objects in different
orders, combining, rotating and aligning the object. It has the following commands:
Command Description
Order Arranges drawing objects with move to front, move to back,
Objects move forward, or move backward
Align Objects Aligns objects to the left, center, right, top, middle, or bottom
Group Groups selected objects into a single object
Ungroup Breaks a grouped object into multiple objects
Enter Group Enters a base map object or composite object to add, remove,
or edit objects in the coordinate system of the group
Exit Group Exits an open group
Rotate Rotates an object by specific degrees
Free Rotate Rotates an object with the mouse
Transform Moves, scales, rotates objects, or clears transforms
Ordering Objects
The Arrange | Order Objects command is used to change the order in which objects
are drawn. Objects drawn last on the page might obscure objects drawn underneath.
By selecting objects and choosing the Arrange | Order Objects command, you can
change the order in which they are drawn.
Move to Front
The Arrange | Order Objects | Move to Front command moves the selected object
to the front. The object will appear on top of the other objects. Alternatively, right-
click the object and select Order Objects | Move to Front, or click the button.
Objects can also be moved by dragging them to a new position in the Object
Manager.
The default keyboard shortcut for the Arrange | Order Objects | Move to Front
command is SHIFT + PAGE UP. The keyboard shortcuts can be customized with the
Tools | Customize | Keyboard command.
639
Surfer
Example
In the left drawing, the red square is located behind
all of the other objects. Use Move to Front to move
the square to the front layer so that it appears in
front of all the other objects (right drawing). Move
Forward also moves the square forward one layer at a
time.
Move to Back
The Arrange | Order Objects | Move to Back command moves the selected objects
to the back. The object will appear behind the other objects. Alternatively, right-click
the object and select Order Objects | Move to Back, or click the button.
Objects can also be moved by dragging them to a new position in the Object
Manager.
The default keyboard shortcut for the Arrange | Order Objects | Move to Back
command is SHIFT + PAGE DOWN. The keyboard shortcuts can be customized with
the Tools | Customize | Keyboard command.
Example
In the left drawing, the red square is located in front
of all the other objects. Use Move to Back to move
the square to the back layer so that it appears
behind all of the other objects (right drawing). Move
Backward also moves the square backward one layer
at a time.
Move Forward
The Arrange | Order Objects | Move Forward command moves the selected
objects forward one layer. Alternatively, right-click the object and select Order
Objects can also be moved by dragging them to a new position in the Object
Manager.
640
Chapter 22 – Creating, Selecting, and Editing Objects
The default keyboard shortcut for the Arrange | Order Objects | Move Forward
command is CTRL + PAGE UP. The keyboard shortcuts can be customized with the
Tools | Customize | Keyboard command.
Example
In the left drawing, the red square is located behind all the other objects. Use Move
Forward to move the square forward one layer so that it appears between the circle
and the triangle (middle drawing). Selecting Move Forward again places the square
on top of the other objects (right drawing). Move to Front also places the square on
top of the other objects.
Move Backward
The Arrange | Order Objects | Move Backward command moves the selected
object backward one layer. Alternatively, right-click the object and select Order
Objects can also be moved by dragging them to a new position in the Object
Manager.
The default keyboard shortcut for the Arrange | Order Objects | Move Backward
command is CTRL + PAGE DOWN. The keyboard shortcuts can be customized with the
Tools | Customize | Keyboard command.
Example
In the left drawing, the red square is located in front of all the other objects. Use
Move Backward to move the square back one layer so that it appears between the
circle and the triangle (middle drawing). Selecting Move Backward again places the
square on behind all of the other objects (right drawing). Move to Back also places the
square on behind the other objects.
641
Surfer
Aligning Objects
The Arrange | Align Objects command is used to align selected objects relative to
the bounding box surrounding the selected objects. The objects can be aligned both
vertically and horizontally.
Align Left
Left aligns all selected objects along the left side of the bounding box.
Align Center
Center centers all selected objects between the left and right sides of the bounding
box.
Align Right
Right aligns all selected objects along the right side of the bounding box.
Align Top
Top aligns all selected objects along the top of the bounding box.
Align Middle
Middle centers all selected objects between the top and bottom sides of the bounding
box.
Align Bottom
Bottom aligns all selected objects at the bottom of the bounding box.
642
Chapter 22 – Creating, Selecting, and Editing Objects
To move the location of individual items in the composite object, use the Arrange |
Enter Group command. Move the item to the new desired location. Once you have
completed moving the objects, use the Arrange | Exit Group command to exit the
group.
Ungrouping
The Arrange | Ungroup command is used to separate objects that have been
previously combined into a composite object using the Arrange | Group command.
The Arrange | Ungroup command can also be used on some imported files: Golden
Software Boundary .GSB, Atlas Boundary .BNA, USGS .DLG, .LGO, .LGS, AutoCAD
.DXF, Golden Software Blanking .BLN, Metafiles, and some pasted objects.
Enter Group
The Arrange | Enter Group command is used to manually add new objects to a base
map, an empty base map, or a grouped object.
643
Surfer
Base maps and composite objects can be edited. Enter Group is applicable when a
base map layer or composite object is selected.
Open Group
An open group is indicated when the sizing handle color changes from a green to a
gray. When the group is open, the editing commands operate within the group only.
New objects can be added to the group. Multiple objects can be selected, deleted, and
edited.
Exit Group
Use the Arrange | Exit Group command to exit the group. To select objects outside
of the open group, be sure to exit the group.
Rotating Objects
Use the Arrange | Rotate command to
rotate an object by a specified number of
degrees. After selecting the command, type
the number of degrees to rotate the object
into the rotate dialog. Positive numbers
rotate the object in a counterclockwise
direction and negative numbers rotate the Specify the degree of Counterclockwise
object in a clockwise direction. rotation in the Rotate dialog.
Free Rotate
You can use Arrange | Free Rotate to rotate an object with the mouse. Select the
object then click the Arrange | Free Rotate command, or click the button. The
pointer will have a next to it to indicate that the program is in rotate mode. To
rotate an object click inside the object’s bounding box and hold the left mouse button
while moving the pointer. As the object is rotated the degrees of rotation are indicated
in the status bar.
Clear Rotation
To clear rotation, use Arrange | Transform.
644
Chapter 22 – Creating, Selecting, and Editing Objects
Transforming Objects
When you select and drag an object, or resize it via the sizing handles, you are
transforming the object. The Arrange | Align Objects, Arrange | Rotate, and
Arrange | Free Rotate commands also transform the selected object. The
accumulated effects of all transformations applied to an object are recorded as a set of
page transformation parameters.
Y Offset
The Y Offset specifies the vertical translation (in page units). A positive Y Offset shifts
the object up, a negative Y Offset shifts the object down.
X Scale
The X Scale parameter modifies the width of the object. A value of 2.0 doubles the
width, a value of 0.5 cuts the width in half, while a value of 1.0 leaves the width
unchanged.
645
Surfer
Y Scale
The Y Scale parameter modifies the height of the object. A value of 2.0 doubles the
height, a value of 0.5 cuts the height in half, while a value of 1.0 leaves the height
unchanged.
Rotation
The Rotation specifies a counterclockwise rotation about the origin. The rotation angle
is given in degrees.
Shear
The Shear changes the X coordinate as the Y coordinate changes. For example, a
shear of 1.0 shifts the X coordinate 1 inch to the right for every inch along the Y axis.
The order in which the transformations are applied makes a difference (these
transformations are not commutative). The four transformations are applied in the
following order: scale, shear, rotation, and translation.
References
Foley, James D. and Andries van Dam (1990), Computer Graphics: Principles and
Practice, Addison-Wesley, Reading, MA, 1174 pp.
Hearn, D. and M.P. Baker (1997), Computer Graphics C, 2nd edition, Prentice Hall,
Upper Saddle River, NJ, 652 pp., ISBN 0-13-530924-7.
Viewing Objects
The View menu in the plot document has the following commands:
Command Description
Fit to Window Zooms to show all of the objects on screen
Page Zooms to fit the full page on screen
Zoom Zooms in, out, with rectangles, on selected objects, realtime,
actual size, or to the full screen
646
Chapter 22 – Creating, Selecting, and Editing Objects
Fit to Window
Use the View | Fit to Window command, or click the button to adjust the zoom
so all objects fill the plot window.
Page
Use the View | Page command, or click the button to see extents of the page.
The page outline is visible if the Show page rectangle option is checked in Tools |
Options | Drawing.
Zoom In
The View | Zoom | In command increases the magnification of the image in the plot
window. The command scrolls the window to keep the point of interest centered.
Alternatively, click the button. The cursor will change to a to indicate zoom in
mode. Left-click the area on which to center the magnified image.
647
Surfer
Zoom Out
The View | Zoom | Out command decreases the magnification of the image in the
plot window. The command scrolls the window to keep the point of interest centered.
Alternatively, click the button. The cursor will change to a to indicate zoom
out mode. Left-click the area on which to center the magnified image.
Zoom Rectangle
The Zoom Rectangle command allows magnification by drawing a rectangle around
the area of interest in the plot window.
Select the View | Zoom | Rectangle command, or click the button to enter zoom
rectangle mode. The cursor will change to a to indicate that you are in zoom
rectangle mode. Hold down the left mouse button and drag the dotted zoom rectangle
648
Chapter 22 – Creating, Selecting, and Editing Objects
around the area of interest to magnify it. When the left mouse button is released, the
plot window will zoom to the selected area.
Zoom Selected
The View | Zoom | Selected command magnifies selected objects to the maximum
size possible in the plot window.
Select an object in the plot window or Object Manager and use the View | Zoom |
Zoom Realtime
The Zoom Realtime command zooms in and out as the left mouse button is held
down and the mouse is dragged up and down in the plot window.
To enter zoom realtime mode, select View | Zoom | Realtime, or click the
button. The cursor will change to a to indicate that you are in zoom realtime
mode. Hold down the left mouse button and then drag up or down in the window to
zoom in or out. As you drag the mouse up, the screen is zoomed in. As you drag the
mouse down, the screen is zoomed out.
649
Surfer
Actual Size
The View | Zoom | Actual Size command scales the drawing to the approximate size
it will be when printed. The size is usually scaled up slightly on the display to allow an
adequate size for displaying text.
Full Screen
Use the View | Zoom | Full Screen command, or click the button to scale the
selected object to fit the monitor. The command menus and toolbars are not
accessible when viewing at Full Screen.
Pan
The Pan command allows you to move your location in the plot window or grid node
editor, while retaining the current level of magnification.
Use the View | Pan command, or click the button to pan the current view in the
plot window or grid node editor.
650
Chapter 22 – Creating, Selecting, and Editing Objects
Hold down the wheel button straight down, and the cursor will turn to a closed hand.
When the cursor is a , drag the mouse to pan the plot window. Be sure to click
straight down with the scroll wheel.
Select the View | Redraw command, click the button, or press the F5 key on the
keyboard to redraw the window.
Auto Redraw is used to automatically redraw the image each time the window
contents or view is changed. Auto Redraw is on by default, and this is indicated by a
check mark beside the command. Click View | Auto Redraw to toggle the command
on and off. If Auto Redraw is disabled use Redraw or press the F5 key on the
keyboard to redraw the image.
Use the View | Rulers command, or click the button to toggle between showing
and hiding the rulers on the top and left sides of the main plot window. When the ruler
button is depressed, the rulers are shown. Surfer will remember your preference to
have the ruler on or off when the program restarts.
You can also right-click on a ruler and select Ruler and Grid Settings to open the
Options dialog.
Use the View | Drawing Grid command to toggle between showing and hiding a grid
which is superimposed over the plot window. A check mark beside the command
651
Surfer
indicates that the grid is displayed. Surfer will remember your preference to have the
drawing grid on or off when the program restarts.
The drawing grid is a series of evenly spaced dots, similar to graph paper, which is
used to help align objects in the plot window.
Alternatively, click the button, or right-click on the plot window and select
Drawing Grid to toggle the drawing grid on and off. You can also turn the display of
the grid on and off by choose Tools | Options and clicking on the Rulers and Grid
page.
Toolbars
All window types in Surfer include toolbars that contain buttons for many common
commands. The toolbars are initially docked, but they can be dragged and placed
anywhere on the screen.
If tool tips do not display, click View | Toolbars | Customize. Click on the Options
tab. Check the box next to Show ScreenTips on toolbars. Click OK.
Customize Toolbars
Use the View | Toolbars | Customize command to open the Customize dialog and
customize toolbars, menus, and keyboard shortcuts.
Toolbar positions
Surfer toolbars can be docked to any side of the window or they can be displayed as a
floating window. To dock the toolbar in a new location, click the "grip" bar along the
edge of the toolbar, hold the left mouse button, and then drag the toolbar to a new
652
Chapter 22 – Creating, Selecting, and Editing Objects
location. Drag the toolbar away from a window edge or hold down the CTRL key while
dragging to display the toolbar as a floating window.
Status Bar
Click on View | Status Bar to show or hide the status bar. A check mark next to
Status Bar indicates that the status bar is displayed.
Progress
The status bar indicates the progress of a procedure, such as gridding. The percent of
completion and time remaining will be displayed.
653
Surfer
When the program does not know how much time is required to complete a task, the
Indeterminate mode is displayed in the status bar. This indicates that the program is
actively completing the task, with an unknown time of completion. The program is not
frozen.
Cancel
Click the Cancel button on the status bar to abort the current process.
Object Manager
The Object Manager contains a hierarchical list of the objects in a Surfer plot
document displayed in a tree view. The objects can be selected, arranged, and edited
in both the Object Manager and through the plot document menu commands. Changes
made in the Object Manager are reflected in the plot document, and vice versa.
You can increase the plot document space by minimizing the Object Manager with
the Auto Hide feature. To hide the manager, click on the button in the upper right
corner of the Object Manager.
The manager hides on the left, top, or right side of the plot window as a small tab
labeled Object Manager.
To view the contents of the Object Manager while in tab view, place the cursor directly
over the tab. Click in the window to keep it open for use. Click outside the window to
654
Chapter 22 – Creating, Selecting, and Editing Objects
return it to the hidden position. Click on the button to return it to the normal
display mode. Alternatively, right-click the Object Manager title bar and select Auto
Hide. You can also drag the sides of a floating Object Manager to change the size of
the window.
655
Surfer
To change the display order of the map layer objects within a map frame with the
keyboard, select an object, hold down the CTRL key, and press the up and down arrow
keys to move one step at a time. Hold down the SHIFT key and press the up and down
arrow keys to move to the top and bottom of the same branch.
The map properties control the map's View, Scale, Limits, Frame, and Coordinate
System. Each map layer has specific properties that controls the options for the
specific map type. Each map axis also has properties.
656
Chapter 22 – Creating, Selecting, and Editing Objects
Selecting Objects
To select an item in the Object Manager, click on the
item or press the arrow keys, and the object text is
highlighted. The selection handles in the plot change to
indicate the selected item. If you select an object in the
plot window, its name is selected in the Object Manager
as well. Only one nested object can be selected at a time.
For example, it is not currently possible to select two axes Use the CTRL key to
at once. select multiple non-
contiguous objects in
the Object Manager.
Property Manager
The Property Manager allows you to edit the properties of an object, such as a
contour map or axis. The Property Manager contains a list of all properties for the
selected object. The Property Manager can be left open so that the properties of the
selected object are always visible.
657
Surfer
Changing Properties
The Property Manager displays the properties for selected objects. To change a
property, click on the property's value and select a new property from the pop up box,
scroll to a new number using the buttons, select a new value using the
slider, select a new value from the drop-down list or palette, or type a property value.
For example, a polyline has Style, Color, Opacity, Width, and End Styles properties.
Changing the Color requires clicking on the current color and selecting a new color
from the color palette. Changing the Width requires highlighting the current width and
typing a new number or scrolling to a new number. Changing the Opacity requires
highlighting the existing percentage and typing a new number or clicking on the slider
bar and dragging it to a new value.
You can modify more than one object at a time. Only shared properties are editable
when multiple objects are selected. For example, you can right-click on a polyline in
the Object Manager. Hold the CTRL key and click on a polygon. You can then change
the line properties of both objects at the same time. Fill properties, which are available
if only a polygon was selected, are not available as the polyline does not have fill
properties.
Occasionally, some properties are dependent on your other selections. For example,
there is a Pattern Offset section on the Fill page. This section is only available when
an image fill type is selected as the Pattern.
Keyboard Commands
When working with the Property Manager, the up and down arrow keys move up
and down in the Property Manager list. The TAB key activates the highlighted
property. The right arrow key expands collapsed sections, e.g., Filled Contours, and
the left arrow collapses the section.
Property Defaults
Use the Tools | Options command to change the default settings. Default settings for
rulers, drawing grid, line, fill, text, symbol, label format, and advanced settings that
control each map type can be set from the Options dialog.
658
Chapter 22 – Creating, Selecting, and Editing Objects
Reset Windows
Use the View | Reset Windows command to change the display of the program.
This command resets the Object Manager and Property Manager windows back to the
default size and position. It also resets all menu customizations and custom shortcuts
back to the defaults. In addition, all toolbars are reset to the default location and
state.
You must restart Surfer in order for this command to take effect. Click Yes in the
dialog, close the program, and reopen Surfer. The managers are now in the default
locations.
659
Surfer
660
Chapter 23
Options and Preferences
Introduction to Options
Surfer's default settings and advanced options are customized by selecting the Tools
| Options command. By adjusting the settings in the Options dialog, you can
customize Surfer to suit your individual preferences and work habits. The settings are
automatically saved and restored whenever Surfer is restarted. Changes made in the
Options dialog affect all subsequent documents.
General
General Set the basic window features such as file open/save paths,
significant digits, and undo levels.
Gridding Set basic gridding options.
Updates Allow Surfer to automatically check for updates.
Environment
User Interface Set the interface and tab style, help in the property
manager, and the startup splash screen.
Drawing Set antialiasing properties, page rectangle, margins,
selection controls, and page units.
Default Set line, fill, symbol, font, and label format default
Attributes attributes.
Rulers and Grid Control the display of the rulers and grid.
Advanced
Advanced Control the defaults for most menu commands.
661
Surfer
General Page
You can set defaults (i.e. open/save paths and undo levels) on the General page in
the Options dialog.
662
Chapter 23 – Options and Preferences
Undo Levels
Set the number of commands to undo in the Undo levels box. The maximum number
of Undo levels is 100. Once the maximum number of actions has been performed, the
oldest action is dropped off the list as new actions are added. Undo can consume
significant amounts of memory, so this option should probably be left between 3 and
10 if memory is at a premium. Set the undo levels to 0 to disable Undo completely.
Use the arrow buttons to adjust undo levels of zero to 20. Alternatively, enter a value
in the Undo levels box to adjust undo levels of zero to 100.
Recent Files
The Recent files option controls the number of recently used files listed near the
bottom of the File menu. This option can be set to a value between zero and 16.
663
Surfer
files. Alternatively, click the button to browse for a path. This option sets the
initial directory displayed in the File | Open and Save dialogs after starting Surfer.
664
Chapter 23 – Options and Preferences
Gridding Page
Use the Tools | Option command to open the Options dialog. Click on Gridding on
the left side to open the Gridding page.
The Options dialog Gridding page contains options to customize while gridding.
665
Surfer
Updates Page
Use the Tools | Option command to open the Options dialog. Click on Updates on
the left side of the dialog to open the Updates page.
Set automatic update preferences on the Updates page in the Options dialog.
666
Chapter 23 – Options and Preferences
667
Surfer
Drawing Page
Use the Tools | Option command to open the Options dialog. Click on the Drawing
option on the left side of the dialog to open the Drawing page. Set the selection,
redraw, page display, margin display, and page units on the Drawing page in the
Options dialog.
Antialiased Lines
Antialias lines allows redraw to diminish jagged edges and create a smooth
appearance for all lines in the plot window.
668
Chapter 23 – Options and Preferences
Antialiased Text
Antialias text allows redraw to diminish jagged edges and create a smooth appearance
for all text and symbols in the plot window.
Show Margins
Use the Show margins option to turn on or off the dashed line margin. Margins are set
through File | Page Setup.
Selection Group
Use the options in the Selection group to control how objects are selected in the plot
window.
669
Surfer
Handle Size
The Handle Size box controls the width and height of the selection handles that appear
around selected objects in pixels. The handle size setting range is from zero to 25
pixels. A setting of 25 will create large size selection handles. A setting of zero will
create no selection handles. The default setting is a handle size of six pixels. The
handle size scales with zoom.
Tolerance
The Tolerance box controls the distance between the pointer and the object when
clicking with the left mouse button to select an object. When the tolerance size is zero,
the pointer must be directly on the object to select it. The tolerance setting range is
from zero to 25 pixels. The tolerance size does not affect the size of the bounding box,
it only controls the distance the pointer can be from the object to select it. The default
tolerance setting is three pixels. The tolerance scales with zoom.
Page Units
Page Units are the units used to measure distances on the printed page. Set Page
Units to Inches or Centimeters. The location of the cursor on the page is listed in page
units in the status bar.
Use the Default Attributes to specify the default line, fill, symbol, and font attributes
used when creating new objects.
670
Chapter 23 – Options and Preferences
Line
Line properties are used to specify the default line style, color, and width. Some
examples of where this is used include axes, stand-alone lines, and the outer border of
rectangles, ellipses, and polygons. Click the Line button to open the Line Properties
dialog. Make and changes and click OK to make the default line changes.
Fill
Fill properties specify the fill pattern and color used for the interior of polygons,
rectangles, and ellipses. Click the Fill button to open the Fill Properties dialog. Make
and changes and click OK to make the default fill changes.
Symbol
Symbol properties include the symbol set, color, and size. These properties are used
for stand-alone symbols, post maps, and imported graphics that do not use a specific
symbol. Click the Symbol button to open the Symbol Properties dialog. Make and
changes and click OK to make the default symbol changes.
671
Surfer
Font
Font properties specify the default face, style, size, color, and text alignment. Some
examples of where this is used include stand-alone text, axis labels, post map labels,
and inline contour labels. Setting the Font defaults will apply changes to all text,
including text created in the Text Properties dialog.
Click the Font button to open the Font Properties dialog. Make and changes and click
OK to make the default font changes.
Label Format
Label format properties specify numeric display for labels. The label type, length,
prefix, and suffix may be set using this dialog. Click the Label Format button to open
the Label Format dialog. Make and changes and click OK to make the default numeric
label changes. Changes made to the Label Format are overridden by changes on the
Advanced page or by changes made in the dialogs.
Set ruler and grid properties on the Rulers and Grid page in the Options dialog. Rulers
appear along the top and left edge of the plot window, and are used to position and
align objects. Rulers use the current page units. To change the units, see the
Drawing page.
Snap to Ruler
Snap to ruler causes the cursor to snap to the ruler divisions as objects are drawn or
moved. This allows objects to be easily aligned with the ruler division marks.
Show Position
Show position indicates the current cursor position as gray lines on the rulers. As the
cursor is moved, the position indicator moves within the rulers to show the exact page
position of the cursor.
672
Chapter 23 – Options and Preferences
Advanced Page
Use the Tools | Option command to open the Options dialog. Click on the Advanced
option on the left side of the dialog to open the Advanced page.
The Advanced page in the Options dialog controls most of the default settings used in
Surfer’s commands. These settings are saved in a .SET setting file, and are reloaded
673
Surfer
whenever Surfer is started. Using the hierarchical list on the Advanced page, you can
customize each default setting independently. This is an advanced feature, and the
settings should not be changed indiscriminately.
674
Chapter 23 – Options and Preferences
Setting Value
Enter the new value of the default setting in the Setting value control. This control
changes depending on the type of setting highlighted in the Settings (organized by
dialog) list. Numeric values are entered into a box. Settings with a discrete number of
choices are displayed in a drop-down list. The values entered in this control are not
checked for errors, so be sure to specify an appropriate value for the highlighted
setting.
Internal Default
All settings have a value called Internal Default. This is a special value which indicates
that Surfer should use whatever it thinks is best for the current setting. If the Setting
control is an edit box, you can specify the Internal Default value by deleting the
contents of the box so it is empty.
Several default settings require the value to be specified in a particular format. The
type of format required is determined from the comments at the bottom of the
Advanced page. See the Formats for Attribute Values topic for a list of these special
values.
Setting Persistence
The Setting persistence option specifies how the setting are updated when the user
changes the setting during normal operation. The options are:
Always Reset Do not update the default setting when it is changed in a dialog.
Every time the dialog is invoked, the setting is reset to the value
in the setting file.
Current This option saves changes made to the setting within the dialog
Session Only during the current session only. The settings are not written to
675
Surfer
the setting file and are not used the next time Surfer is started.
All Sessions This option saves the changes made to the setting within the
dialog during the current session, and writes the changes to the
setting file to be used the next time Surfer is started.
Customize
You can customize Surfer toolbars, menus, and keyboard shortcuts through Tools |
Customize, View | Toolbars | Customize, or right-click on a toolbar and select
Customize from the context menu.
• Use the Commands page to add buttons to the toolbars.
• Use the Toolbars page to control the toolbar display and reset the toolbars to the
original configurations.
• Use the Keyboard page to control the keyboard shortcuts.
• Use the Menu page to control the menu display.
• Use the Options page to
control the screen tip and
icon display.
Customize Commands
You can use the Commands page
in the Customize dialog to add
buttons to toolbars and
commands to menus. The
Customize dialog is opened
through Tools | Customize,
View | Toolbars | Customize,
or by right-clicking on the
toolbars and selecting
Customize.
676
Chapter 23 – Options and Preferences
Categories
The Commands page lists menu titles (File, Edit, etc.) in the Categories list. You can
also show all commands in the program by selecting All Commands.
Description
When a command is selected, an explanation of the command appears in the
Description box.
Commands
When a category is selected, the Commands list is updated to display the commands
within the category.
Other Customization
To further customize the toolbars and menus, refer to the other page topics listed
below or refer to the Additional Customization section.
677
Surfer
Customize Toolbars
You can use the Toolbars
page in the Customize
dialog to control the toolbar
display. The Customize
dialog is opened through
Tools | Customize, View |
Toolbars | Customize, or
by right-clicking on the
toolbars and selecting
Customize.
Toolbar Display
The Toolbars list displays all
the toolbars. A check mark
indicates the toolbar is
visible. Uncheck the box to Use the Toolbars page in the Customize dialog
hide a toolbar. The Menu to customize the toolbar display
Bar cannot be hidden.
Resetting a Toolbar
If you would like to reset the changes to a toolbar, click on the toolbar name and
select the Reset button to reset the toolbar to the defaults.
678
Chapter 23 – Options and Preferences
Renaming Toolbars
To rename a toolbar, click on the existing toolbar name and then click the Rename
button. Enter a new name into the Toolbar Name dialog. Only custom toolbars
created with the New button can be renamed.
Deleting Toolbars
To delete a toolbar, click on the existing toolbar name and then click the Delete
button. In the warning message, click Yes to delete the custom toolbar. Click No to
keep the custom toolbar. Only custom toolbars created with the New button can be
deleted.
Customize Keyboard
You can use the Keyboard page
in the Customize dialog to
assign keyboard shortcuts to
commands. The Customize dialog
is opened through Tools |
Customize, View | Toolbars |
Customize, or by right-clicking
on the toolbars and selecting
Customize.
679
Surfer
Removing Shortcuts
To remove a shortcut, click on the shortcut in the Current Keys list and then click the
Remove button.
Resetting Shortcuts
To reset all shortcuts to the defaults, click the Reset All button.
Keyboard Map
Use the Help | Keyboard Map command to view and print a list of all commands,
keyboard shortcuts, and command descriptions.
Customize Menu
You can use the Menu page in the Customize dialog to control the menu display. The
Customize dialog is opened through Tools | Customize, View | Toolbars |
Customize, or by right-clicking on the toolbars and selecting Customize.
680
Chapter 23 – Options and Preferences
Menu Animations
When clicking on a menu,
you can choose to have the
menu Unfold, Slide, or Fade.
Select None if you do not
want any menu animation.
Select Default to return to
the default animation.
Menu Shadows
Check the Menu shadows box
to display a drop shadow
around open menus.
Context Menus
Context menus are the
menus displayed when right-
clicking in the window. You Use the Menu page in the Customize
can customize these menus dialog to customize the menu display.
in Surfer. Select a menu
from the Select context menu drop-down list. Add or remove items from the selected
menu. Click the Reset button to restore the default context menus.
681
Surfer
Customize Options
You can use the Options
page in the Customize dialog
to control the screen tip and
icon display. The Customize
dialog is opened through
Tools | Customize, View |
Toolbars | Customize, or
by right-clicking on the
toolbars and selecting
Customize.
Screen Tips
Check the Show ScreenTips
on toolbars option to show
what a button does when
you place the cursor over Use the Options page in the Customize
the button. To display dialog to customize toolbar options.
shortcut keys in the screen
tip, check the box next to Show shortcut keys in ScreenTips.
Large Icons
Check the Large Icons box to display large toolbar icons.
Look 2000
Check the Look 2000 box to display the plot window in a Windows 2000 scheme.
Additional Customization
When the Customize dialog is open, you can right-click on an existing toolbar button
or menu to set various options. Right-click on an actual toolbar or menu item to see
these commands, not in the Customize dialog.
• Select Reset to Default to set the toolbar button or menu item to the default.
682
Chapter 23 – Options and Preferences
• Select Copy Button Image to copy the button or menu item graphic. This
command is disabled if the menu item does not contain a graphic.
• Select Delete to remove a menu command or toolbar button.
• Select Button Appearance to set the button text and graphic display.
• There are three settings for graphic and text appearance: Image, Text, and
Image and Text. To display the graphic only, click Image. To display text only,
click Text. To display both the graphic and text, click Image and Text. Some of
these display options may be disabled, depending on the selected menu command
or button.
• Select Start Group to add a selection dividing line to the left of horizontal toolbars
and menu titles or above vertical toolbars and menu commands. Click the
command a second time to switch off the section divider.
When the Customize dialog is open, you can rearrange the menus, menu commands,
and toolbar buttons. To move a menu, menu command, or toolbar button, click on the
menu name, menu command, or toolbar button and then drag it to a new location.
683
Surfer
Text Only
Select Text only if you would like the button appearance to only display a text
description.
Button Text
Specify the text description in the Button Text area.
Edit
Click the Edit button to open the Edit
Button Image dialog.
Picture
Change the color of the pixels in the Picture
area to create a new image or edit a current
image.
Preview
The image created in the Picture area is
displayed at full size in the Preview area.
This is a preview of what the image will look
like when used in the program.
Create new or edit current button images
in the Edit Button Image dialog.
684
Chapter 23 – Options and Preferences
Colors
Use the Colors area to specify a color to change the pixels of the Picture area and
create or edit a button image.
Tools
Choose from one of the preset Tools to help create or edit a button image. The tools
available include:Pencil, Fill, Select Color, Line, Rectangle, Ellipse, Copy, Paste, and
Clear.
The following list provides a summarized version before delving into the details of
different syntaxes.
• Colors: Colors are specified by name as they appear in the dialog color palettes,
by Rxxx Gyyy Bzzz values, or by Rxxx Gyyy Bzzz Aaaa values. For detailed syntax
information and an example, see color property syntax.
• Line Properties: Lines are specified by the line color, name, and width. For detailed
syntax information and an example, see line property syntax.
• Fill Properties: Fills are specified by color, pattern, and additional options. For
detailed syntax information and an example, see fill property syntax.
• Font Properties: Fonts are specified by font name, size, color, and style. For
detailed syntax information and an example, see font property syntax.
• Symbol Properties: Symbols are specified by symbol number, symbol set, color,
size, and opacity. For detailed syntax information and an example, see symbol
property syntax.
• Numeric Label Properties: The numeric label is specified by prefix, suffix, font
properties, and numeric properties. For detailed syntax information and an
example, see numeric label property syntax.
Color Syntax
Colors are specified by name as they appear in the color palettes. The names must be
enclosed in double quotes. For example, "Ocean Green."
685
Surfer
or
where xxx, yyy, and zzz specify a red, green, and blue color component and aaa
specifies the opacityv value, respectively. Each component can range from 0 to 255.
Example
"R0 G0 B0" All components are 0, resulting in black
"R0 G255 B0" Pure green
"R255 G255 B255" All components are at full intensity, resulting in bright
white.
"R255 G255 B255 A45" All components are at full intensity, resulting in bright
white. Opacity is set to 18%.
Parameter Description
Color The line color name. See Color List for details.
Style The style of the line as it appears in the dialog line style
palette. The name must be enclosed in double quotes.
Width The width of the line in thousandths of an inch (mils). This
should not be enclosed in quotes.
Example
"R0 G255 B50" ".1 in. Dash" 10
686
Chapter 23 – Options and Preferences
Parameter Description
version Defines the version of the fill property. Must be 1.
fgColor The RGBA color value for the foreground color.
bgColor The background color name.
Pattern The fill pattern name as it appears in the dialog fill pattern
palette. The name must be enclosed in double quotes.
offset The offset value has an X and Y component. The offset controls
the location of the image pattern within the geometry.
scale The scale value has an X and Y component. The scale controls
the density of the image pattern.
angle The angle value determines the rotation of the pattern. This
should always be 0.
coverage The coverage value determines whether an image is stretched
or tiled. 0 = tiled, 1 = stretched.
Example
This example shows a fill property with the following options:
version = 1
fgColor = "R0 G0 B255 A99" indicating a slightly transparent blue
bgColor = "R0 G0 B255 A255" indicating a slightly transparent red
Pattern = "Gneiss 1", an image of a cut gneiss
Offset = 1 and 10, indicating 1 in the X direction and 10 in the Y direction
Scale = 0.9 and 0.8, indicating 0.9 in the X direction and 0.8 in the Y direction
Angle = 0
Coverage = 1, indicating that the pattern is to be stretched.
"1 "R0 G0 B255 A99" "R255 G0 B0 A38" "Gneiss 1" 1 10 0.9 0.8 0 1"
687
Surfer
Parameter Description
FaceName The font face name as it appears in the Text Properties dialog.
The name must be enclosed in double quotes.
Color The font color name.
Style Add the following values to get the style you want:
None = 0
Bold = 16
Italics = 32
Strikethrough = 64
Underline = 128
The style is entered as a number, and is not enclosed in double
quotes.
Size The size of the text in points. This is entered as a number and is not
enclosed in double quotes.
Example
"Calibri" "Black" 0 6
Parameter Description
SymSet SymSet is the symbol set or face name as it appears in the
Symbol Properties. The name must be enclosed in double quotes.
Fill Color Fill color is the RGBA color for the interior of the symbol.
Line Color Line color is the RGBA color for the line around the symbol.
Bit Flags Bit flags is no longer used and is only included for backward
688
Chapter 23 – Options and Preferences
Example
This example shows a symbol with the following properties:
SymSet = "GSI Default Symbols"
Fill Color = "R255 G0 B0 A50" indicating a slightly transparent red
Line Color = "R0 G0 B255 A255" indicating a fully opaque blue
Bit Flags = 0
Index = 10
Size = 0.5 inches (or centimeters)
Parameter Description
Type Type is the numeric format. This is entered as a number, and is
not enclosed in double quotes.
0 = Fixed
1 = Exponential
2 = Compact
689
Surfer
Digits Digits refers to the number of decimal digits after the decimal
place in the label. This value can range from 0 to 15. This is
entered as a number, and is not enclosed in double quotes.
Style Label style is entered as a number, and is not enclosed in
double quotes.
0 = None (no styles)
1 = Thousands (separate thousands with a comma)
2 = Absolute Value (show numbers as absolute values)
3 = Thousands and Absolute Value (use thousands and
absolute values)
Prefix The Prefix text is text that appears at the beginning of every
label. This must be enclosed in double quotes.
Suffix The Suffix text is text that appears at the end of every label.
This must be enclosed in double quotes.
Example
0 8 0 "Pre" "Post"
6. Click the button next to the Current Setting File. Select the new .SET file and
click Open.
7. Modify the setting you wish to change.
8. Save the changes to the file by clicking OK in the Options dialog.
690
Chapter 23 – Options and Preferences
clicking on the Advanced link on the left side of the dialog. Click the button next
to the Current Setting File field to select a different .SET file.
Alternatively, to use a different setting file with Surfer, start Surfer with the /SET
switch on the command line. To do this, click the Windows Start button and select
Run. Then, enter the following information:
To make this entire process easier, you can create a new shortcut on the desktop and
specify the /SET switch in the Target: field of the shortcut properties dialog. See your
Windows documentation for details on how to create shortcuts. To create a new
shortcut:
1. Right-click on the Windows Desktop and choose New | Shortcut.
2. Type in the "Path to Surfer.exe" /SET "Path to new .SET file" in the box.
3. Click Next.
4. Type a name for the shortcut, such as Surfer.exe SET name.
5. Click Finish and the icon is created.
Be sure you copy the [.SET] file in the correct place for it to be used:
691
Surfer
692
Chapter 24
Automating Surfer
Introduction to Scripter
Golden Software ScripterTM is a program for developing and running scripts. Surfer
operations can be controlled automatically by scripts. A script is a text file containing a
series of instructions carried out by a script interpreter program when the script is run.
Instructions are written in a Visual BASIC-like programming language.
You can do practically everything with a script that you can do manually with the
mouse or from your keyboard. Scripts are useful for automating repetitive tasks,
consolidating a complicated sequence of steps, or acting as a "front end" to help
novice users access Surfer's capabilities without having to become familiar with Surfer.
In addition, scripts can integrate the features of several programs. For example, you
could, with a single script, open a data file in Microsoft Excel, transfer the data to
Surfer, create a map, and copy the map to Microsoft Word.
Scripter offers many features to help you write, edit, and debug scripts. Its features
include language syntax coloring, a drop-down list of the procedures defined in the
script, an object browser for examining procedures available in external objects, a
visual dialog editor, break points, single-step execution (including options to step over
and to step out of procedures), a watch window for displaying the values of script
variables, and others. The Surfer Automation object model is displayed with the Surfer
Object Hierarchy tree.
As an example, suppose you are monitoring groundwater levels in an area. Each week
you collect XYZ data, create a contour map from this data, print the map, and save it
in a Surfer file .SRF. The example scripts provide examples that automate these
tasks. The sample script asks for the XYZ data file, creates a grid file, produces a
contour map, prints the map, and saves it in a file. A person using the "front-end"
script would not have to know anything about Surfer in order to create a contour map
from the raw water level data.
Golden Software recommends that Vista and Windows 7 users run the program as
administrator for best results.
693
Surfer
Scripter will open whichever version of Surfer was opened last. For example, if you
want to run a script in Surfer 9, open Surfer 9, close it, then run the script and it will
use Surfer 9. If you want to run a script in Surfer 10, open Surfer 10, close it, run the
script and it will use Surfer 10.
Scripter Windows
When Scripter is first started, you are presented with a text editor window containing
the lines Sub Main, followed by a blank line, and then End Sub. This is the code editor
window where you type script instructions and where the contents of script files are
displayed.
694
Chapter 24 – Automating Surfer
The code window acts as a text editor, similar to the Windows Notepad program, with
a few enhancements to facilitate script writing:
• After you press the ENTER key, tabs or spaces are automatically inserted at the
beginning of the next line to maintain the same indentation level as the previous
line.
• Key words and symbols of the BASIC language are displayed in different colors.
You can use the View | Colors command to modify the colors used to display the
various elements of the programming language.
• A light horizontal divider line is automatically drawn between sections of your
script. The divider lines help you to locate the start of subroutine and function
definitions.
• Above the code editor window is a bar containing the Object and Proc (procedure)
lists. Selecting items from these lists moves the various sections of your script file
into view. The object and procedure lists are useful when your script file becomes
large.
Above the object and procedure lists, you may see a blank window area with a tab on
top that reads Immediate. If this window is not visible, select the View | Always
Split command to make it appear. The immediate window is used to execute one-line
instructions immediately. When you type an instruction into this window and press the
ENTER key, Scripter carries out the instruction.
In addition to being a scratch area for evaluating language statements, the immediate
window shows debugging information. The output from the Debug.Print statement and
the value of variables selected with the Debug | Quick Watch command are printed
in the immediate window. While a script program is running, Watch, Stack, and
Loaded tabs are added at the top of the immediate window area. Click these tabs for
information that may be useful for debugging. See Debugging Scripts for more
information on the immediate, watch, stack, and loaded windows.
Along the left edge of the code window are code sheet tabs. When you select either
the File | New command or the File | Open command, Scripter creates a new code
sheet and inserts a new sheet tab. Each tab corresponds to one of the code sheets.
Clicking once on a tab makes that sheet the current sheet. Double-clicking a tab closes
the sheet.
Between the sheet tabs and the code window is an area called the "break bar." When
a script is paused, a yellow arrow in the break bar shows which line is next to execute.
The break bar also shows which lines have break points. Set a break point by clicking
on the break bar. A red dot appears in the break bar, and the adjacent line in the code
window is highlighted. When a line marked as a break point is about to be executed,
695
Surfer
Scripter pauses program execution. To clear a break point, click on the red dot in the
break bar. See Debugging Scripts for more information on break points.
A status bar along the bottom of the Scripter window shows information about the
current state of the program. The View | Status Bar command hides or reveals the
status bar. Before running a script, make sure that the status bar is visible because
messages about typographical and syntax errors are displayed in the status bar.
New Modules
To create a custom ActiveX object, select File | New Module, and choose either
Object Module or Class Module (choosing Code Module is the same as the File |
New command).
Saving Scripts
Once a script is complete, save the script by using the File | Save or File | Save As
commands. If a script has not been changed since the last save, the Save command is
grayed out.
Closing Scripts
To close the active script, use File | Close, use Sheet | Close, or double-click the
sheet tab of the sheet. Close all open scripts with Sheet | Close All.
696
Chapter 24 – Automating Surfer
Conversely, some features of the Scripter BASIC language are not supported by VBA.
Do not use the following features if you want to transfer your scripts from Scripter
into VBA:
697
Surfer
Using Scripter
Tasks can be automated in Surfer using Golden Software's Scripter program or any
ActiveX Automation-compatible client, such as Visual BASIC. A script is a text file
containing a series of instructions for execution when the script is run. Scripter can
be used to perform almost any task in Surfer. You can do practically everything with a
script that you can do manually with the mouse or from your keyboard. Scripts are
useful for automating repetitive tasks and consolidating a sequence of steps. Scripter
is installed in the same location as Surfer. Refer to the Surfer Automation help book
for more information about Scripter. We have included several example scripts so
that you can quickly see some of Scripter's capabilities.
The online help, shown when you select the Help | BASIC Language Help command
(or press SHIFT + F1), explains all of the BASIC language statements and functions.
Each help topic describes the purpose of a statement, and shows the syntax (the order
of keywords and other symbols) to use when writing an instruction. The syntax
examples in the online help use a shorthand method to explain the possible variations
in usage:
Sub, End, True Words with the initial letter capitalized idicate language-specific
keywords.
698
Chapter 24 – Automating Surfer
Writing Scripts
To create a script, you must type the script text into the Scripter code window, or
edit an existing script. When you want to create a new script that is specific for your
circumstances, you will most likely start with an empty Scripter window and type the
entire script. If you want to perform a routine task such as creating a grid file or a
contour map, you can probably open an existing script file and edit the file to meet
you specific needs. Surfer comes with several sample scripts that you can modify as
desired.
Consider a script that creates a grid file from an XYZ data file, and then creates a
contour map from the grid file:
Sub Main
' Create a programmable object to represent the Surfer program
Set SurferApp = CreateObject("Surfer.Application")
699
Surfer
When you execute the script, Surfer is automatically started and a plot window is
displayed. The grid file is created (the progress of the operation is indicated on the
Surfer status bar), and the contour map is drawn in the plot window. When the script
execution is complete, you are returned to the Scripter window. The Surfer window
remains open, although the Scripter window is the active window.
Writing comments in your scripts to explain how they work can save you time and
frustration when you later need to modify the script. The apostrophe character (')
signals the start of a comment.
Harris, Matthew (1997), Teach Yourself Visual BASIC 5 for Applications in 21 Days,
Third Edition, SAMS Publishing, Indianapolis, IN, 1248 pp.
Lomax, Paul (1998), VB and VBA in a Nutshell: The Languages, O'Reilly & Associates,
Inc., Sebastapol, CA, 633 pp.
Wang, Wallace (1998), Visual BASIC 6.0 for Windows for Dummies, IDG Books
Worldwide, Foster City, CA, 477 pp.
700
Chapter 24 – Automating Surfer
Scripts are text files that contain a sequence of instructions to be carried out by the
Scripter program. Each instruction specifies a task such as defining a variable or
displaying a message on the screen. When the Scripter program processes the script,
the instructions are carried out one at a time, from top to bottom.
Execution of a script begins with the first statement of the subroutine called Main. All
scripts must therefore include the Sub Main and End Sub statements. Execution
proceeds line-by-line until the end of the Main procedure, until an End statement is
executed, or until an error occurs.
Program Statements
Statements are individual instructions to Scripter that carry out a specific operation.
Statements are case insensitive and are typically written one to a line. To enter two or
more statements on the same line, separate the statements with colons. For example:
a = 5 : b = 5 * a
Scripter BASIC requires flow control statements (IF, WHILE, DO, etc.) and declaration
statements (DIM, PUBLIC, TYPE, SUB, etc) to be placed on a line by themselves.
Line Continuation
To break a line into two lines in Scripter, use a space followed by an underscore " _".
You must include the space for the continuation to work properly in the script. A
backslash continuation " \ " from earlier versions of Scripter is not supported.
Comments are not allowed after the continuation character.
Example
SurferApp.GridData("C:\Program Files\Golden
Software\Surfer\Samples\Demogrid.dat", _
ExclusionFilter:="x<4", xMin:=4, Algorithm:=srfKriging, DupMethod:=
srfDupFirst)
701
Surfer
Comments
Writing comments in your scripts to explain how they work can save you time and
frustration when you later need to modify the script. The apostrophe character ( ' )
signals the start of a comment. Scripter ignores all text following the apostrophe up
to the end of the line. Comments can be placed on their own line, or they may be
placed at the end of a line. For example:
In addition, you can use the REM statement to add a remark in the script. However,
REM statements can only be used at the beginning of a line.
Operators
Operators are symbols that direct a script to perform basic calculations, such as
addition, exponentiation, string concatenation, number comparison, and others. The
language supports several arithmetic, comparison, and logical operators. In Scripter,
select Help | BASIC Language Help command and search for "Operators" to see a
complete list.
Flow Control
When you run a script, execution starts with the Sub Main statement and continues
line-by-line until the End Sub statement at the end of the main procedure or until an
End statement is encountered. Several flow control statements allow you to change
this line-by-line progression according to conditions encountered by your script. The
Scripter BASIC language includes a variety of looping and branching statements that
is typical for modern programming languages. The flow control statements include the
following (see the online BASIC language help for details on the syntax of these
statements):
702
Chapter 24 – Automating Surfer
IF...END IF
IF...END IF executes a statement only if a condition is true.
IF...ELSE...END IF
The alternate of IF...END IF form executes one statement if a condition is true and a
different statement if the condition is false.
DO...LOOP
DO...LOOP is the basic looping statement. This statement loops either while a
condition is true or until a condition becomes true and tests the condition either at the
top of the loop or at the bottom of the loop.
This and all other loop structures may be stopped before the test condition has been
met by placing an Exit statement in the body of the loop.
WHILE...WEND
WHILE...WEND loops while a condition is true and tests the condition at the top of the
loop.
FOR...NEXT
FOR...NEXT loops a number of times and increments (or decrements) an index
variable each time through the loop.
FOR EACH...NEXT
FOR EACH...NEXT iterates through all the elements in a collection object. Several
Surfer automation objects are collection objects. The For...Each statement is a
convenient way to process each element of a collection.
703
Surfer
For example, the following code fragment closes all the documents in the Surfer
Documents collection object:
'Assume that several documents are already open and that "SurferApp"
' is the name of a variable which refers to the Surfer Application object
Dim documents, doc As Object
Set documents = SurferApp.Documents
For Each doc In documents
doc.Close
Next
Since the arguments are optional, you can skip all or some of them when calling the
procedure. To print three copies at fifty-percent scale, for example, you would supply
just the NumCopies, and Scale argument values. These arguments must be listed in
the correct position, separated by commas, as shown below:
Although only two of the seven argument values are supplied in this example, the
appropriate number of commas must be used to mark the positions of the missing
arguments. Since inserting the right number of commas can be troublesome, you can
supply the arguments by name rather than by position. Named arguments are
704
Chapter 24 – Automating Surfer
specified by the argument name followed by a colon and an equal sign (":="), followed
by the argument value:
Named arguments may be listed in any order without regard to the order they appear
in the procedure's definition.
When you call a procedure, the instructions in the procedure are executed. When the
procedure finishes its task, it returns control to the instruction that called the
procedure. The Scripter BASIC language distinguishes two types of procedures:
functions and subroutines. Functions return a value, whereas subroutines do not.
Subroutines and functions may accept one or more values, called arguments.
Arguments are passed to a procedure by listing them after the procedure name. If
there is more than one argument, the arguments must be separated by commas. For
example:
Cos, Left, and Wait are procedures built-in to the BASIC language. Cos and Left are
functions which return values to the aller. Wait is a subroutine, and, by definition, it
does not return a value. The Wait subroutine waits for the number of seconds specified
by its argument (5 seconds in this example) before returning control to the calling
location.
705
Surfer
Writing Subroutines
To define subroutines within a script, use the Sub statement. Subroutine and function
definitions cannot be nested within other procedures. That is, the Sub statement must
appear after the End Sub statement of any preceding subroutine definitions. The
syntax for a subroutine definition is:
Where name represents the name you want to give the subroutine, arguments
represents a list of arguments names and types, and statements represents the
instructions that comprise the body of the subroutine. There is no limit to the number
of instructions you can include between the Sub and the End Sub lines. Consider the
definition of a Main procedure and another subroutine:
Sub Main
MultipleBeep 25 ' call the MultipleBeep subroutine
End Sub
Each time the MultipleBeep procedure is called, the instructions between its Sub and
End Sub statements are executed.
If the subroutine accepts arguments, the arguments are defined following the
subroutine name using a format similar to the Dim statement. The argument definition
706
Chapter 24 – Automating Surfer
Writing Functions
Functions are defined using the Function statement much the same as subroutines are
defined with the Sub statement. Like subroutines, function definitions cannot be
nested within other procedures. Unlike subrouties, functions can return a value to the
calling procedure. The syntax of a function definition is:
Where name is the function name you want to use, arguments is a list of arguments
names and types, type is the type of the value returned by the function, and
statements represents the instructions in the body of the function. To return a value
from a function, assign a value to a variable with the same name as the function itself.
For example:
You define the list of arguments accepted by a function the same way as you define
the arguments accepted by subroutines.
If you are not already familiar with the Visual BASIC for Applications programming
language, it will be worth your time to review the list of available subroutines. This list
is found by selecting Help | BASIC Language Help in Scripter.
707
Surfer
Every object has properties and methods associated with it. Properties are values
describing the state of an object. Methods are actions an object can perform. Access
properties and methods by typing the name of an object variable, followed by a
period, followed by the property or method name.
You can use object properties as you would use variables: assign values to properties,
branch based on the value of a property, or use the value of a property in calculations.
You call an object’s methods as you would call subroutines and functions. Use the
return values from methods the same as you would use return values from functions.
When you "drill through" the object hierarchy, you can store references to
intermediate objects in variables, or you can string together long sequences of object
references. For example, you can set the default font for a plot document in a single
line:
Alternatively, you can store each intermediate object in variables as you traverse the
object hierarchy:
The second form - storing intermediate objects - is more efficient if you are
performing several actions with the same object. A third alternative is to use the
WITH…END WITH statement:
708
Chapter 24 – Automating Surfer
A script can call subroutines and functions defined in other modules. In addition to
procedures, global variables, type definitions, and enumeration definitions may be
shared among modules. Just as procedures make long scripts easier to manage and
debug, modules make large script projects easier to manage.
Module Types
The File | New Module command in Scripter adds new code sheets to the
workspace. Each sheet is stored in a separate file. When routines in one code sheet
are used by other sheets, the code sheets are called modules. Scripter supports three
types of modules:
• Code modules are used for stand-alone scripts and for storing
libraries of useful procedures that can be called from other modules. The scripts
described in this chapter are code modules, which contain a Main subroutine. Code
modules without a Main subroutine cannot be run, but the routines contained in
them can be shared by other scripts. Code modules are stored in files with a
[.BAS] extension.
• Class modules are used to define objects that you can use
in other modules. A class module defines the properties and methods that the
object supports. Other modules access the object's properties and methods using
the same syntax that is used to access Surfer automation objects. Unlike Surfer
objects, new instances of the object defined in a class module are created using
the NEW keyword. Class modules are stored in files with a [.CLS] extension.
• Object modules are identical to class
modules, except that when a script uses the object defined in an object module,
one instance of the object is automatically created. Additional instances of an
object defined in an object module can be created with the NEW keyword. Object
modules are stored in files with an [.OBM] extension.
709
Surfer
'#Uses "c:\utils.bas"
'#Uses "test.cls"
Sub Main
' use the procedures and object defined in UTILS.BAS and TEST.CLS
End Sub
Scripter does not permit cyclic '#Uses statements. That is, if module A uses module
B, module B cannot use procedures from module A.
In contrast to procedures, the global variables defined at the top of one module are
not available to other modules unless they are declared using a Public
statement. When used for variable declarations, the Public statement has the same
syntax as the Dim statement:
The names of all definitions, even private ones, are visible in other modules. To avoid
errors due to name conflicts you must avoid using the same procedure, type, and
variable names in more than one module. A common technique for avoiding name
conflicts is to append a prefix to the names of global variables and procedures. For
example, if you write a module of text-processing functions, you might prefix each
function name with txt (e.g., txtFunction1).
710
Chapter 24 – Automating Surfer
Module Properties
To set the name by which other
modules refer to an object defined
in a class or object module, select
the Edit |
Properties command. The Edit
Class Module Properties dialog
appears. Type the name that you
want other scripts to use when
referring to the object defined in the
module. The instancing options
When working with an object module or
control how other applications
class module, open the Edit Object
access the object defined in the
Module Properties or Edit Class
module, but these options are not Module Properties dialog with Edit |
relevant to scripts executed within Properties.
Scripter. Code modules do not
have module properties.
When an object module is used in a script, one instance of the object defined in the
module is automatically created. The name of the object that is automatically created
is the name specified in the Edit Object Module Properties dialog.
Two special subroutines are called when an object is first created and just before it is
finally destroyed. In a class module, these subroutines are called "Class_Initialize" and
"Class_Terminate." In an object module, these subroutines are called
"Object_Initialize" and "Object_Terminate." These subroutines do not take any
arguments.
711
Surfer
' Declare a private global variable for storing the property called
"Radius"
Dim cirRadius As Double
' Define the "property get" function to retrieve the Radius property
Property Get Radius() As Double
Radius = cirRadius
End Property
' Define the "property let" procedure to change the Radius value
Property Let Radius(val As Double)
cirRadius = val
End Property
Sub Draw
' Method performs some action here
End Sub
Scripts that use the class module would access the object as follows (assuming the
module is stored in the file CIRCLE.CLS and that the object name entered in the Edit
Object Module Properties dialog is MyCircleObject)
'#Uses "circle.cls"
Sub Main
Dim x As New MyCircleObject
x.Radius = 7 ' sets the value of the Radius property
x.Draw ' calls the Draw method
Debug.Print x.Radius ' prints 7 in the immediate window
End Sub
712
Chapter 24 – Automating Surfer
Choose the Debug | Browse command to open the ActiveX Automation Members
dialog. This dialog provides the following options:
Library
The Library list shows object libraries available for use in the current script. These are
the same libraries checked in the References dialog. See the Type Library References
for information about adding type library references in your script.
Data Type
The Data Type list shows objects available in the type library selected from the Library
list.
713
Surfer
Methods/Properties
The Methods/Properties list shows methods and properties available from the object
selected in the Data Type list.
714
Chapter 24 – Automating Surfer
Follow Result
If a method or property returns a reference to another object in the type library, the
Result label is replaced by a button labeled Follow Value. Click the Follow Value button
to see the definition of the object returned by the method or property. After clicking
the Follow Value button, the Back button is enabled. Click the Back button to return to
the definition you were previously viewing.
Help String
The Help String group shows a short description of the item selected in the
Methods/Properties list. Click the ? button to view the help file associated with the
type library. Not all type libraries have help files available.
Close
Click the Close button to dismiss the object browser dialog.
Variables
In Scripter, a variable is a symbolic name for a value. A variable name starts with a
letter and may contain digits. Variable names cannot be the same as a reserved word.
Because the Scripter code window displays variable names in black and reserved
words in color, you can see when you have selected a variable name that conflicts with
a reserved word.
Variables may be one of several types. The type of a variable determines what kind of
data it may contain. See the following table for the possible variable types. In addition
to the built-in data types, the Scripter language supports user-defined compound
data types, user-defined enumeration types, and user-defined objects (defined in
object modules and class modules).
The type of a variable is declared in a DIM statement. The syntax of a DIM statement
is:
715
Surfer
where varname is the name of the variable being declared and type is the variable's
data type. Variables not declared in a DIM statement are a variant type, unless the
variable name ends with one of the type-definition characters. If a variable name ends
with one of the special type-definition characters, listed below, its type is recognized
based on this character.
Using the DIM statement to declare the variable type is optional. Variables can be
used without first being declared in a DIM statement, but this practice is not
recommended for any script longer than a few dozen lines. To enforce this policy, an
OPTION EXPLICIT statement should be placed at the top of long scripts. The OPTION
EXPLICIT statement makes it an error to use any variable without first declaring it.
Using this option lets you find typographical errors in variable names before a script is
run. Without this option, typographical errors in variable names are usually detected
only when the script fails to produce the expected results.
Object Variables
In Scripter, object variables contain references to ActiveX objects. Creating the
program Application object is an example of declaring an object variable:
716
Chapter 24 – Automating Surfer
In this example, a DIM statement declares that the variable named SurferApp holds a
reference to an object. The built-in CreateObject function returns a reference to a
Surfer Application object, and the SET statement assigns this object reference to the
SurferApp variable. Unlike variables of other types, which can be assigned new values
simply with an equal sign ( = ), object variables must be assigned values with a SET
statement.
Array Variables
Array variables store a list or table of values. A single variable name refers to the
entire collection, and individual values are distinguished by their numeric indices (their
"subscripts"). The maximum number of values that can be stored in an array must be
defined by a DIM statement. The elements of an array are accessed by using the
variable name followed by a left parenthesis, the index of an array element, and a
right parenthesis.
Array subscripts begin with zero, unless an Option Base statement is used at the start
of a script. Notice that in the previous example an array whose maximum subscript
value is 11 actually has room for twelve elements because the subscripts start with
zero.
The Dim statement can reserve only a constant number of elements for an array. If
the maximum number of elements cannot be known in advance, a dynamic array may
be used. A dynamic array is an array whose number of elements can be changed while
a script is running. The Redim statement changes the maximum number of values that
can be stored in a dynamic array. Refer to Help | BASIC Language Help in Scripter
for more information on Dim and Redim.
User-Defined Types
A collection of related variables can be grouped together under one name. The TYPE
statement defines the elements of a user-defined type.
Type measurement
717
Surfer
julianday As Integer
level As Double
End Type
The TYPE definitions must appear at the top of a script file, before any subroutines.
The TYPE…END TYPE statement defines a new type; it does not create a variable of
that type. Variables of the user-defined type must be declared in a DIM statement.
The elements of a user-defined type variable are accessed by using the variable name
followed by a period and the element name:
Dim m As measurement
m.julianday = 192
m.level = 12.3
Debug.Print m.julianday ' prints 192 in the Immediate window
Debug.Print m.level ' prints 12.3 in the Immediate window
Global Variables
In Scripter, variables declared in the body of a subroutine or function, are available
only within that procedure. If you want to share the same variable throughout a script
file, then you can define it at the top of the file, before any subroutine definitions.
Variables declared at the top of the file are available to all subroutines in the file;
hence, they are called "global" variables.
The PUBLIC keyword may be substituted for the DIM keyword to allow a global
variable to be used in other modules. For more information on modules, see Code,
Class, and Object Modules.
Coordinate Arrays
Coordinates are passed to and from Surfer as arrays of doubles with alternating X and
Y coordinates.
For example, the triangle specified by the coordinates (x1,y1), (x2,y2), (x3,y3) would
be passed in an array with the elements arranged like so: x1,y1,x2,y2,x3,y3.
Surfer is flexible about the dimension of the array so long as the X and Y coordinates
are contiguous (no empty elements) and alternating. To use arrays in Surfer from
within VB:
718
Chapter 24 – Automating Surfer
The first dimension is used for the X and Y coordinate, the second dimension refers to
the vertex index.
3. You can use the Array statement for initialization, and then copy the results to a
double array:
coordinates = Array(x1,y1,x2,y2,x3,y3)
719
Surfer
In addition to these simple input routines, Scripter supports user-defined dialogs. You
can design your own dialogs and process their input in any manner you choose.
Creating Dialogs
Scripter contains a dialog editor that you can use to design customized dialogs. Select
Edit | UserDialog Editor to visually design a dialog. You can control the size and
placement of the components of the dialog, as well as customize the text included in
the dialog.
To add a component to a dialog, first select from the palette of components at the left
side of the UserDialog Editor. After clicking a palette button, drag the mouse pointer
diagonally in the dialog design area where you want to place the component. As you
design the dialog, you can edit the properties of components you have placed in the
dialog. To edit the properties of a component, double-click the item, click the right
mouse button on the item, or select the component and click the button.
Every dialog must include an OKButton or a CancelButton, or both. See the Dialog
Controls table below for a list of dialog components and their properties.
When you have finished designing the dialog, click the button. The code for the
dialog is inserted into the script. To edit the dialog template after it has been inserted
into the script, first move the cursor in the code window to any line between the
BEGIN DIALOG statement and the END DIALOG statement. Next, select the Edit |
UserDialog Editor command. The previously saved state of the dialog is shown in the
dialog editor. When you save the dialog again, the previous dialog template is replaced
with your changes.
720
Chapter 24 – Automating Surfer
To show your custom dialog in a script, first use the DIM statement to declare a
variable as the UserDialog type, and then call the DIALOG function to display the
dialog (see the example). The DIALOG function takes a user dialog variable as its
argument and returns a number indicating which button was clicked to end the dialog.
The DIALOG function returns -1 if the OK button was clicked, 0 if the Cancel button
was clicked, or an integer greater than zero if a push button was clicked (1 for the first
push button listed in the dialog template, 2 for the second push button in the dialog
template, and so forth).
If the return value is not needed, the DIALOG instruction may be called as a
subroutine rather than as a function. In this case, do not enclose the dialog variable in
parentheses. If the DIALOG instruction is called as a subroutine, however, the script
will end with a run-time error if a cancel button is clicked.
To define more than one custom dialog in a script, you must place each dialog
template in its own subroutine or function. If you try to define more than one custom
dialog in the same procedure, Scripter will show an error indicating that the
UserDialog type has already been defined.
The values contained by dialog controls are accessed the same the way the fields of
user-defined variable types are accessed. Type the dialog variable name, followed by a
period, followed by the field name of the dialog component. Option button values
cannot be accessed directly, but are accessed via the field name of their associated
option group. The value of an OptionGroup is the number of the selected option button
(the first option button in the group is 0, the second option button is 1, and so forth).
You can initialize the values contained by dialog controls prior to showing the dialog,
and retrieve the values entered in the dialog after it has been invoked.
Dialog Controls
721
Surfer
Properties:
• Dialog Function: The dialog function is the name of a special function that is
called when various events happen in a dialog. Define a dialog function to control
the behavior of a dialog and to retrieve its input.
• Field Name: The field name is the name used to refer to a component.
• Caption: The caption is the text displayed within a component.
• Quoted: When not quoted, the caption property gives the name of variable that
contains the text to display for the caption. When quoted, the caption property is
the literal text to display.
• Array of Items: The array of items is the name of a string array variable that
contains the strings to display in a list. The array variable must be initialized
before the dialog is invoked.
• Type: The type is the behavior of some components varies depending on which
option is selected. Refer to the online help for descriptions of the available
component types.
• Option Group: For option buttons, the field name is used to refer to a group of
option buttons. Only one option button within a group may be checked.
722
Chapter 24 – Automating Surfer
UserDialog Example
The following function demonstrates how to define, display, and extract the values
entered in a user dialog.
' Display the dialog and wait for the OK or Cancel button to be pressed
result = Dialog(dlgvar)
723
Surfer
To perform processing while a user dialog is active, define a special "dialog function."
The dialog function will be called when various dialog events occur. To define a dialog
function:
1. While designing the dialog, double-click in a blank portion of the dialog design
area to activate the Edit UserDialog Properties dialog.
2. Enter a name for the Dialog Function property of the dialog. This property
gives the name of a function that will be called when dialog events occur.
3. When you save the dialog, Scripter asks you if it should create a skeleton
dialog function. Click the Yes button, and Scripter inserts the basic
instructions for a dialog function into your script.
Refer to the DialogFunc help topic in the Help | BASIC Language Help for more
information about how to process dialog events in a dialog function.
Running Scripts
Scripts are nothing but plain text files. You could create script files with any text-
editing program, such as the Windows Notepad. The usefulness of scripts is not
realized until the script instructions are carried out. The Scripter program is designed
to interpret script instructions and to carry them out. The process of carrying out the
instructions in a script is called running or executing the script.
724
Chapter 24 – Automating Surfer
To run the script in the Scripter code window, select the Script | Run command,
press the F5 key, or click the button. Scripter examines the script instructions,
and, if all the instructions are recognized, it begins to perform each instruction in turn.
More often than not, however, a newly typed script will not work correctly the first
time it is run. Even simple typographical errors will cause the script to fail. For
information on finding and fixing errors in scripts, see Debugging Scripts.
Select the Script | End command or click the button to stop executing a script.
This may be necessary when you want to edit a script after a run-time error occurs, or
when you accidentally start a script and you want to cancel the execution.
where <Scripter path> represents the path to the Scripter program file. (for example,
"C:\ ProgramFiles\Surfer\Scripter\Scripter.exe"), and filename.bas represents the
name of the script to run. The space between the –x and the file name is required.
This command opens the Scripter window, loads the specified script file, and runs the
specified script. When the script terminates - either successfully or unsuccessfully -
the Scripter window closes.
To load a script file but not execute it, the following command can be used:
This opens the Scripter window and automatically loads the specified script file. The
Scripter window remains open.
725
Surfer
Debugging Scripts
Bugs are errors in a script that keep it from performing as intended. Debugging is the
process of locating and fixing these errors. The most common bugs are typographical
errors in scripts or malformed instructions. Scripter detects these types of errors
immediately when you try to run a script. The program beeps, highlights the line
containing the error in red (or whatever color has been set with View | Colors
command), and displays an error message on the status bar.
Viewing Errors
Before running a script, verify that the View | Status Bar command is enabled,
otherwise you will not see the error message. To resolve the errors that Scripter
immediately detects, you usually must interpret the error message and correct the
indicated problem. Typical errors are typing mistakes, unbalanced parentheses,
misuse of a BASIC language instruction, or failure to declare variables in a DIM
statement (if you use the OPTION EXPLICIT statement). If you do not see an obvious
problem, refer to the online BASIC language help to make sure you are using the right
syntax.
Run-Time Errors
Scripts which encounter errors midway through script execution may be fixed much
the same way as syntax errors. The error message should guide your actions. Some
run-time errors cannot be detected until they are executed, such as when you try to
open a file that does not exist. In these cases, you need to check for error conditions
in your scripts. For example, use the DIR function to make sure a file exists before
trying to open it. Alternatively, you can use the ON ERROR GOTO statement to specify
an error handling section to execute when a procedure encounters a run-time error:
ErrLabel:
MsgBox "Unable to open file " & filename
Exit ' Must use RESUME or EXIT at end of error handling code
End Sub
726
Chapter 24 – Automating Surfer
Debug.Print
Probably the simplest debugging technique is to insert instructions into your script to
monitor the progress of the script and display the values of variables at various points
throughout the script. Use the Debug.Print statement to display information in the
Scripter immediate window:
To clear the contents of the immediate window, select the text in the window and
press either DEL or BACKSPACE.
Stop or Pause
Insert the STOP instruction to pause script execution where you think there might be a
problem. While the script is paused, you can examine and change the values of
program variables. If a running script appears unresponsive, it may be stuck in an
infinite loop. Select the Script | Pause command or click the button to pause
the script. To resume executing a paused script, select the Script | Run command or
the Debug | Quick Watch command, or click the button on the toolbar. The
current value of the variable is displayed in the immediate window.
• To continuously monitor a variable’s value, click on the variable name in the code
window, and press CTRL+F9 or select the Debug | Add Watch command.
Alternatively, type the variable name in the watch window and press ENTER. The
variable name and its value are displayed in the watch window. Every time script
execution pauses, the variable value is automatically updated. To clear a variable
from the watch window, highlight the line showing the variable value and press the
DEL or BACKSPACE key.
727
Surfer
Step
A powerful debugging technique is to watch Scripter execute your script one line at a
time. This lets you check the effect of each instruction and verify that the script is
doing what you expect. While stepping through a script, you can examine and change
the values of script variables. Select the Script | Run command or click the
button to resume script execution at full speed after stepping through script
instructions.
• To execute your script one line at a time press the F8 key, or select the Debug |
Step Into command. The first line of the script is executed (or, if the script was
paused, the next highlighted line is executed). The next line is highlighted and a
yellow arrow appears to the left of the next line. To execute the highlighted
instruction, press F8 again.
• If a statement calls a subroutine or function that is defined within your script, the
highlight will move into the called procedure. To keep from tracing execution into a
called procedure, press SHIFT+F8 or select the Debug | Step Over command.
This executes the whole subroutine or function in a single step.
• If you accidentally step into a procedure, press CTRL+F8 or select the Debug |
Step Out command. This executes all remaining instructions in a procedure, and
returns the highlight to the instruction that called the procedure.
• If you do not see the next highlighted instruction, select the Debug | Show Next
Statement command to scroll the highlighted line into view.
• Sometimes you may want to skip the execution of some instructions or you may
want to execute the same instructions several times without restarting the script.
To change the next instruction line, click on the line you want to execute next and
select the Debug | Set Next Statement command.
Breakpoint
Watching Scripter execute every line of the script may be very time consuming. In
this case, a breakpoint pauses the script where you think there might be a problem. A
breakpoint is a line of code that you mark. When Scripter encounters a line marked
as a breakpoint, it pauses the script just as if it had executed a STOP instruction.
Breakpoints are more convenient than STOP instructions because they may be set and
cleared while a script is paused, whereas STOP instructions may be changed only after
a script has ended.
728
Chapter 24 – Automating Surfer
• To set a breakpoint, click in the break bar area next to the line you want to mark.
The break bar is the area to the left of the code window, between the sheet tabs
and the code window. Alternatively, click on the line you want to mark, and press
F9 or select the Debug | Toggle Break command. The line becomes highlighted
in red, and a round marker appears in the break bar area.
• To clear a breakpoint, click on the round marker, or move the cursor to the
marked line and press F9 or select the Debug | Toggle Break command again.
You can clear all breakpoints by pressing SHIFT+CTRL+F9 or selecting the Debug
| Clear All Breaks command.
Trace
To check flow of execution through your script without having to watch each line of the
script being executed, try using the TRACE function. To activate the trace function
type "Trace" (without the quotes) in the immediate window and press ENTER. Trace
On is displayed in the immediate window. As the script is run, the location of every
instruction being executed is printed in the immediate window. After the script
finishes, the trace function is automatically disabled.
Stack
If you nest procedure calls (that is, one procedure calls another procedure, which calls
yet another procedure, and so forth), the stack window may be useful. When a script
is paused, the stack window lists the procedures that have been called, and the order
in which they were called. For instance, if the Main procedure calls procedure "A"
which in turn calls procedure "B," the stack window displays three lines, one for each
of the called procedures. Clicking on a line in the stack window moves the
corresponding procedure into view in the code window.
Module Files
Click the loaded window tab in the immediate window area to see which module files
are currently being interpreted by Scripter. The loaded files include the current script
file and any modules it includes with the '#Uses statement.
729
Surfer
Accessing Surfer
The means of accessing Surfer Automation objects varies depending on the scripting
tool and language being used. With the Golden Software Scripter program and other
applications compatible with Visual Basic, the CreateObject function creates a Surfer
Application object:
Set x = CreateObject("Surfer.Application")
In this sample, a variable named "x" is assigned the value returned by the VB
CreateObject function. The CreateObject function finds the name Surfer.Application in
the system registry, automatically activates Surfer, and returns a reference to the
Surfer Application object. For an introduction to the Scripter programming language,
see Scripter BASIC Language.
After creating an Application object, you can access other Surfer objects through the
properties and methods of the Application object. Surfer supplies nearly 60 different
kinds of ActiveX Automation objects. These objects are organized in a hierarchy, with
the Application object at the root. This object hierarchy is known as an object model.
Object Hierarchy
This is the Surfer automation object model. To access a particular object you must
traverse the object hierarchy using the methods and properties provided by the
objects. This chart shows objects that provide access to other objects. Collection
objects are containers for groups of related objects. Non-container objects represent a
specific part of Surfer.
730
Chapter 24 – Automating Surfer
731
Surfer
732
Chapter 24 – Automating Surfer
The way you access Surfer Automation objects’ properties and methods varies
depending on the programming language you use. In the Golden Software Scripter
language, properties and methods are accessed by typing the name of an object
variable, followed by a period, and the name of the property or method:
Set x = CreateObject("Surfer.Application")
x.Visible = True
This sample creates an Application object and sets the Application object's "Visible"
property to the special "True" value predefined by the Scripter language.
You can find all the properties and methods which are available for each of the
Automation objects, as well as a description of the objects themselves, in the online
help. To view the online help, select either the Help | Automation Help command
from the Surfer menu, or the Help | Surfer Automation Help command in
Scripter. The ActiveX Automation Members dialog also shows you the available
objects, properties, and methods. To view this dialog, select the Debug | Browse
command in Scripter.
Collections
Several non-visible objects, called collection objects, are used to organize the object
hierarchy. Collection objects are containers for groups of other, related, objects. For
example, the Overlays collection contains the objects in a composite map. An Overlays
collection object could contain a BaseMap object, Wireframe object, and a PostMap
object if these three objects were overlaid together.
All collection objects, regardless of what the collection contains, can be processed
using similar techniques. Thus, you retrieve an object from a collection of maps (an
Overlays collection) the same way you retrieve an object from a collection of axes (an
Axes collection). Collection objects also provide methods to create new objects.
733
Surfer
To "drill through" the object hierarchy you must know which properties and methods
of an object provide access to the next level of objects. Overview of Surfer Objects,
discusses the most commonly used objects and the properties and methods which
provide access to other objects in the hierarchy.
Every object represents a specific part of Surfer. For example, the Wireframe object
represents a wireframe, and the Axis object represents a map axis. Some objects do
not represent a visible entity, but organize other objects into groups. The Shapes
object, for example, provides the means to create new maps and new drawing
primitives (rectangles, symbols, polygons, etc.), but the Shapes object itself is never
visible.
Learning to use the Surfer Automation objects in a script may appear daunting at
first. Most tasks, however, can be accomplished using just a few Surfer objects. Once
you become familiar with these primary objects and learn how to "drill through" the
object hierarchy, you will be able to access most of Surfer’s features from your
scripts.
The online help is the complete reference for all of the Surfer Automation objects,
their properties, and their methods. The object model chart should serve as your guide
for navigating through the object hierarchy.
Use the Help | Automation Help command in Surfer, or the Help | Surfer
Automation Help in Scripter to see the online help reference.
734
Chapter 24 – Automating Surfer
This section shows how to access the Surfer Automation objects using the Scripter
BASIC language. If you are not familiar with computer programming, you may benefit
from a programming tutorial. See the Suggested Reading topic for recommendations.
Refer to Writing Scripts for more information about Scripter BASIC.
Set SurferApp =
CreateObject("Surfer.Application")
The GetObject function obtains the Application object from the currently running
instance of Surfer. If Surfer is not already running, the function will fail. Call the
Application object’s Quit method to close Surfer from a script.
When Surfer is started by a script, its main window is initially hidden. To make the
Surfer window visible, you must set the Application object’s Visible property to True:
Most of the gridding-related operations are methods of the Application object. Use the
GridData, GridFunction, GridMath, GridFilter, GridSplineSmooth, GridBlank,
735
Surfer
Other methods and properties of the Application object let you move and resize the
Surfer window, adjust the main window state (maximized, minimized, hidden),
change the window caption, and modify preference settings.
The Application object provides two important collections that allow access to the next
level of objects in the hierarchy. Use the Documents property to obtain a reference to
the Documents collection object, and use the Windows property to obtain a reference
to the Windows collection object. The Documents and Windows collection objects
provide access to the other objects in the object hierarchy. You can access the
currently active document and window objects with the Application object’s
ActiveDocument and ActiveWindow properties.
Set the ScreenUpdating property to False to disable screen updating and make your
scripts execute more quickly. Turning off screen updating can greatly increase the
performance of Automation when you want to perform a number of actions that cause
screen redraws.
The Add method returns a reference to the Document object that was created. New
grid documents are not created with the Documents collection Add method. You can
create grid files by calling the Application object’s grid-related objects.
Use the Open method to open existing plot, worksheet, and grid files. The Open
method returns a reference to the opened document.
736
Chapter 24 – Automating Surfer
Use the Item method to retrieve a reference to an open plot or worksheet document
object. When iterating through a collection of documents, the document Type and
Index properties can be used to determine the type and position of the document
within the collection.
The PlotDocument provides access to all the drawing and map objects. Use methods
and properties in the PlotDocument object to save Surfer files .SRF, to import and
export files, to print, and to change the default line, fill, font, and symbol for a plot.
Use the Shapes, Selection, and Window properties to access the collection objects
having the same names. These collection objects provide access to the next layer of
objects in the object hierarchy. Use the Shapes collection object to create new drawing
and map objects.
737
Surfer
The Window object encapsulates all the methods and properties associated with a
Surfer window. Methods exist to open, close, move and size the window.
When a document is closed, all windows viewing that document are closed as well. The
reverse relationship exists as well. When the last window viewing a document is closed
the document is closed.
One of the most common uses of the Shapes collection is to create new shapes. There
is a unique method to create each type of shape. For example, to create a contour
map use the AddContourMap method, as in:
Sub Main
End Sub
738
Chapter 24 – Automating Surfer
To select a particular shape, set the shape’s Selected property to True. When a Shape
object is selected, it is added to the Selection collection. When it is deselected, it is
removed from the Selection collection. Note that the shape is neither created nor
destroyed by selection operations. It is merely added or removed from the Selection
collection.
The Selection collection allows all selected shapes to be enumerated, and contains
most methods that operate on multiple objects. This includes moving and sizing one or
more shapes; cut, copy, and paste; and overlaying and stacking multiple maps.
739
Surfer
Use the Overlays property of the MapFrame to obtain the Overlays collection object.
The Overlays collection contains all the individual map objects associated with a map
frame. When a new map frame is created, the Overlays collection contains just one
map item. To obtain a reference to a newly created map, access the first item of the
collection:
Sub Main
End Sub
Use the MapFrame object to set map limits, adjust the three-dimensional view, adjust
the scale, and change the size of the map. Access the Axes collection with the
MapFrame object’s Axes property. Use the Axes collection object to obtain the
individual Axis objects associated with a map. Access the ScaleBars collection
through the MapFrame object’s ScaleBars property. Use the ScaleBars collection to
add scale bars to a map and to access the ScaleBar objects associated with a map.
Derived Objects
Several objects shown in the object chart share common features. For example, the
PlotDocument object and WksDocument object each provide SaveAs, Activate, and
Close methods. These common features are inherited from a predecessor Document
object.
Derived objects inherit all the properties and methods of the predecessor object. In
the online reference, the help topic for derived objects shows just the properties and
methods unique to the object. The predecessor object is accessed through the Derived
from link. Remember that all the properties and methods of a predecessor object are
available as well.
740
Chapter 24 – Automating Surfer
Count Property
All collection objects have a read-only property named Count which gives the number
of objects in the collection.
Item Method
Every collection also has a method called Item which retrieves one of the objects
contained in the collection. The Item method accepts a single argument specifying
either an index number or (for most collections) the name of the object to retrieve. An
index number is a value between 1 and the value returned from the collection’s
"Count" property. The name used to identify items in a collection varies:
• In a Documents collection, the individual Document objects are identified by the
file name (or the caption, if the document has not been saved in a file yet).
• In a Windows collection, individual Window objects are identified by the window
caption.
• In collections containing objects derived from the Shape object (Shapes,
Selection, Axes, ScaleBars, and Overlays collection objects), the individual Shape
objects are identified by the object ID assigned to the object.
• In the Levels collection, individual Level objects may be retrieved by their index
number only. The Level objects cannot be retrieved by name.
741
Surfer
A shorthand syntax for retrieving items from a collection is to enclose the index or
name of the desired object in parentheses immediately following the name of a
collection object (similar to accessing an element in an array). Thus, the following two
instructions have the same effect:
Objects contained in collections are typically derived from a base object. When you
use the Item method to retrieve an object from a collection, the method returns a
reference to the base object. To determine the actual type of the returned object,
most base objects contain a Type method. For example, the Windows collection may
contain PlotWindow, WksWindow, or GridWindow objects. When you retrieve a window
from the Windows collection, a reference to a generic Window object is returned. Use
the Window.Type property to determine if the returned object is a PlotWindow,
WksWindow, or GridWindow object.
Add Method
Many collections have one or more Add methods for creating new items and adding
them to the collection. For example, to add a rectangle to the Shapes collection, you
would use the AddRectangle method:
Shapes.AddRectangle 2, 2, 4, 4
742
Chapter 24 – Automating Surfer
The Parent property returns a reference to the collection object that an object is
contained in, or the controlling object. If an object is not contained by a collection
object, the Parent property typically returns a reference to the Application object.
The Window object encapsulates all the methods and properties associated with a
Surfer window. Methods exist to open, close, move and size the window.
When a document is closed, all windows viewing that document are closed as well. The
reverse relationship exists as well. When the last window viewing a document is closed
the document is closed.
Every object has properties and methods associated with it. Properties are values
describing the state of an object. Methods are actions an object can perform. Access
properties and methods by typing the name of an object variable, followed by a
period, followed by the property or method name.
You can use object properties as you would use variables: assign values to properties,
branch based on the value of a property, or use the value of a property in calculations.
You call an object’s methods as you would call subroutines and functions. Use the
return values from methods the same as you would use return values from functions.
When you "drill through" the object hierarchy, you can store references to
intermediate objects in variables, or you can string together long sequences of object
references. For example, you can set the default font for a plot document in a single
line:
743
Surfer
Alternatively, you can store each intermediate object in variables as you traverse the
object hierarchy:
The second form - storing intermediate objects - is more efficient if you are
performing several actions with the same object. A third alternative is to use the
WITH…END WITH statement:
Automation Examples
In this section, you will find example scripts using some important Scripter objects and
concepts. In addition to these examples, the online help provides many more
examples for your use.
• The SCRIPTS folder in the Surfer directory contains sample [.BAS] files to use in
Scripter. By default, the SCRIPTS folder is located at: C:\Program Files\Golden
Software\Surfer 10\Samples\Scripts.
• In addition, each object, method, and property contains an example in the
Automation help. The methods and properties contain only a few lines for the
example.
• Click on the Used By link for an example script in the online help, to tunnel
through the hierarchy to the method or property.
• Some methods and properties contain a link showing a full example of the object.
• Sample scripts are available for download on www.GoldenSoftware.com.
744
Chapter 24 – Automating Surfer
Sub Main
'Declare object and string variables used in the script
Dim SurferApp, Plot, ContourMapFrame, ContourMap As Object
Dim InFile, GridFile, BaseName As String
'Prompt the user for the name of the data file to process.
InFile = GetFilePath("","DAT;TXT;CSV;XLS", CurDir(), "Select data
file", 0)
If InFile = "" Then End 'Can' t continue: no file was selected
'Create a grid from the specified data file using the Kriging algorithm
GridFile = BaseName + ". grd"
SurferApp.GridData DataFile:=InFile, Algorithm:=srfKriging, _
DupMethod:= srfDupNone, ShowReport:=False, OutGrid:=GridFile
745
Surfer
'Create a contour map. Assign the map frame to the " ContourMapFrame"
variable
Set ContourMapFrame = Plot.Shapes.AddContourMap(GridFile)
746
Chapter 24 – Automating Surfer
747
Surfer
The following subroutine creates a Variogram object, and then creates a grid file using
the computed variogram components.
The next subroutine creates two VarioComponent objects and creates a grid based on
these variogram components.
748
Chapter 24 – Automating Surfer
End Sub
Finally, the following Main procedure demonstrates how you might use the preceding
subroutines:
Sub Main
' Start Surfer, set the default directory, and create a plot document
Set SurferApp = CreateObject("Surfer.Application")
SurferApp.Visible = True
SurferApp.DefaultFilePath = SurferApp.Path + "\samples"
Set plot = SurferApp.Documents.Add(SurferAppDocPlot)
749
Surfer
Sub Main
' Start Surfer and create a blank plot document
Set SurferApp = CreateObject("Surfer.Application")
SurferApp.Visible = True
Set plot = SurferApp.Documents.Add(SurferAppDocPlot)
' Create a contour map and a vector map
gridfile$ = SurferApp.Path + "\ samples\demogrid.grd"
Set map1 = plot.Shapes.AddContourMap(gridfile$)
Set map2 = Plot.Shapes.AddVectorMap(gridfile$)
' Call the example subroutine to overlay the maps
OverlayMapsExample map1, map2
End Sub
Stacking maps is similar to overlaying them. Call the Selection collection’s StackMaps
method rather than the OverlayMaps method.
Modifying Axes
Axis settings may be changed using the Axis object. You access Axis objects through
the Axes collection object, which in turn is accessed through a MapFrame object. The
following example does not use subroutines, but you could write the script with
subroutines instead.
Sub Main
' Start Surfer and create a blank plot document
Set SurferApp = CreateObject("Surfer.Application")
SurferApp.Visible = True
Set plot = SurferApp.Documents.Add(SurferAppDocPlot)
' Create a contour map
gridfile$ = SurferApp.Path + "\ samples\demogrid.grd"
Set mapframe = plot.Shapes.AddContourMap(gridfile$)
750
Chapter 24 – Automating Surfer
751
Surfer
752
Appendix A
Mathematical Functions
Introduction to Mathematical Functions
Mathematical Functions are used to modify data with the Grid | Function, Grid |
Math, Grid | Data, and Grid | Variogram commands in the plot window, and with the
Data | Transform command in the worksheet window.
Order of Operations
The mathematical expression can consist of constants, variables (such as column
letters), or functions (outlined below). The formulas follow standard precedence rules.
Spaces are used in the equation for clarity.
Operators of equal precedence are evaluated from left to right within the equation.
Parentheses are used to override precedence, and expressions with the parentheses
are performed first.
753
Surfer
9. |
10. &&, AND
11. ||, OR
12. ?:
13. IF
Data Types
The expression evaluator supports 32-bit signed integer numbers, double-precision
floating-point numbers, a boolean value, a text string of 0 to 256 characters, and time
stamp values.
Variable Names
Variable names must begin with a column letter (i.e. A), row number (i.e. _1), or cell
location (i.e. A2), which may be followed by other letters, numbers, or underscores
(_), up to a maximum of 256 characters per variable name.
The variable names are not case sensitive. For example, sum(a..z), sum(A..z), and
sum(A..Z) all refer to the same variable.
Mathematical Functions
The following built-in functions are supported.
Trigonometric Functions
All trigonometric functions are carried out in radians. If the data are in degrees, use
the d2r(x) conversion function (in the Miscellaneous Functions section below) to
convert degree data to radians and then use the trigonometric functions.
sin(x) sine of angle x
cos(x) cosine of angle x
tan(x) tangent of angle x, the value of x must not be an odd multiple of
/2
asin(x) Arcsine in the range - /2 to /2, x must be between -1 and 1
acos(x) Arccosine in the range 0 to , x must be between -1 and 1
atan(x) Arctangent in the range - /2 to /2
atan2(y,x) Arctangent of y/x in the range - to
754
Appendix A – Mathematical Functions
Bessel Functions
j0(x) Bessel functions of the first kind at x of orders 0, 1, and n,
j1(x) respectively
jn(n,x)
y0(x) Return the Bessel functions of the second kind at x, of orders 0, 1,
y1(x) and n, respectively. For y0, y1, and yn, the value of x must not be
negative.
yn(n,x)
Exponential Functions
exp(x) exponential function of x ( e to the x)
sinh(x) hyperbolic sine of angle x
cosh(x) hyperbolic cosine of angle x
tanh(x) hyperbolic tangent of angle x
ln(x) natural logarithm (base e) of x, x must be positive
log10(x) base 10 logarithm of x, x must be positive
pow(x,y) x raised to the yth power
Error conditions result if:
x is zero and y is negative or zero,
x is negative and y is not an integer,
an overflow results.
Miscellaneous Functions
min(x,y) smaller of x and y
max(x,y) larger of x and y
randn(x,y) an approximately normally (Gaussian) distributed real random
number with mean x and standard deviation y
randu(x) a uniformly distributed real random number with mean of x from the
interval [0,x]
row() returns the row number
ceil(x) next whole number greater than or equal to x
floor(x) next whole number less than or equal to x
sqrt(x) square root of x, x must not be negative
755
Surfer
756
Appendix A – Mathematical Functions
String Comparison
atof(x) convert a string x to floating point value
atoi(x) convert a string x to an integer value
atotime(x) convert a string x to time/date value
strlen(x) length of string x in characters
strcmp(x,y) compare string x with y and return 1 if x>y, -1 if x<y, or 0 if
x=y
stricmp(x,y) compare string x with y without regard to the case of any
letters in the strings
strncmp(x,y,z) compare the first z character of string x with y
strnicmp(x,y,z) compare the first z characters of string x with y without regard
to the case of any letters in the strings
String comparison functions work with strings, not numbers. Any rows or columns
containing numbers result in blanks.
757
Surfer
This is the ASCII table order. The table is read left to right, top to bottom. Items
appearing toward the upper left corner are less than the items
appearing toward the lower left corner.
758
Appendix A – Mathematical Functions
Boolean Expressions
Boolean expressions include:
• logical Operators (and, or, xor, not),
• Comparison Operators (=, <>, <, >, <=, >=),
• the IF Function - IF(condition, true_value, false_value)
The words AND, OR, XOR, NOT, and IF are reserved keywords and may not be used as
variable names.
759
Surfer
760
Appendix A – Mathematical Functions
Examples
The following are examples of mathematical function syntax used in Surfer. With Grid
| Function and Grid | Math use X,Y, and Z for the variables. If you use Data |
Transform in the worksheet, replace X,Y, and Z with column letters (A), row numbers
(remember the underscore, _1 is row 1), or cell locations (A1).
x 2 pow(x,2)
ln ( x ) ln(x)
log10 x log10(x)
1− e −x (1-exp(-X))
(1-exp(-X*X))
1− e −x
2
sin (x ) 1-(sin(x)/x)
1−
x
x2 pow(x,2)/(1+(pow(x,2)))
1+ x 2
2x − x 2 (2 * X)- pow(x,2)
761
Surfer
762
Appendix B
Math Text Instructions
Introduction to Math Text Instructions
The math text instruction set offers advanced formatting of text in the Surfer plot
window. Math text instructions can be used to change the typeface, size, color, weight,
and style of text on a character-by-character basis. Greek letters and mathematical
symbols can be written in the plot window using math text instructions. The math text
instructions also allow for the detailed placement of characters and symbols; thus,
superscripts, subscripts, and the superposition of characters are possible.
All text within the plot window can be controlled by math text instructions. For
example, an axis label, title, or text block can include math text instructions in the
Text dialog. The worksheet cells used as post labels in a post plot can contain math
text instructions. In general, the clipboard can be used to cut and paste math text
instructions.
Each line in a text block starts with the default text properties such as typeface, size,
color, and style. (Note that some typefaces, such as Symbol, do not support bold or
italicized text.) A line of text within a text block uses the current properties until a
math text instruction is encountered. All text following an instruction is modified
according to the instruction. For example, if the typeface is changed in the middle of a
text string, the text following the instruction will use the new typeface until the end of
the line of text is reached, or until another instruction affecting the typeface is
encountered.
763
Surfer
To incorporate a backslash, right curly brace, or left curly brace as a text character in
a text block, precede them with a backslash when entering the text string. For
example, "\\" produces "\", and "\{" produces "{".
Percentage Instructions
Instructions based on a percentage, such as font size, are cumulative. This means that
a second percentage change within a text block is interpreted as a percentage of the
first percentage change. For example, if the font is scaled by 50%, and later in the
same text block the font is scaled by 50% again, the font size after the second
percentage would be 25% of the original font size.
Note: Instruction names are case insensitive (\fs50, \FS50, \Fs50 or \fS50 are all
valid).
Note: The \sp and \rp instructions only refer to positions on the same line.
764
Appendix B – Math Text Instructions
\plain This sets the text to "plain" text with normal weight, no italics,
no underlining, and no strikethrough.
\strike Strikethrough the text.
\ul All text after the \ul instruction is underlined.
765
Surfer
766
Appendix B – Math Text Instructions
∑X Y = S
\sp1 {\fs200 \ f"Symbol" \a229 \sp2 }{\rp1 n
\dn90 \fs75 i=1\rp1 \up220 n}\rp2 \up25
X\dn50 {\fs75 i}\up50 Y\dn50 {\fs75 i i XY
i=1
i}\up50 = S{\dn50 {\fs75 XY}\up50 }
{\i Avogadro} Constant = 6.022 x 10{\up50 Avogadro Constant =
{\fs75 23}\dn50 } 6.022 x 1023
{\f"Symbol" \a209 }{\up50 {\fs50 2}\dn50 ∇2φ = ∂2φ/∂x2 + ∂2φ/∂y2
}{\f"Symbol" \a102 } = {\f"Symbol" \a182
}{\up50 {\fs50 2}\dn50 }{\f"Symbol" \a102
}/{\f"Symbol" \a182 }x{\up50 {\fs50
2}\dn50 } + {\f"Symbol" \a182 }{\up50
{\fs50 2}\dn50 }{\f"Symbol" \a102
}/{\f"Symbol" \a182 }y{\up50 {\fs50
2}\dn50 }
{\fs200 N}\sp1 \up100 \fs75 5 \rp1 \dn50 1 5
N 1
sin{\up50 {\fs50 2}\dn50 }(X) + cos{\up50 sin (X) + cos2(X) = 1
2
767
Surfer
768
Appendix C
File Formats
Introduction to File Formats
This appendix contains technical information about the various file formats used by
Surfer. This information is primarily for advanced users wishing to create their own
files or for exchanging information with other applications.
769
Surfer
770
Appendix C – File Formats
771
Surfer
Boundary
GSI Golden X12 X11 R X X R and V
Software
Interchange
GXF Grid X13 X10 G
Exchange
HDF Hierarchical X13 X10 R
Data
HDR GTopo-30 X13 R G
IMG Analyze 7.5 X13 X10 R
Medical
Image
IMG Idrisi Raster X13
Image
Info Leica X13
Confocal
Raw Slices
JPG JPG X12,13 X11 P,R R
Compressed
Bitmap
KML Google Earth X11 P,R
KML
KMZ Google Earth X11 P,R
KMZ
LAT Iris Explorer X13 X10 G
LGO USGS Digital X12 R V
Line Graph
LGS USGS Digital X12 R V
Line Graph
MDB Microsoft X14 D
Access
MIF MapInfo X12 X11 R some X V
Interchange
Format
PBM Image X12,13 P
PCX ZSoft X12, 13 X11 P R and V
Paintbrush
PDF Portable X11 P R
Document
File (Raster)
PDF Portable X11 O V
Document
File (Vector)
PGM Image X12, 13 P
PLT Golden X12 O X V
Software
PlotCall
PLY Stanford X12 R V
Polygon
772
Appendix C – File Formats
773
Surfer
1 When imported with Map | New | Base Map (Import column above must contain 12) or
when exported (Export column above must contain 11):
R = real world coordinates such as latitude/longitude, UTM, etc.
P = pixel coordinates
O = other (i.e. page coordinates, metafile coordinates, etc.)
774
Appendix C – File Formats
12 The File | Import command in the plot window or Import dialog (i.e. Map | New |
Base Map) can be used to open this format.
13 The Open Grid dialog (i.e. Map | New | Contour Map) can be used to open this
format.
14 The File | Import command in the worksheet can be used to open this format.
The listing of Z values follows the header information in the file. The Z values are
stored in row-major order starting with the minimum Y coordinate. The first Z value in
the grid file corresponds to the lower left corner of the map. This can also be thought
of as the southwest corner of the map, or, more specifically, the grid node of minimum
X and minimum Y. The second Z value is the next adjacent grid node in the same row
(the same Y coordinate but the next higher X coordinate). When the maximum X value
is reached in the row, the list of Z values continues with the next higher row, until all
the rows of Z values have been included.
775
Surfer
grid row 1
grid row 2
grid row 3
… These are the rows of Z values of the grid, organized in row order.
Each row has a constant Y coordinate. Grid row 1 corresponds to
ylo and the last grid row corresponds to yhi. Within each row, the
Z values are arranged from xlo to xhi.
Example
The following example grid file is ten rows high by ten columns wide. The first five
lines of the file contain header information. X ranges from 0 to 9, Y ranges from 0 to
7, and Z ranges from 25 to 97.19. The first Z value shown corresponds to the lower
left corner of the map and the following values correspond to the increasing X
positions along the bottom row of the grid file. This file has a total of 100 Z values.
DSAA
10 10
0.0 9.0
0.0 7.0
25.00 97.19
91.03 77.21 60.55 46.67 52.73 64.05 41.19 54.99 44.30 25.00
96.04 81.10 62.38 48.74 57.50 63.27 48.67 60.81 51.78 33.63
92.10 85.05 65.09 53.01 64.44 65.64 52.53 66.54 59.29 41.33
94.04 85.63 65.56 55.32 73.18 70.88 55.35 76.27 67.20 45.78
97.19 82.00 64.21 61.97 82.99 80.34 58.55 86.28 75.02 48.75
91.36 78.73 64.05 65.60 82.58 81.37 61.16 89.09 81.36 54.87
86.31 77.58 67.71 68.50 73.37 74.84 65.35 95.55 85.92 55.76
80.88 75.56 74.35 72.47 66.93 75.49 86.39 92.10 84.41 55.00
74.77 66.02 70.29 75.16 60.56 65.56 85.07 89.81 74.53 51.69
70.00 54.19 62.27 74.51 55.95 55.42 71.21 74.63 63.14 44.99
776
Appendix C – File Formats
LVL Format 1
There are three different forms of the level file format. The first and simplest form
consists of a single elevation value per record. For example, the following file can be
used to specify logarithmic intervals for a contour map:
0.1
1
10
100
1000
LVL Format 2
The second form of the level file format is indicated by specifying the LVL2 keyword on
the first line. In this form of level file, each subsequent record has the following
general syntax:
Level Flags LColor LStyle LWidth FFGColor FBGColor FPattern FMode FScale FType
777
Surfer
All colors are specified by name as listed in the Colors topic or by the special syntax
"Rxxx Gyyy Bzzz." In this form, the red, green, and blue components are substituted
for the xxx, yyy, and zzz fields, respectively. Each component can range from 0 to
255.
Here is an example of a version 2 level file that defines 4 levels and their properties:
LVL2
20 1 "Black" "Solid" 0 "Black" "Black" "Solid" 2
25 0 "Black" "Solid" 0 "R15 G15 B15" "R15 G15 B15" "Solid" 2
30 0 "Black" "Solid" 0 "R31 G31 B31" "R31 G31 B31" "Solid" 2
35 0 "Black" "Solid" 0 "R47 G47 B47" "R47 G47 B47" "Solid" 2
LVL Format 3
The third form of the level file format is indicated by specifying the LVL3 keyword on
the first line. In this form of level file, each subsequent record has the following
general syntax:
Level Flags LColor LStyle LWidth FVersion FFGColor FBGColor FPattern OffsetX OffsetY
ScaleX ScaleY Angle Coverage
778
Appendix C – File Formats
and hached.
LColor LColor is the color of lines used to represent the level. The
color must be enclosed in double quotes.
LStyle LStyle is the style of lines used to represent the level, and
it is one of the line style names as listed in the Line Styles
topic. The name must be enclosed in double quotes.
LWidth LWidth is the line width in mils (thousandths of an inch).
FVersion
FFGColor FFGColor is the fill foreground color. The color must be
enclosed in double quotes.
FBGColor FBGColor is the fill background color. The color must be
enclosed in double quotes.
FPattern FPattern is one of the fill style names as appears in the Fill
Pattern palette within the dialogs. The name must be
enclosed in double quotes.
OffsetX OffsetX controls the X location of the image pattern within
the geometry.
OffsetY OffsetY controls the Y location of the image pattern within
the geometry.
ScaleX ScaleX controls the density in the X direction of an image
pattern.
ScaleY ScaleY controls the density in the Y direction of an image
pattern.
Angle Angle controls the rotation of the pattern. This should
always be set to zero.
Coverage Coverage determines whether an image is stretched or
tiled. 0 = tiled, 1 = stretched.
All colors are specified by name as listed in the Colors topic or by the special syntax
"Rxxx Gyyy Bzzz Aaaa." In this form, the red, green, and blue components are
substituted for the xxx, yyy, and zzz fields, respectively. The opacity value is
substituted for the aaa value. Each component can range from 0 to 255.
779
Surfer
Here is an example of a version 3 level file that defines 5 levels and their properties:
LVL3
'Level Flags LColor LStyle LWidth FVersion FFGColor FBGColor FPattern OffsetX OffsetY
ScaleX ScaleY Angle Coverage
2100 1 "R216 G0 B216 A255" ".2 in. Dash" 0 1 "Powder Blue" "R255 G255 B255
A156" "Crosshatch" 0 0 1 1 0 0
2300 0 "R216 G0 B216 A255" ".2 in. Dash" 12 1 "R255 G0 B255 A207" "R255 G255
B255 A0" "Dashed Horizontal" 0 0 1 1 0 0
2500 0 "R216 G0 B216 A255" ".2 in. Dash" 25 1 "R102 G153 B102 A130" "R255 G255
B255 A0" "Solid" 0 0 1 1 0 0
2700 0 "R216 G0 B216 A255" ".2 in. Dash" 37 1 "Powder Blue" "R255 G255 B255 A0"
"Andesite 1" 0 0 1 1 0 0
2900 0 "R216 G0 B216 A255" ".2 in. Dash" 50 1 "Red" "R255 G255 B255 A0" "Coarse,
medium-graded sand" 28 0 1.55 1.55 0 0
The basic format consists of an ASCII file with header information on the first line.
Subsequent lines specify anchors points, one anchor point per line.
780
Appendix C – File Formats
Subsequent lines define the anchor points, one per line. Each line has the following
space-delimited fields:
Element Description
Position The position is the floating point percentage value (from 0.0 to
100.0). Positions must be specified in increasing order from 0 to
100 percent, and the 0 and 100 percent positions must be specified
in the file.
Red red color component (0 to 255)
Green green color component (0 to 255)
Blue blue color component (0 to 255)
Alpha opacity component (0 to 255). 0 is fully transparent. 1 is fully
opaque.
Examples
In the following example, the anchor points are at 0, 50, and 100. The zero position is
a slightly transparent blue, the 50 percent anchor is mostly transparent green, and the
100 percent position is fully opaque yellow.
ColorMap 1 1
0 0 0 255
50 0 255 0
100 255 255 0
ColorMap 2 1
0 0 0 255 200
50 0 255 0 20
100 255 255 0 255
It is also possible to have coincident anchor points in a color file. Anchors and colors
are interpreted in order from 0 percent to 100 percent. In the case of coincident
points, you can create maps with distinct boundaries, similar to the example shown
here.
781
Surfer
ColorMap 2 1
0 255 0 0 255
50 255 255 0 255
50 0 0 255 255
100 255 255 255 255
There are many sample .CLR files located in the samples folder. A popular .CLR file is
RAINBOW.CLR. The following example shows the format of RAINBOW.CLR:
ColorMap 1 1
0 153 102 255
20 0 0 255
40 0 255 0
60 255 255 0
80 255 102 0
100 255 0 0
The online help provides complete details of all the file formats used in Surfer. For up-
to-date information on the import and export options, click the help button in the
file type import or export dialog.
782
Appendix D
Line Styles, Fill Patterns, and Colors
Line Styles
Following are the line styles available in Surfer for advanced options.
Select a line style from the line palette.
Fill Patterns
There are 315 predefined fill patterns. There are stock patterns and high resolution
image fill patterns. Stock and image patterns can have a transparent background.
Only image patterns can be scaled and offset in the Fill Properties.
783
Surfer
Image Patterns
6.25% Black Gravel Limestone -
12.5% Black Iron Fossil 1
25.0% Black Spheres Limestone -
Fossil 2
50.0% Black Solid Dash
Limestone -
75.0% Black Thatch Oolitic
87.5% Black Andesite 1 Limestone -
Sand Andesite 2 Stomatolitic
Swamp Andesite 3 Limetsone
Forest Basalt 1 Mudstone
Orchard Basalt 2 Quartzite
Water Conglomerate Rhyolite
Limestone Dolomite Rocks
Tilted Limestone Fish Fossil Sand 1
Dolomite Gneiss 1 Sand 2
Dolomite2 Gneiss 2 Sandstone 1
Shale Granite1 Sandstone 2
Granite Granite 2 Schist
Igneous Gravel Slate
Schist Stones
784
Appendix D – Line Styles, Fill Patterns, and Colors
785
Surfer
Color List
Colors can be referenced by RGB or RGBA values for advanced options. The syntax is
Rxxx Gyyy Bzzz Aaaa where xxx, yyy, and zzz and aaa specify a red, green, blue color
and transparency component respectively. Each color component can range from 0 to
255.
Automation does not require color names because there are explicit enumerations for
the colors. Refer to srfColor values or wksColor values for a list of color enumerations.
Also, refer to the specific automation topic for specifying colors in automation.
787
Surfer
Example
R0 G0 B0 All components are 0, resulting in black
R0 G255 B0 Pure green
R255 G255 B255 All components are at full intensity, resulting in white
Color Names
Black Electric Blue Dull Green
90% Black Twilight Blue Chartreuse
80% Black Navy Blue Moon Green
70% Black Deep Navy Blue Murky Green
60% Black Desert Blue Olive Drab
50% Black Sky Blue Khaki
40% Black Ice Blue Olive
30% Black Light BlueGreen Banana Yellow
20% Black Ocean Green Light Yellow
10% Black Moss Green Chalk
White Dark Green Pale Yellow
Blue Forest Green Brown
Cyan Grass Green Red Brown
Green Kentucky Green Gold
Yellow Light Green Autumn Orange
Red Spring Green Light Orange
Magenta Turquoise Peach
Purple Sea Green Deep Yellow
Orange Faded Green Sand
Pink Ghost Green Walnut
Dark Brown Mint Green Ruby Red
Powder Blue Army Green Brick Red
Pastel Blue Avocado Green Tropical Pink
Baby Blue Martian Green Soft Pink
788
Appendix D – Line Styles, Fill Patterns, and Colors
Faded Pink
Crimson
Regal Red
Deep Rose
Neon Red
Deep Pink
Hot Pink
Dusty Rose
Plum
Deep Violet
Light Violet
Violet
Dusty Plum
Pale Purple
Majestic Purple
Neon Purple
Light Purple
Twilight Violet
Easter Purple
Deep Purple
Grape
Blue Violet
Blue Purple
Deep River
Deep Azure
Storm Blue
Deep Blue
789
Surfer
Index
array · 202
# of lines · 145, 146 array of Z values · 202
[.DDF] · 137 ASCII text file · 575
[.DEM] · 137 autocorrelation · 174
[.DT*] · 137 variograms · 217
[.HDR] · 137 autocorrelation estimator · 219
25th percentile · 120 autocovariance
3D surface map · 18 variograms · 217
3D wireframe map · 18 autocovariance estimator · 219
75th percentile · 120 autofit · 225–28
95% or 99%confidence interval for the least absolute value · 226
mean · 121 least squares · 226
max lag distance · 227
maximum iterations · 227
A
parameter fit limits · 228
accumulated horizontal distance · 589
restarting · 227
alpha · 514
target precision · 227
angle
automatic variogram fitting dialog ·
anisotropy · 156, 224 225
search ellipse · 154 automation · 15
variogram · 223 average · 195
angle grid · 357 average deviation · 122
angular divisions · 214 average distance · 197
anisotropically rescaled relative averages
separation distance · 222
weighted · 168
anisotropy · 155–57, 207, 224
angle · 223, 224
example · 156 B
ratio · 223, 224 base map · 16
arithmetic average · 120, 195 fill properties · 283
arrange importing · 597
order objects · 639 line properties · 283
790
Index
791
Surfer
D detrend · 214
differential and integral operators · 568
data
biharmonic operator · 567
honoring in grid file · 161
gradient operator · 566
regularly spaced · 201
integrated volume · 567
data location statistics · 196
Laplacian operator · 566
data metrics · 162, 198
direction
data location statistics · 196
2-grid vector map · 354
data set · 192
variogram · 206
description of options · 194–98
directional derivatives · 558
horizontal planar grid · 192
definition · 554
other Z statistics · 196
first derivative · 554
planar grid · 192
graphical example · 558
Z moment statistics · 195
second derivative · 555
Z order statistics · 194
distance to farthest · 197
data page
distance to nearest · 197
new variogram · 212
distance weighting filter · 513
data repeatability · 207, 223
do not detrend data · 214
data statistics
docking · 13
terrain statistics · 198
documentation · 7
data value for symbol size
drift · 175, 176
post map · 306
DT* · 137
DDF · 137
DTED · 137
default gridding method · 138, 161
default linear variogram
defined · 235
792
Index
E F
edge of grid · 518 faults · 160
ellipse fill blanked region
search · 153 filter · 519
email · 23 fill edge of grid · 518
embossing filters · 515 fill properties
equations · 767 base map · 283
error variance · 223 filter
estimator type blank edge · 517
variograms · 217 blanked nodes · 519
estimators coefficient of variation · 516
autocorrelation · 219 compass gradient · 517
autocovariance · 219 cyclic wrap edge · 518
classical variogram · 218 distance weighting · 513
standardized variogram · 218 edge of grid · 518
evenly spaced data · 201 embossing · 515
exact interpolators · 167 expand blanked region · 519
example files · 14 fill blanked region · 519
examples fill edge · 518
anisotropy · 156 Gaussian low-pass · 514
grid density · 145 general user-defined · 514
grid line geometry · 143 gradient directional · 515
variogram grid · 209 grid · 519
vector · 355 high-pass · 514
excel · 15 ignore blanked region · 519
expand blanked region ignore edge · 517
filter · 519 inverse distance · 513
expand grid · 521 Kirsch · 517
experimental curve · 211 leave blanked region · 519
experimental page · 220 linear convolution · 515
exponential variogram model · 228 lower quartile · 515
export files · 597 low-pass · 514
export variogram · 236 median · 515
793
Surfer
795
Surfer
796
Index
797
Surfer
minimum · 194
variogram autofit · 228 N
minimum curvature · 161, 166, 180 natural cubic spline · 187
boundary tension · 180 natural neighbor · 161, 167, 183
convergence · 179 references · 183
equations · 178 nearest neighbor · 162, 167, 202
internal tension · 180 neighborhood · 510
maximum iteration · 179 nested variogram model · 228
maximum residual · 179 net volume · 575
references · 180 new variogram · 215
relaxation factor · 179 data page · 212
minimum filter · 515 general page · 213
minimum number of data · 191 no search (use all of the data) · 151
minimum number of data in all sectors node · 137
· 153
node is blanked if fewer · 153
minimum value · 119
non-linear filters · 517
mirror edge of grid · 518
nugget effect · 206, 210, 222, 223,
mirror X transform · 544 228
mirror Y transform · 544 default linear variogram · 235
model curve · 211 error variance · 223
798
Index
799
Surfer
Q variogram · 223
rational quadratic variogram model ·
quadratic 228
drift · 175 recommendations
quadratic detrending · 215 gridding · 161
quadratic drift · 176 references
quadratic model · 222 cross validate · 150
quadratic neighbors · 181 filter · 519
quadratic surface · 185 inverse distance to a power ·
quadratic variogram model · 228 172
kriging · 176
801
Surfer
802
Index
V value · 206
variance · 211
variance · 121, 195
variogram autofit
variogram · 211
default method · 226
variance filter · 515
fit criteria · 226
variance line
initial · 228
variogram model · 234
least absolute value · 226
variogram · 206, 217
least squares · 226
angular divisions · 214
max lag distance · 227
autocorrelation · 174
maximum · 228
data page · 212
maximum distance · 227
detrend · 214
maximum iterations · 227
direction · 206
minimum · 228
experimental curve · 211
parameter fit limits · 228
exporting · 236
restarting · 227
general page · 213
target precision · 227
histogram · 233
variogram components · 173
length or slope · 211
variogram functions · 228
linear detrending · 214
variogram grid · 207, 213
max lag distance · 214
example · 209
new variogram ·215
memory · 207
nugget effect · 206, 210
separation angle · 209
observations · 217
separation distance · 209
pair order · 217
variogram model · 174
pairs · 211
cubic · 228
quadratic detrending · 215
defined · 210
radial divisions · 214
error variance · 223
range · 206
exponential · 228, 229
report · 233, See online help
Gaussian · 228, 229
scale · 210
graphical example · 210
separation distance · 206
linear · 223, 228
sill · 206, 210
logarithmic · 228
smoothing · 220
micro variance · 224
standardized variogram · 174
model line · 234
803
Surfer
805
Surfer
806
Customer Service Resources
Before calling, please check the following available resources as your question may
already be answered.
Registration:
Register online at www.GoldenSoftware.com or fax or mail the Registration
Form.PDF, located in the main directory on the CD
Knowledge Base:
www.GoldenSoftware.com/activekb or in the Surfer program using the Help
| Golden Software on the Web | Knowledge Base command
Forums:
www.GoldenSoftware.com/forum or in the Surfer program using the
Help | Contents command and click on Forums
Frequently Asked Questions:
In the Surfer program using the Help | Golden Software on the Web |
Frequently Asked Questions command
Tutorial:
Complete the tutorial section in this quick started guide or in the Surfer
program using the Help | Tutorial command
Online Help:
In the Surfer program using the Help | Contents command
Support Videos:
www.GoldenSoftware.com
Business Hours
Technical Support:
Monday through Friday, 8:00 AM - 5:00 PM, Mountain Time
Product Sales:
Online orders available 24 hours, 7 days a week with 2 business hour delivery