100% found this document useful (1 vote)
1K views840 pages

Surfer 10 Manual

Uploaded by

Mokrani Omar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
1K views840 pages

Surfer 10 Manual

Uploaded by

Mokrani Omar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 840

Contouring & 3D Surface

Mapping for
Scientists & Engineers

User’s Guide
Surfer® Registration Information

Your Surfer serial number is located on the CD cover or in the email


download instructions, depending on how you purchased Surfer.

Register your Surfer serial number online at www.GoldenSoftware.com.


Or, complete the Registration Form.PDF, located in the main directory
of the installation CD. Return the Registration Form.PDF by mail or fax.
This information will not be redistributed.

Registration entitles you to free technical support, free minor updates,


and upgrade pricing on future Surfer releases. The serial number is
required when you run Surfer the first time, contact technical support,
or purchase Surfer upgrades.

For future reference, write your serial number on the line below.

_________________________________
®
Surfer User’s Guide
Contouring and 3D Surface Mapping
for Scientists and Engineers

Golden Software, Inc.


809 14th Street, Golden, Colorado 80401-1866, U.S.A.
Phone: 303-279-1021 Fax: 303-279-0909
www.GoldenSoftware.com
COPYRIGHT NOTICE

Copyright Golden Software, Inc. 2011

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

Chapter 1 - Introducing Surfer


Introduction to Surfer® .................................................................................... 1
Who Uses Surfer? ........................................................................................... 2
New Features ................................................................................................. 2
System Requirements ..................................................................................... 4
Installation Directions ...................................................................................... 4
Installing Surfer........................................................................................... 4
Updating Surfer ........................................................................................... 5
Uninstalling Surfer ....................................................................................... 6
Upgrading Surfer ......................................................................................... 7
A Note about the Documentation ...................................................................... 7
Surfer User Interface....................................................................................... 8
Opening Windows ...................................................................................... 10
Plot Document ........................................................................................... 10
Worksheet Document ................................................................................. 11
Grid Node Editor ........................................................................................ 12
Changing the Window Layout ......................................................................... 13
Docking Managers...................................................................................... 13
Customizing Toolbars and Buttons ............................................................... 13
Object Manager ......................................................................................... 13
Property Manager ...................................................................................... 13
Toolbars ................................................................................................... 14
Tab View .................................................................................................. 14
Three-Minute Tour ........................................................................................ 14
Example Surfer Files .................................................................................. 14
Using Surfer .............................................................................................. 15
Using Scripter ........................................................................................... 15
Example Scripter Files ................................................................................ 16

i
Surfer

Map Types ................................................................................................... 16


Base Map .................................................................................................. 16
Contour Map ............................................................................................. 16
Post Map and Classed Post Map ................................................................... 17
Image Map ............................................................................................... 17
Shaded Relief Map ..................................................................................... 17
Vector Map ............................................................................................... 17
3D Surface Map ......................................................................................... 18
3D Wireframe Map ..................................................................................... 18
Map Layers .................................................................................................. 18
Coordinate Systems ...................................................................................... 19
Source Coordinate System - Map Layer ........................................................ 19
Target Coordinate System - Map.................................................................. 20
Getting Help ................................................................................................. 21
Online Help ............................................................................................... 21
Automation Help ........................................................................................ 21
Context Sensitive Help ............................................................................... 21
Internet Help............................................................................................. 21
Golden Software Technical Support ................................................................. 22
Golden Software Contact Information .............................................................. 23

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

Lesson 2 - Creating a Grid File ........................................................................ 31


Creating Grid Files ..................................................................................... 31
Lesson 3 - Creating a Contour Map ................................................................. 34
Creating Contour Maps ............................................................................... 34
Changing Contour Levels ............................................................................ 35
Changing Contour Line Properties ................................................................ 36
Changing Contour Fill Properties .................................................................. 37
Setting Advanced Contour Level Properties ................................................... 38
Adding, Deleting, and Moving Contour Labels ................................................ 41
Lesson 4 - Modifying an Axis .......................................................................... 42
Adding an Axis Title ................................................................................... 42
Changing the Tick Label Properties............................................................... 43
Saving a Map ............................................................................................ 44
Lesson 5 - Posting Data Points and Working with Map Layers ............................. 44
Use of Map Layers...................................................................................... 44
Adding Map Layers to Existing Maps ............................................................. 45
Adding a Post Map Layer............................................................................. 45
Changing the Post Map Properties ................................................................ 46
Selecting and Renaming a Map Layer ........................................................... 46
Adding Labels to the Post Map ..................................................................... 48
Moving Individual Post Map Labels ............................................................... 48
Lesson 6 - Creating a 3D Surface Map ............................................................. 49
Creating a 3D Surface Map.......................................................................... 50
Adding a Mesh........................................................................................... 50
Changing Colors ........................................................................................ 51
Adding a Map Layer ................................................................................... 52
Lesson 7 - Adding Transparency, Color Scales, and Titles ................................... 53
Adding Transparency to Map Layers ............................................................. 54
Color Scales .............................................................................................. 54
Adding a Color Scale .................................................................................. 55
Adding a Shaded Relief Map Layer ............................................................... 56

iii
Surfer

Adding a Map Title ..................................................................................... 57


Lesson 8 - Creating Maps from Different Coordinate Systems ............................. 58
Map Coordinate System .............................................................................. 58
Use of Map Coordinate System .................................................................... 58
Creating the First Map Layer ....................................................................... 58
Adding a Second Map Layer ........................................................................ 59
Setting the Coordinate System for the Map ................................................... 60
Lesson 9 - Custom Toolbars and Keyboard Commands ...................................... 62
Creating Custom Toolbars ........................................................................... 62
Creating Keyboard Shortcuts ....................................................................... 62
Lesson 10 - Overlaying Map Layers ................................................................. 64
Method 1: Overlaying Two Existing Maps by Dragging in the Object Manager .... 65
Method 2: Overlaying Two Existing Maps by using the Map | Add Command ..... 67
Method 3: Overlaying Maps with the Map | Overlay Maps Command ................ 67
Lesson 11 - Blanking a Grid File ...................................................................... 68
Lesson 12 - Using a Didger TerraServer Image in Surfer .................................... 69
Lesson 13 - Changing the Projection in the Worksheet....................................... 71
Lesson 14 - Creating a Cross Section............................................................... 74

Chapter 3 - Data Files and the Worksheet


Introduction to Data Files............................................................................... 79
XYZ Data Files ........................................................................................... 79
Data as Numbers or Text ............................................................................ 82
Worksheet Window ....................................................................................... 82
Components of a Worksheet Window............................................................ 84
Working with Worksheet Data ........................................................................ 85
Selecting Cells ........................................................................................... 85
Entering Data into a Cell ............................................................................. 86
Row and Column Label Bars ........................................................................ 86
Selecting a Column or Row Dividing Line ...................................................... 86
Active Cell................................................................................................. 87

iv
Table of Contents

Opening Data Files ........................................................................................ 89


Pasting Data ............................................................................................. 90
Paste Special ............................................................................................. 90
Importing Worksheets into Existing Files....................................................... 91
Data Import Options .................................................................................. 92
Importing Databases .................................................................................. 95
Edit Menu Commands .................................................................................... 96
Clear ........................................................................................................ 96
Insert ....................................................................................................... 96
Delete ...................................................................................................... 97
Find and Replace ....................................................................................... 97
Find Next ................................................................................................. 101
Track Cursor ............................................................................................ 101
Format Menu ............................................................................................... 104
Cell Properties .......................................................................................... 104
Column Width .......................................................................................... 106
Row Height .............................................................................................. 107
Data Menu .................................................................................................. 108
Sort ........................................................................................................ 108
Transform ................................................................................................ 110
Spatial Filter ............................................................................................ 114
Statistics ................................................................................................. 117
Assign XYZ Columns.................................................................................. 125
Assign Coordinate System.......................................................................... 126
New Projected Coordinates ........................................................................ 126
Saving Data Files ......................................................................................... 128
Save As Dialog ......................................................................................... 128
Use Caution when Saving Excel Files! .......................................................... 129
Page Setup ................................................................................................. 130
Page Tab ................................................................................................. 130
Margins Tab ............................................................................................. 131

v
Surfer

Options Tab ............................................................................................. 133


Print ........................................................................................................... 134
The Print Dialog ........................................................................................ 134
Worksheet Specifications .............................................................................. 136
Calculating the Memory Needed.................................................................. 136

Chapter 4 - Creating Grid Files


Introduction to Grid Files .............................................................................. 137
Creating a Grid File ...................................................................................... 138
A Gridding Example................................................................................... 138
The Grid Data Dialog ................................................................................. 139
Cross Validate ............................................................................................. 146
The Cross Validation Process ...................................................................... 147
Using Cross Validation ............................................................................... 147
The Cross Validation Dialog ........................................................................ 148
Cross Validation References ....................................................................... 150
General Gridding Options .............................................................................. 150
Search..................................................................................................... 150
Anisotropy ............................................................................................... 155
Breaklines and Faults ................................................................................ 157
Choosing Gridding Methods ........................................................................... 161
General Gridding Recommendations ............................................................ 161
Choosing Methods Based on the Number of XYZ Data Points .......................... 166
Exact and Smoothing Interpolators ............................................................. 167
Weighted Averaging .................................................................................. 168
Gridding Methods ......................................................................................... 169
Inverse Distance to a Power ....................................................................... 169
Kriging .................................................................................................... 172
Minimum Curvature .................................................................................. 177
Modified Shepard's Method ........................................................................ 181
Natural Neighbor ...................................................................................... 182

vi
Table of Contents

Nearest Neighbor ...................................................................................... 183


Polynomial Regression ............................................................................... 185
Radial Basis Function................................................................................. 186
Triangulation with Linear Interpolation ........................................................ 189
Moving Average ........................................................................................ 191
Data Metrics ............................................................................................. 192
Local Polynomial ....................................................................................... 198
Producing a Grid File from a Regular Array of XYZ Data .................................... 201
Gridding a Function ...................................................................................... 202

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

Suggested Reading ...................................................................................... 237

Chapter 6 - Contour Maps


Introduction to Contour Maps ........................................................................ 239
Creating a New Contour Map ......................................................................... 240
Overlaying a Contour Map onto another Map Layer .......................................... 241
Adding a Contour Map Layer to an Existing Map ............................................... 241
Editing an Existing Contour Map .................................................................... 241
Contour Map Properties ................................................................................ 242
The General Page ..................................................................................... 242
The Levels Page........................................................................................ 244
The Advanced Levels Dialog ....................................................................... 248
Specifying Contour Levels .......................................................................... 250
Drawing Contours ........................................................................................ 252
Smoothing Contours ..................................................................................... 253
Contour Lines .............................................................................................. 254
Line Properties ......................................................................................... 254
The Line Properties Dialog.......................................................................... 255
The Line Dialog......................................................................................... 256
Assigning Gradational Line Properties .......................................................... 258
Assigning the Same Line Properties to all Contour Levels ............................... 259
Setting Line Properties on a Frequency Basis ................................................ 260
Assigning Line Properties to Specific Contour Levels ...................................... 262
Index Contours......................................................................................... 263
Color Filled Contour Maps ............................................................................. 264
Contour Fill Properties .................................................................................. 265
The Fill Dialog .......................................................................................... 265
Assigning Color Fill Based on a Fill Spectrum ................................................ 266
Assigning Color Fill to Specific Contour Levels............................................... 267
Creating a Filled Contour Map Containing Blanked Areas ................................ 268
Displaying a Filled Contour Map without Contour Lines .................................. 268

viii
Table of Contents

Contour Labels ............................................................................................ 270


The Labels Dialog ..................................................................................... 271
Editing Contour Label Positions ................................................................... 272
Setting Label Properties on a Frequency Basis .............................................. 274
Removing All Labels .................................................................................. 275
Hachures .................................................................................................... 275
The Hachures Dialog ................................................................................. 276
Setting Hachures on a Frequency Basis ....................................................... 277
Masking Portions of a Contour Map with a Base Map......................................... 278
Exporting Contours ...................................................................................... 280
Exporting 3D Contour Lines ........................................................................ 280

Chapter 7 - Base Maps


Introduction to Base Maps............................................................................. 281
Creating a Base Map .................................................................................... 282
Adding a Base Map Layer to an Existing Map ................................................... 282
Editing an Existing Base Map ......................................................................... 282
Empty Base Map .......................................................................................... 282
The Base Map Limits Dialog........................................................................ 283
Base Map Properties ..................................................................................... 283
Base Map Page ......................................................................................... 284
Changing Properties in a Base Map................................................................. 286
Changing Properties of Individual Objects .................................................... 286
Changing Properties of Multiple Objects ....................................................... 287
Info Page ................................................................................................. 287
Boundary Maps ............................................................................................ 289
Object Properties ...................................................................................... 289
Object Boundaries..................................................................................... 290
ASCII Files ............................................................................................... 290
Placing Boundaries on Other Maps ................................................................. 290
Coordinates.............................................................................................. 290

ix
Surfer

Limits and Scale ....................................................................................... 291


Adding a Boundary Base Map to Another Map............................................... 291
Assigning Coordinates to an Image Base Map .................................................. 291
Loading Image Files as a Base Map ............................................................. 293

Chapter 8 - Post Maps


Introduction to Post Maps ............................................................................. 295
Creating a Post Map or Classed Post Map ........................................................ 297
Editing an Existing Post Map or Classed Post Map............................................. 297
Adding a Post or Classed Post Map to an Existing Map ...................................... 298
Data Files Used for Posting ............................................................................ 298
XY Coordinates in the Data File ................................................................... 299
Z Values in the Data File ............................................................................ 299
Data Labels in the Data File ....................................................................... 300
Symbol Specifications in the Data File ......................................................... 300
Updating Post Map and Classed Post Map Data Files ...................................... 301
Post Map and Classed Post Map Properties ...................................................... 302
General Page – Post Map ........................................................................... 302
Proportional Scaling .................................................................................. 305
General Page – Classed Post Map................................................................ 308
Labels Page.............................................................................................. 310
Editing Post Labels .................................................................................... 314
Classes Page ............................................................................................ 315
Classed Post Map Legends ............................................................................ 318
Editing Legend Properties .......................................................................... 318

Chapter 9 - Image Maps


Introduction to Image Maps .......................................................................... 323
Creating a New Image Map ........................................................................... 323
Overlaying an Image Map onto another Map Layer ........................................... 324
Adding an Image Map Layer to an Existing Map ............................................... 324

x
Table of Contents

Editing an Image Map................................................................................... 324


Image Map Properties................................................................................... 325
General Page............................................................................................ 325

Chapter 10 - Shaded Relief Maps


Introduction to Shaded Relief Maps ................................................................ 329
Creating a Shaded Relief Map ........................................................................ 330
Overlaying a Shaded Relief Map onto Another Map Layer .................................. 330
Adding a Shaded Relief Map Layer to an Existing Map....................................... 330
Editing an Existing Shaded Relief Map ............................................................ 331
Shaded Relief Map Properties ........................................................................ 331
General Page............................................................................................ 331
Shaded Relief References .............................................................................. 335

Chapter 11 - Vector Maps


Introduction to Vector Maps .......................................................................... 337
1-Grid Vector Map..................................................................................... 337
2-Grid Vector Map..................................................................................... 338
Creating a New Vector Map ........................................................................... 338
Overlaying a Vector Map onto another Map Layer............................................. 339
Adding a Vector Map Layer to an Existing Map ................................................. 339
Editing a Vector Map .................................................................................... 340
Vector Map Properties .................................................................................. 340
Data Page - 1-Grid Vector Map ................................................................... 340
Data Page - 2-Grid Vector Map ................................................................... 341
Symbol Page ............................................................................................ 344
Scaling Page ............................................................................................ 347
Vector Length Legend................................................................................... 350
Creating a Vector Length Legend ................................................................ 350
Editing the Vector Length Legend................................................................ 351
Clipping Symbols on Vector Maps ................................................................... 353

xi
Surfer

Two-Grid Vector Map Data ............................................................................ 354


Cartesian Data ......................................................................................... 354
Polar Data................................................................................................ 356

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

Overlays Page .......................................................................................... 382


Fill and Line Properties .............................................................................. 383
Setting the 3D Surface Map Base Properties .................................................... 385
3D Surface Tips ........................................................................................... 385

Chapter 14 - Common Map Properties


Introduction to Common Map Properties ......................................................... 387
Editing Map Properties .................................................................................. 388
Map Properties ............................................................................................ 389
View Page ................................................................................................ 389
Scale Page ............................................................................................... 392
Using Different Scaling in the X and Y Dimensions ........................................ 394
Using Scaling to Minimize Distortion on Latitude/Longitude Maps .................... 394
Limits Page .............................................................................................. 397
Target Coordinate System.......................................................................... 402

Chapter 15 - Coordinate Systems


Introduction to Coordinate Systems ............................................................... 403
Map Coordinate System Overview .................................................................. 403
Source Coordinate System - Map Layer .......................................................... 404
Target Coordinate System - Map.................................................................... 406
Displaying Data with Different Coordinate Systems in a Single Map .................... 407
Notes ...................................................................................................... 408
Assign Coordinate System............................................................................. 409
Assign Coordinate System Dialog ................................................................ 409
Modify Coordinate System ......................................................................... 411
Define Coordinate System Dialog ................................................................ 412
Map Projection............................................................................................. 414
Ellipsoids ................................................................................................. 415
Datums ................................................................................................... 416
Custom Datum Definition ........................................................................... 417

xiii
Surfer

Understanding Local Datums ...................................................................... 419


Types of Projections .................................................................................. 420
Characteristics of Projections...................................................................... 422
Predefined Coordinate Systems in Surfer ........................................................ 424
Geographic (lat/long) Coordinate Systems ................................................... 424
Polar/Arctic/Antarctic Projection Systems ..................................................... 424
Regional/National Projection Systems .......................................................... 425
State Plane Coordinate Systems ................................................................. 425
UTM Coordinate Systems ........................................................................... 425
World Projection Systems .......................................................................... 425
Supported Projections .................................................................................. 426
Albers Equal Area Conic Projection .............................................................. 426
Azimuthal Equidistant Projection ................................................................. 428
Bonne Projection ...................................................................................... 429
Cassini Projection ..................................................................................... 431
Eckert IV Projection .................................................................................. 432
Eckert VI Projection .................................................................................. 433
Equidistant Conic Projection ....................................................................... 434
Equidistant Cylindrical Projection ................................................................ 435
Geographic Coordinate System ................................................................... 436
Gnomonic Projection ................................................................................. 437
Hotine Oblique Mercator Projection, 1-Point with Azimuth .............................. 439
Hotine Oblique Mercator Projection, 2-Point ................................................. 441
Lambert Azimuthal Equal Area Projection ..................................................... 443
Lambert Conformal Conic Projection ............................................................ 444
Mercator Projection ................................................................................... 445
Miller Cylindrical Projection ........................................................................ 447
Mollweide Projection.................................................................................. 448
Oblique Mercator Projection ....................................................................... 449
Orthographic Projection ............................................................................. 450
Polyconic Projection .................................................................................. 451

xiv
Table of Contents

Robinson and Robinson-Sterling Projections ................................................. 452


Sinusoidal Projection ................................................................................. 454
Stereographic Projection ............................................................................ 455
State Plane Coordinate System Projections .................................................. 457
Transverse Mercator Projection ................................................................... 458
Universal Transverse Mercator (UTM) Projections .......................................... 459
Van der Grinten Projection ......................................................................... 460
Golden Software Reference Files .................................................................... 461
Latitude and Longitude Coordinates................................................................ 462
Latitude ................................................................................................... 463
Longitude ................................................................................................ 463
Latitude and Longitude in Decimal Degrees .................................................. 463
Example .................................................................................................. 464
Digitize ....................................................................................................... 464
The Digitized Coordinates Window .............................................................. 465
Digitizing Information from a Map ............................................................... 466
Creating a Blanking File with the Digitize Command ...................................... 467
Projection References ................................................................................... 468

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

Scaling Page ............................................................................................ 476


Setting the Axis Scale................................................................................ 479
Grid Lines Page ........................................................................................ 479
Drawing a Grid Covering a Map .................................................................. 480

Chapter 17 - Adding Color to Maps


Introduction to Color Spectrums .................................................................... 481
Opening the Colormap Dialog ........................................................................ 481
Contour Maps ........................................................................................... 481
Image and Shaded Relief Maps ................................................................... 482
Vector Maps ............................................................................................. 483
3D Surface Maps ...................................................................................... 483
The Colormap Dialog .................................................................................... 483
Anchor Nodes ........................................................................................... 486
Using Color Spectrums in Map Series.............................................................. 488
Example .................................................................................................. 488
Know Your Data........................................................................................ 488
Creating a Color Spectrum File ................................................................... 489
Using the Color Spectrum File in Other Maps ................................................ 490
Level Files ................................................................................................... 490
Level Files for Contour Maps....................................................................... 490
Creating Level Files from Contour Map Properties.......................................... 491
Using Level Files with a Contour Map........................................................... 491
Level Files for Wireframes .......................................................................... 491
Creating Level Files from Wireframe Properties ............................................. 492
Using Level Files with a Wireframe Map ....................................................... 492
Creating Level Files in the Worksheet .......................................................... 493

Chapter 18 - Positioning and Overlaying Maps


Introduction to Map Layers............................................................................ 495
Using Map Layers......................................................................................... 496

xvi
Table of Contents

Overlay Maps .............................................................................................. 496


Map Layers .............................................................................................. 497
Map Layer Limits ...................................................................................... 497
Adding Map Layers.................................................................................... 498
Editing a Map Layer .................................................................................. 498
Hiding a Map Layer ................................................................................... 498
Removing a Map Layer .............................................................................. 498
Deleting a Map Layer................................................................................. 498
Deleting Empty Map Layers ........................................................................ 498
Layers and 3D Wireframes ......................................................................... 499
Layers and 3D Surfaces ............................................................................. 499
Layer Exceptions ...................................................................................... 499
Adding a Map Layer to an Existing Map Frame ................................................. 499
Overlaying Two Existing Map Layers ............................................................... 500
Combining Two Existing Map Layers in the Object Manager ............................... 500
Resize Objects ............................................................................................. 502
Stacking Maps ............................................................................................. 502
Stacking a Contour Map over a 3D Surface Map............................................ 503
Creating Several Maps in the Same Plot Window .............................................. 504
Placing Several Completed Maps in the Same Plot Window ................................ 504
Aligning Several Maps on the Same Page ........................................................ 505

Chapter 19 - Grid Operations


Introduction to Grid Operations ..................................................................... 507
Math ....................................................................................................... 507
Calculus................................................................................................... 507
Filter ....................................................................................................... 507
Spline Smooth .......................................................................................... 507
Blank ...................................................................................................... 508
Convert ................................................................................................... 508
Extract .................................................................................................... 508

xvii
Surfer

Transform ................................................................................................ 508


Mosaic ..................................................................................................... 508
Volume .................................................................................................... 508
Slice........................................................................................................ 508
Residuals ................................................................................................. 508
Grid Node Editor ....................................................................................... 508
Assign Coordinate System.......................................................................... 509
Grid Info .................................................................................................. 509
Filtering Grid Files ........................................................................................ 509
Grid Filter ................................................................................................ 509
The Digital Filtering Dialog ......................................................................... 510
Linear Convolution Filters........................................................................... 512
Edge of Grid ............................................................................................. 517
Grid Filter References ................................................................................ 519
Grid Spline Smooth ...................................................................................... 520
Expanding a Grid ...................................................................................... 521
Recalculating a Grid .................................................................................. 523
The Spline Smooth Dialog .......................................................................... 524
Grid Mosaic ................................................................................................. 526
Grid Mosaic Dialog .................................................................................... 526
Combining (Mosaic) Grids .......................................................................... 529
Mosaic Tips .............................................................................................. 529
Resample Methods .................................................................................... 529
Blanking a Grid File ...................................................................................... 530
Blanking Areas within a Grid ...................................................................... 533
Blanking Outside Multiple Polygons ............................................................. 534
The Grid Node Editor .................................................................................... 537
The Options Menu ..................................................................................... 538
Using the Grid Node Editor ......................................................................... 539
Grid Convert ............................................................................................... 540
Grid Extract................................................................................................. 540

xviii
Table of Contents

The Extract Grid Dialog.............................................................................. 541


Extracting a Subset of an Existing Grid File .................................................. 542
Grid Transform ............................................................................................ 542
The Grid Transform Dialog ......................................................................... 542
Transforming a Grid File ............................................................................ 545
Grid Math.................................................................................................... 546
The Grid Math Dialog ................................................................................. 546
Using the Grid | Math command ................................................................. 548
Using the Grid Math Command to Generate an Isopach Map........................... 549
Using the Grid Math Command to Eliminate Negative Values from a Grid File ... 549
Grid Calculus ............................................................................................... 550
The Grid Calculus Dialog ............................................................................ 552
Using Grid Calculus ................................................................................... 553
Directional Derivatives............................................................................... 553
Terrain Modeling ....................................................................................... 559
Differential and Integral Operators .............................................................. 565
Fourier and Spectral Analysis ..................................................................... 569
Grid Operations References ........................................................................... 573

Chapter 20 - Volumes, Areas, Cross Sections, and


Residuals
Introduction to Volumes, Areas, Cross Sections, and Residuals .......................... 575
Volumes and Areas ...................................................................................... 575
Volume Accuracy ...................................................................................... 576
Calculating Volumes and Areas ................................................................... 577
Grid Volume Dialog ................................................................................... 578
Grid Volume Report................................................................................... 579
Extended Trapezoidal Rule ......................................................................... 582
Extended Simpson's Rule ........................................................................... 583
Extended Simpson's 3/8 Rule ..................................................................... 583
Planar Area Calculations ............................................................................ 583

xix
Surfer

Surface Area Calculations .......................................................................... 584


Calculating the Volume of a Lake ................................................................ 585
Calculating the Volume of a Blanked Grid ..................................................... 586
Calculating the Volume between Two Surfaces ............................................. 586
Volume Reference ..................................................................................... 587
Cross Sections ............................................................................................. 587
The Grid Slice Dialog ................................................................................. 588
To Create a Data File Containing Cross Section Data ..................................... 590
Residuals .................................................................................................... 592
The Grid Residuals Dialog .......................................................................... 593
Calculating Residuals ................................................................................. 593
Calculating the Agreement between a Grid and the Original Data File .............. 594
Calculating the Z Value of the Surface at a Point ........................................... 594

Chapter 21 - Importing and Exporting Maps and Graphics


Introduction to Importing and Exporting ......................................................... 597
Importing Plot Documents............................................................................. 597
The Import Dialog ..................................................................................... 597
Import Format Types ................................................................................ 599
Importing Worksheet Documents ................................................................... 600
The Merge Dialog ...................................................................................... 600
Importing Databases .................................................................................... 603
Exporting Files ............................................................................................. 604
The Export Dialog ..................................................................................... 604
Export Format Types ................................................................................. 606
Exporting Contours ...................................................................................... 607

Chapter 22 - Creating, Editing and Viewing Objects


Introduction to Surfer Objects ....................................................................... 609
Creating Objects .......................................................................................... 609
Text ........................................................................................................ 610

xx
Table of Contents

Polygon ................................................................................................... 611


Polyline ................................................................................................... 612
Symbol .................................................................................................... 613
Rectangle ................................................................................................ 614
Rounded Rectangle ................................................................................... 615
Ellipse ..................................................................................................... 616
Spline Polyline .......................................................................................... 617
Reshape .................................................................................................. 618
Selecting Objects ......................................................................................... 622
Procedures for Selecting Objects................................................................. 622
Block Select ............................................................................................. 623
Deselecting Objects................................................................................... 623
Object Properties ......................................................................................... 624
Text and Font Properties ............................................................................ 624
Fill Properties ........................................................................................... 627
Line Properties ......................................................................................... 630
Symbol Properties ..................................................................................... 632
Metafile Properties .................................................................................... 634
Label Formats .......................................................................................... 635
Reload Map Data.......................................................................................... 637
Unable to Locate ....................................................................................... 637
Updating a Single Map Layer ...................................................................... 637
Trackball ..................................................................................................... 638
Tilt and Rotation ....................................................................................... 638
Field of View ............................................................................................ 638
Exit Trackball Mode ................................................................................... 638
Modifying the Map Orientation .................................................................... 638
Arranging Objects ........................................................................................ 639
Ordering Objects ...................................................................................... 639
Aligning Objects ....................................................................................... 642
Grouping and Ungrouping Objects............................................................... 643

xxi
Surfer

Rotating Objects ....................................................................................... 644


Transforming Objects ................................................................................ 645
Viewing Objects ........................................................................................... 646
Fit to Window ........................................................................................... 647
Page ....................................................................................................... 647
Zoom In .................................................................................................. 647
Zoom Out ................................................................................................ 648
Zoom Rectangle ....................................................................................... 648
Zoom Selected ......................................................................................... 649
Zoom Realtime ......................................................................................... 649
Actual Size ............................................................................................... 650
Full Screen ............................................................................................... 650
Pan ......................................................................................................... 650
Redraw and Auto Redraw........................................................................... 651
Rulers and Drawing Grid ............................................................................ 651
Toolbars .................................................................................................. 652
Status Bar ............................................................................................... 653
Object Manager ........................................................................................... 654
Opening and Closing the Object Manager ..................................................... 654
Auto Hide the Object Manager .................................................................... 654
Changing the Object Manager Location - Floating vs. Docking ........................ 655
Object Manager Tree ................................................................................. 655
Arranging Objects Using Object Manager ..................................................... 656
Object Visibility in Object Manger................................................................ 656
Opening Object Properties ......................................................................... 656
Selecting Objects ...................................................................................... 657
Scroll in Object Manager ............................................................................ 657
Property Manager ........................................................................................ 657
Expand and Collapse Features .................................................................... 657
Changing Properties .................................................................................. 658
Applying Property Manager Changes ........................................................... 658

xxii
Table of Contents

Property Defaults ...................................................................................... 658


Property Manager Information Area ............................................................ 659
Reset Windows ............................................................................................ 659

Chapter 23 - Options and Preferences


Introduction to Options ................................................................................. 661
General ................................................................................................... 661
Environment ............................................................................................ 661
Advanced................................................................................................. 661
The Options Dialog ....................................................................................... 662
General Page............................................................................................ 662
Gridding Page........................................................................................... 665
Updates Page ........................................................................................... 666
User Interface Page................................................................................... 667
Drawing Page ........................................................................................... 668
Default Attributes Page.............................................................................. 670
Rulers and Grid Page ................................................................................. 672
Advanced Page ......................................................................................... 673
Customize ................................................................................................... 676
Customize Commands ............................................................................... 676
Customize Toolbars ................................................................................... 678
Customize Keyboard ................................................................................. 679
Customize Menu ....................................................................................... 680
Additional Customization ........................................................................... 682
The Edit Button Image Dialog ..................................................................... 684
Formats for Attribute Values.......................................................................... 685
Color Syntax ............................................................................................ 685
Line Property Syntax ................................................................................. 686
Fill Property Syntax................................................................................... 687
Font Property Syntax ................................................................................ 688
Symbol Property Syntax ............................................................................ 688

xxiii
Surfer

Numeric Label Property Syntax................................................................... 689


Using Custom Setting Files ............................................................................ 690
Use the Custom .SET File ........................................................................... 691
Using Old .SET Files .................................................................................. 691

Chapter 24 - Automating Surfer


Introduction to Scripter ................................................................................ 693
Starting the Scripter Program ........................................................................ 694
Scripter Windows ......................................................................................... 694
Working with Scripts .................................................................................... 696
New Scripts.............................................................................................. 696
New Modules ............................................................................................ 696
Existing Scripts and Modules ...................................................................... 696
Saving Scripts .......................................................................................... 696
Closing Scripts ......................................................................................... 696
Visual BASIC Compatibility ............................................................................ 697
Using Scripter.............................................................................................. 698
Example Script Files .................................................................................. 698
Using Scripter Help ...................................................................................... 698
Writing Scripts ............................................................................................. 699
Suggested Reading - Scripter ........................................................................ 700
Scripter BASIC Language .............................................................................. 701
Program Statements ................................................................................. 701
Line Continuation ...................................................................................... 701
Comments ............................................................................................... 702
Double Quotes and Text ............................................................................ 702
Operators ................................................................................................ 702
Flow Control ............................................................................................. 702
Optional Arguments and Named Arguments ................................................. 704
Subroutines and Functions ......................................................................... 705
Using Surfer Objects .................................................................................... 708

xxiv
Table of Contents

Code, Class, and Object Modules ................................................................ 709


Type Library References ............................................................................ 713
The Object Browser................................................................................... 713
Variables .................................................................................................... 715
Object Variables ....................................................................................... 716
Array Variables ......................................................................................... 717
User-Defined Types ................................................................................... 717
Global Variables........................................................................................ 718
Coordinate Arrays ..................................................................................... 718
Getting User Input ....................................................................................... 719
Creating Dialogs ....................................................................................... 720
UserDialog Example .................................................................................. 723
Running Scripts ........................................................................................... 724
Running Scripts in Scripter ......................................................................... 724
Running Scripts from the Command Line ..................................................... 725
Debugging Scripts..................................................................................... 726
Surfer Object Model ..................................................................................... 730
Accessing Surfer ....................................................................................... 730
Object Hierarchy....................................................................................... 730
Object Hierarchy - MapFrame ..................................................................... 731
Methods and Properties ............................................................................. 732
Collections ............................................................................................... 733
Object Model Chart ................................................................................... 734
A Brief Introduction to the Major Surfer Objects ........................................... 734
Derived Objects ........................................................................................ 740
Using Collection Objects ............................................................................ 741
Parent and Application Properties ................................................................ 742
PlotWindow, WksWindow, and GridWindow Objects ....................................... 743
Using Surfer Objects ................................................................................. 743
Automation Examples ................................................................................... 744
Creating and Printing a Contour Map ........................................................... 745

xxv
Surfer

Opening, Saving, and Closing Documents .................................................... 746


Creating a Variogram with Scripter ............................................................. 747
Overlaying Maps with Automation ............................................................... 749
Modifying Axes ......................................................................................... 750

Appendix A - Mathematical Functions


Introduction to Mathematical Functions .......................................................... 753
Order of Operations ..................................................................................... 753
Data Types .............................................................................................. 754
Variable Names ........................................................................................ 754
Mathematical Functions ................................................................................ 754
Trigonometric Functions ............................................................................ 754
Bessel Functions ....................................................................................... 755
Miscellaneous Functions ............................................................................. 755
Statistical Functions of Intervals ................................................................. 756
String Comparison .................................................................................... 757
Boolean Expressions ..................................................................................... 759
Logical Operators (and, or, xor, not) ........................................................... 759
Comparison Operators (=, <>, <, >, <=, >=) ............................................. 759
IF Function - IF(condition, true_value, false_value) ....................................... 760

Appendix B - Math Text Instructions


Introduction to Math Text Instructions ............................................................ 763
Math Text Instruction Syntax ........................................................................ 763
Encapsulate Math Text Instruction .............................................................. 764
Percentage Instructions ............................................................................. 764
Instructions that Change Typefaces, Sizes, and Styles ................................... 764
Instructions that Change Text Color ............................................................ 765
Instructions that Change Text Position......................................................... 765
Instructions Used to Insert Special Characters or Date and Time .................... 766
Examples of Math Text Instructions ................................................................ 767

xxvi
Table of Contents

Appendix C - File Formats


Introduction to File Formats .......................................................................... 769
File Format Chart ......................................................................................... 769
Surfer 6 Text Grid Format ............................................................................. 775
Level File Format ......................................................................................... 777
LVL Format 1 ........................................................................................... 777
LVL Format 2 ........................................................................................... 777
LVL Format 3 ........................................................................................... 778
Color Spectrum File Format ........................................................................... 780

Appendix D - Line Styles, Fill Patterns, and Colors


Line Styles .................................................................................................. 783
Fill Patterns ................................................................................................. 783
Stock Windows Patterns ............................................................................ 783
Image Patterns......................................................................................... 784
Color List .................................................................................................... 787
Color Names ............................................................................................ 788

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.

An extensive suite of gridding methods is available in Surfer. The variety of available


methods provides different interpretations of your data, and allows you to choose the
most appropriate method for your needs. In addition, data metrics allow you to gather
information about your gridded data. Surface area, projected planar area, and
volumetric calculations can be performed quickly in Surfer. Cross-sectional profiles
can also be computed and exported.

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

Who Uses Surfer?


People from many different disciplines use Surfer. Since 1984, over 100,000 scientists
and engineers worldwide have discovered Surfer’s power and simplicity. Surfer’s
outstanding gridding and contouring capabilities have made Surfer the software of
choice for working with XYZ data. Over the years, Surfer users have included
hydrologists, engineers, geologists, archeologists, oceanographers, biologists,
foresters, geophysicists, medical researchers, climatologists, educators, students, and
more! Anyone wanting to visualize their XYZ data with striking clarity and accuracy will
benefit from Surfer’s powerful features.

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.

Drawing and Digitizing Features


• New spline polyline drawing tool creates smooth lines between polyline points.
• Digitize X, Y, and Z values using the Map | Digitize command.
• Set number of digits and numeric format for digitized values in Map | Digitize
dialog.

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.

To install Surfer from a download:


1. Download Surfer according to the directions you received.

4
Chapter 1 - Introducing Surfer

2. Double-click on the downloaded file to begin the installation process.

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.

Normally, no new features are added in updates. A list of changes is located at


www.GoldenSoftware.com/surferhistory.shtml.

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.

Check for Internet Update


• Click the Help | Check for Update command, the Internet Update dialog
appears. If you are running in Windows Vista or 7 as a user, a dialog appears
asking for Administrator permissions. Click the Allow button.
• Click the Next button to proceed. Surfer will attempt to connect to the Golden
Software server and check if an update exists for your version of the product.
• If no update exists and/or you are already running the latest version, a dialog will
appear letting you know there are no updates for your current version of Surfer.
Click the OK button and the Internet Update program will exit.
• If an update is available, the dialog will inform you about the specifics of the
update and allow you to click the Cancel button should you decide not to download
the update at this time. It is highly advised that updates be installed when
available as updates contain corrections to known issues in the software.
• Click the Next button to download the update file. A progress gauge displays.
• When the download is finished, the Install Updates dialog will appear.
• Exit the Surfer program and click the Install button to proceed with the update.

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.

If you must go through a proxy server, follow the steps below:


1. Click the Help | Check for Update command.
2. In the Internet Update dialog, click the Advanced button.
3. Select the Specify proxy server information option.
4. Enter the address and port number of the appropriate proxy server in the Proxy
Server and Port Number boxes.
5. Click OK to return to the Internet Update dialog.
6. Proceed as described above.
7. If you are prompted for a user name and password, enter the ones assigned to
you by your network administrator. If your user name and password aren't
validated, you will be prompted to enter them again. If, after several tries, you are
still unable to connect to the Golden Software server, recheck with your network
administrator that the proxy server address, port number, user name and
password are correct. If you are still unable connect, contact Golden Software
technical support at [email protected].

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].

A Note about the Documentation


The Surfer documentation includes this full length guide, a quick start guide, and the
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. In the event the information you need cannot be located in this full length
guide, in the quick start guide, or in the online help, other sources of Surfer help
include our support forum, knowledge base, FAQs, and contacting our technical
support engineers.

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

Surfer User Interface


Surfer contains three document window types: the plot document, worksheet
document, and grid node editor. Maps are created and displayed in the plot document.
The worksheet document displays, edits, transforms, and saves data in a tabular
format. The grid node editor displays and edits Z values for the selected grid.

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.

Component Component Function


Name

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.

The status bar also indicates the progress of a procedure, such as


gridding. The percent of completion and time remaining will be
displayed.

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

Grid Node Editor


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.

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

Changing the Window Layout


The windows, toolbars, managers, and menu bar display in a docked view by default;
however, they can also be displayed as floating windows. The visibility, size, and
position of each item may also be changed. Refer to the Changing the Windows Layout
topic in the online help for more information on layout options.

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.

Customizing Toolbars and Buttons


You may customize Surfer’s toolbars and menus by clicking the Tools | Customize
command. This is useful to create custom toolbars, rearrange menus, menu
commands, and toolbar buttons. You can display image, text, or image and text
depending on your preference. You can also create a new button appearance for a
command.

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.

Example Surfer Files


To see example Surfer files:
1. Open Surfer.
2. Click the File | Open command and click on an .SRF file located in the Samples
folder. By default, the Surfer installation folder
is located in C:\Program Files\Golden
Software\Surfer 10\Samples.

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.

The contour layer is partially transparent and


shows a contamination site.

The base map layer is an aerial photograph that


displays the area below the contamination. The
map layers are overlaid onto the same set of
axes. The Transparent.srf file shows a
partially transparent contour layer
overlaid onto an aerial phtograph.
Using Surfer
The general steps to progress from a XYZ data set to a finished, grid-based map are
as follows:
1. Create a XYZ data file. This file can be created in a Surfer worksheet window or
outside of Surfer (using an ASCII text editor or Excel, for example).
2. Create a grid .GRD file from the XYZ data file using the Grid | Data command.
3. To create a map, click the Map | New command, select a map type, and use the
grid file from step two. Grid-based maps include contour, image, shaded relief,
vector, 3D wireframe, and 3D surface maps.
4. Click on the map to display the map properties in the Property Manager where
you can customize the map to fit your needs.
5. Click the File | Save command to save the project as a Surfer .SRF file which
contains all of the information needed to recreate the map.

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

Example Scripter Files


To run a sample script:
1. Open Scripter by navigating to the installation folder, C:\Program Files\Golden
Software\Surfer 10\Scripter. Double-click on the Scripter.exe application file.
2. Click the File | Open command and select a sample script .BAS file in the
C:\Program Files\Golden Software\Surfer 10\Samples\Scripts folder.
3. Click the Script | Run command and the script is executed.
4. Most sample scripts will open Surfer and display a map in the plot window.

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

Post Map and Classed Post Map


Post maps and classed post maps show data locations on a
map. You can customize the symbols and text associated
with each data location on the map. Classed post maps
allow you to specify classes and change symbol properties
for each class. Classes can be saved and loaded for future
maps. Refer to Chapter 8 – Post Maps for more
information.

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.

Shaded Relief Map


Shaded relief maps are raster images based on grid files.
Shaded relief maps assign colors based on slope orientation
relative to a light source. 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. Refer to
Chapter 10 – Shaded Relief 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.

Refer to Chapter 18 for information about map layers.

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.

A local coordinate system is considered unreferenced by Surfer. A local system has a


location that begins numbering at an arbitrary location and increments numbers from
this location. This is frequently referred to as a Cartesian coordinate system. Most
maps are created in local coordinate systems. In these cases, you can ignore the
options on the Coordinate System tab in the Property Manager, as long as all map
layers contain the same X and Y coordinates.

A geographic coordinate system uses a spherical surface to define locations on the


earth. Geographic coordinate systems are commonly called unprojected lat/long.
Surfer has several predefined geographic coordinate systems available. Each system
has a different datum. The same latitude and longitude value will plot in different
locations depending on the datum.

A projected coordinate system consists of a projection and a datum. Each projection


distorts some portion of the map, based on the ellipsoid and datum specified.
Coordinates can be lat/long, meters, feet, or other units. Different projections cause
different types of distortion.

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.

Source Coordinate System - Map Layer


Maps can be created from data, grids, or base map files in any coordinate system. The
Source Coordinate System is the coordinate system for the data, grid, or base map file
used to create the map layer. Each map layer can reference a different projection and
datum. When a map layer has a source coordinate system different than what you
want the map to display, the map is converted to the map’s Target 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.

Target Coordinate System - Map


Maps can be displayed in any coordinate system. The map is displayed in the
coordinate system defined as the Target Coordinate System. A coordinate system
normally has a defined projection and datum. When a map layer uses a different
source coordinate system than the map’s target coordinate system, the map layer is
converted to the map’s Target Coordinate System. The map’s Target Coordinate
System is the coordinate system in which you want to display your map.

Refer to Chapter 15 for more information on coordinate systems.

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.

Context Sensitive Help


Surfer contains context sensitive help for help on menu commands, dialogs, buttons,
and screen regions. To obtain context sensitive help for an item, click on the item and

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.

Frequently Asked Questions


Use the Help | Golden Software on the Web | Frequently Asked Questions
command to access the most current Surfer FAQs. Open a connection to the Internet
before selecting this command. The frequently asked questions page is located at
www.GoldenSoftware.com/faq.shtml.

21
Surfer

Golden Software User Forums


The online forums are located on the Golden Software website. The forums are
moderated by Golden Software, but also allow peer interaction. Once you create a free
user name, you can post new questions, or comment on current questions or
discussion. No question goes unanswered.

Find answers to your technical questions and interact with our technical support staff
and fellow Golden Software users through the online Surfer forum.

The forums are located at www.GoldenSoftware.com/forum/.

Golden Software Knowledge Base


The knowledge base is a repository of constantly updated product frequently asked
questions, troubleshooting suggestions, program tips, and common procedures.

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/.

Golden Software Technical Support


Golden Software’s technical support is free to registered users of Golden Software
products. Our technical support staff is trained to help you find answers to your
questions quickly and accurately. We are happy to answer all of your questions about
any of our products, both before and after your purchase. We also welcome
suggestions for improvements to our software and encourage you to contact us with
any ideas you may have for adding new features and capabilities to our programs.

Technical support is available Monday through Friday 8:00 AM to 5:00 PM Mountain


Time, excluding major United States holidays. We respond to email, phone, and fax
technical questions within one business day. When contacting us with your question,
have the following information available:
• Your Surfer serial number (located on the CD shipping cover or in Help | About
Surfer)
• Your Surfer version number, found in Help | About Surfer, including whether it
is the 32-bit or 64-bit version of Surfer
• The operating system you are using (i.e. Windows XP, Vista, or 7), including
whether it is 32-bit or 64-bit operating system

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/.

Golden Software Contact Information


The Golden Software mailing address, sales phone number, and technical support
phone number are listed by clicking the Help | About command. You can also use the
Help | Feedback command to contact technical support.

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

Introduction to the Tutorial


This tutorial is designed to introduce you to some of Surfer's features. We cannot
cover all aspects of the program in a tutorial, so this tutorial teaches the basics of
Surfer. After you have completed the tutorial, you should be able to begin creating
your own grids and maps.

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.

Basic Tutorial Lessons


The following is an overview of lessons included in the basic tutorial:
 Lesson 1 - Viewing and Creating Data shows you how to import a data file and
how to create a new data file.
 Lesson 2 - Creating a Grid File shows you how to create a grid file, the basis for
most map types in Surfer.
 Lesson 3 - Creating a Contour Map shows you how to create a contour map and
change the contour map properties.
 Lesson 4 - Modifying an Axis and Saving a Map shows you how to modify axis
properties and save your map to an .SRF file.
 Lesson 5 - Posting Data Points and Working with Map Layers shows you how to
add a post map layer to display data points on the contour map. Both maps will
share the same axes, limits, and scaling.
 Lesson 6 - Creating a 3D Surface Map shows you how to create a 3D surface map
and change the surface map properties.

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.

Advanced Tutorial Lessons


The following is an overview of lessons included in the advanced tutorial:

 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

Surfer Flow Chart


This flow chart illustrates the relationship between XYZ data files, grid files, contour
maps, and 3D surface maps. This flow chart can be applied to any grid based map
types. This example displays only two of the grid based maps (i.e. contour and 3D
surface).

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:

1. Create a XYZ data file. This file can be created in


a Surfer worksheet window or outside of Surfer
(using an ASCII text editor or Microsoft Excel, for
example).

2. To display the data points, click the Map | New |


Post Map command.
Start with irregular XYZ
data in three columns.
3. Create a grid file .GRD from the XYZ data file using
the Grid | Data command.

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.

5. Make any changes to the map. Click File |


Save to save the map as a Surfer file .SRF.

The post map layer shows the original


data points.The contour map layer
shows the grid based contour map.

28
Chapter 2 - Tutorial

Lesson 1 – Viewing and Creating Data

An XYZ data file is a file containing at least


three columns of data values. The first two
columns are the X and Y coordinates for the
data points. The third column is the Z value
assigned to the XY point. Although it is not
required, entering the X coordinate in column
A, the Y coordinate in column B, and the Z
value in column C is a good idea. Surfer looks
for these coordinates in these columns by
default. You can customize the default columns
for XYZ data with the Data | Assign XYZ
Columns worksheet command. Surfer requires
the use of decimal degree Latitude (Y) and A simple XYZ data file is displayed.
Longitude (X) values when using Latitude and Notice that the X, Y, and Z data
are placed in column A, B, and C.
Longitude values.

Opening an Existing Data File


To look at an example of an XYZ data
file, you can open TUTORWS.DAT in
a worksheet window:
1. Click the File | Open command,

click the button, or press


CTRL+O on the keyboard to open
the Open dialog.
2. If you are not in the SAMPLES
folder, browse to it. In the list of
files, click TUTORWS.DAT.
3. Click Open to display the file in
the worksheet window.
4. Notice that the X coordinate
(Easting) is in column A, the Y
coordinate (Northing) is in
column B, and the Z value
(Elevation) is in column C.
5. Although it is not required, the
header text (the text in row 1) is When a data file is displayed, the name of the file
is shown in the title bar and in the worksheet tab.
helpful in identifying the type of
In this file, row 1 contains descriptive information
data in the column, and this about each column of data.

29
Surfer

information is used in dialogs when selecting worksheet columns.


6. To edit any value, click in the cell to select it. Type information and the existing
value is overwritten. Data can be transformed, sorted, or filtered in this window.
After making changes to the worksheet, save the file by clicking the File | Save
command.

Creating a New Data File


The Surfer worksheet can also be used to create a new data file. To open a worksheet
window and begin entering data:
1. Click the File | New |
Worksheet command, click

the button, or press


CTRL+W on the keyboard. A
new empty worksheet window
is displayed.
2. The active cell is selected by
clicking on the cell or by using
the arrow keys to move
between cells. The active cell
is indicated by a heavy border
and the contents of the active
cell are displayed in the active
cell edit box. The active cell
location box shows the
location of the active cell in
the worksheet. Letters are the
column labels and numbers
are the row labels. Data is Data are entered into the active cell of the
entered into the active cell. worksheet. Click on the text "A1" or "Active Cell"
3. When a cell is active, enter a for the definition of the active cell, active cell
location, and the active cell edit box.
value or text, and the
information is displayed in both the active cell and the active cell edit box.
4. The BACKSPACE and DELETE keys can be used to edit data as you type.
5. Press the ENTER key and the data are entered into the cell. Press the ESC key to
cancel without entering the data.
6. To preserve the typed data in the active cell, move to a new cell. Move to a new
cell by clicking a new cell with the pointer, pressing one of the arrow keys, or
pressing ENTER.

30
Chapter 2 - Tutorial

Saving the Data File


When you have completed entering all of the data:

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.

Lesson 2 - Creating a Grid File


Grid files are required to produce a grid-based map. Grid-based maps include contour
maps, image maps, shaded relief maps, 1-grid vector maps, 2-grid vector maps, 3D
wireframes, and 3D surfaces.

Creating Grid Files


Grid files are created using the Grid | Data command. The Grid | Data command
requires data in three columns: one column containing X data, one column containing
Y data, and one column containing Z data. We have included a sample XYZ data file
(TUTORWS.DAT) with Surfer for you to see how to produce a grid file. After
completing the tutorial, if you need to produce an XYZ data file of your data for your
work, see Lesson 1 - Creating an XYZ Data File.

31
Surfer

To produce a grid file from TUTORWS.DAT:


1. If you have the worksheet window open, click on the Window menu and choose
Plot1, or click on the Plot1 tab. Alternatively, you can create a new plot window
with the File | New | Plot command.

Click on the Plot1 tab to return to the plot window.

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.

Lesson 3 - Creating a Contour Map


A contour map is a plot of three values. The first two dimensions are the X, Y
coordinates, and the third (Z) is represented by lines of equal value (the contour lines
on the map) across the map extents. The shape of the surface is shown by the contour
lines.

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.

Creating Contour Maps


The Map | New | Contour Map command creates a contour map based on a grid file.
To create a contour map of the TUTORWS.GRD file created in the previous lesson:

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

command, click the button, or press CTRL+D on the keyboard. Alternatively,


if you have a wheel mouse, roll the wheel forward to zoom in on the contour map.
Click and hold the wheel button straight down while you move the mouse to pan
around the screen.

Changing Contour Levels


After you create a contour map, you can easily modify any of the map features. For
example, you might want to change the contour levels displayed on the map.

To change the contour levels of the map you just created:


1. Place the cursor inside the limits of the contour map and click once to display the
contour map properties in the Property Manager.
2. In the Property Manager, click the Levels tab to display the contour levels and
contour line properties for the map. In this example, the contour levels begin at Z
= 20. This is displayed next to
Minimum contour. The Maximum
contour level is Z = 105. The
Contour interval, or the frequency of
contour lines, is five.
3. This means that a contour line will
be displayed every 5 Z units. We
should see contour lines at 20, 25,
30, 35, etc. up to 105.
4. To change the contour range and
interval, click in the box next to
Minimum contour, Maximum
contour, or Contour interval.
Highlight the existing value and
type a new value. The Data range of
the grid file is displayed at the top
of the Levels page, making
selecting an appropriate range
easier. For best results, select
values for Minimum contour and
Maximum contour that are in or near Go to the Levels page to display the
this Data range. contour level properties.

35
Surfer

5. Click in the Contour interval box and type


the value 10. The map automatically
updates to show contour lines every 10 Z
units. The minimum contour level is Z =
20, and the largest contour level is Z =
100.

Changing Contour Line Properties


You can set any of the options in the list on
the Levels page to customize the contour
map. The Major contour every value allows
the setting of two different line styles, the
major and minor contour lines, for the contour The contour map is redrawn using
map. The major contour lines are frequently new contour levels based on 10-
foot contour intervals.
referred to as index contour lines. Let's set two
different contour line properties.

Setting the Major Contour Value


1. Click in the box next to Major contour every. Highlight the existing value and type
in a new value of 3. Press ENTER on the keyboard and every third line an index
contour.
2. Click on the next to Major Contours, if it is not already open. Click on the
next to Line Properties in the Major Contours section. The major line properties
appear. Click the black color box next to Color. Select another color, such as red,
from the drop-down list. The map automatically updates.
3. Click in the box next to Width and
change the value to 0.030 inches. Thick
red lines now appear at the index
contours.
4. To set the line style for the minor lines,
click on the next to Minor Contours,
if it is not already open. Click on the
next to Line Properties in the Minor
Contours section. The minor line
properties appear.
5. Click the black color box next to Color.
Select another color, such as 80% gray,
from the drop-down list.
6. Click in the box next to Style and select a The contour map should look similar
dashed line from the drop-down list. to this example after changing the
major and minor line properties.

36
Chapter 2 - Tutorial

Dashed gray lines now appear at the minor contours.

Changing Contour Fill Properties


Color fill can be assigned to fill between contour lines by assigning a gradational color
spectrum between two colors, or by selecting one of the preset color spectrums.

To display contour fill:


1. Click once on the contour map to select it. The contour map properties are shown
in the Property Manager.
2. Click on the General tab. Check the box next to Fill contours. The contour map
automatically updates to display the default grayscale color fill between contours.

To change the color of the fill:


1. Click on the Levels tab. Click the color bar button next to Fill colors. A drop-down
list of colormaps appear. Click one of the preset colormaps, such as Rainbow, and
the map automatically updates to display the new colors.
2. If only a minimum and maximum color are desired, click the color bar next to Fill
contours. Click the Custom button at the bottom of the drop-down list. The
Colormap dialog appears.

Change the color spectrum properties in the Colormap dialog.

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.

The contour map is filled with a blue to white colormap


after adjustments are made in the Colormap dialog.

Setting Advanced Contour Level Properties


Contour map level properties can be set in the Simple manner, like was shown in the
previous two sections. Or, you can change more advanced items, such as each
individual contour line, by using the Advanced method.

To set advanced contour level properties for all levels:


1. Click once on the contour map to select it.
2. In the Property Manager, click on the Levels tab.
3. Change the Level method by clicking on the word Simple next to Level method and
selecting Advanced from the drop-down list.

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.

Click on one of the column header


buttons to make bulk changes.

6. Click on the Label button. The Labels dialog opens.


7. Change the First value to 2, the Set value to 1, and the Skip value to 2. This will
use the label format we are creating on the second label, skip the third and fourth
labels, and set the fifth label with the same format.
8. Click the Font button. The Font Properties dialog opens. Set the Size (points) to
12.
9. Set the Foreground color and opacity color to white. Click OK.
10. Click OK in the Labels dialog. Notice how the labels are changed in the
Properties dialog.
11. Click on the Hach button.
12. Set the First to 1, the Set to 1, and the Skip to 0.
13. Check the Hachure Closed Contours Only box.
14. Change the Direction to Uphill and click OK. This changes all of the items under
Hach to Yes. All closed contours will have hachure marks.
15. Click OK and the bulk changes are made to the contour map.

Bulk changes that can be made include:


• setting the minimum, maximum, and contour interval by clicking the Level button,
• setting the line properties for all lines to a uniform or gradational color and style
by clicking the Line button,
• setting the Colormap for the foreground and background color and the fill pattern
between all contour lines by clicking the Fill button,
• setting the label properties for all contour labels or contour labels on a frequency
basis by clicking the Label button,

39
Surfer

• or setting the hachure properties for all contours or on a frequency basis by


clicking the Hach button.

To set advanced contour level properties for individual levels:


1. Click once on the contour
map to select it.
2. In the Property Manager,
click on the Levels tab.
3. Make sure that the Level
method is set to Advanced.
4. Click the Edit Levels button
next to Contour levels to
open the advanced
Properties dialog.
5. In the Properties dialog,
you can double-click an
individual Z value in the list
underneath the Level
button to change the Z
value for that particular Double-click on the 60 to change the Z
contour level. Let's double- value for this contour line.
click on the number 60. In
the Z Level dialog, type in 65. Click OK and the contour line changes to 65.
6. You can also double-click the line style for an individual level to modify the line
properties for the selected level. This provides a way to emphasize individual
contour levels on the map. Double-click on the line style next to the 70.
7. In the Line Properties dialog, change the Style to a solid line by clicking on the
existing dashed line and selecting the Solid line from the drop-down list. Click OK.
8. Let's add a single contour line halfway between two existing values. Click on the
number 65 under the Level column. Click the Add button. The value 57.5 is added
between the 50 and the 65.
9. Click OK and the individual settings are made to the contour map.

40
Chapter 2 - Tutorial

Individual level changes that can be made include:


• setting an individual level value
by double-click on the level
value to enter a new Z value,
• setting the individual line
properties for a single level by
double-clicking the line style
for that level,
• setting the fill color or pattern
for a single level by double-
clicking on the fill pattern for
that level,
• setting the label properties for
a single contour label by
double-clicking on the Yes or
No under the Label column for
that level, Double-click on an individual elements on the
• or setting the hachure Levels page of the contour map properties dialog
to set specific parameters for the selected level.
properties for a single contour
This example shows the line for the Z = 70
level by double-clicking on the before it is changed to a solid line.
Yes or No under the Hach
column for that level.

Adding, Deleting, and


Moving Contour Labels
1. Contour label locations can be
changed on an individual basis.
Labels can be added, deleted,
or moved.
2. To add, delete, and move
contour labels:
3. Right-click on the contour map
and select Edit Contour
Labels. You can also edit labels
of a selected contour map using
the Map | Edit Contour
Labels command. The cursor
changes to a black arrowhead
to indicate that you are in
Contour labels can be moved, added, or
deleted with the Map | Edit Contour
Labels command.

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.

Lesson 4 - Modifying an Axis


Every contour map is created with four map axes: the bottom, right, top, and left
axes. You can control the display of each axis independently of the other axes on the
map. In this example, we will change the axis label spacing and add an axis title. 3D
maps have an additional Z axis. Additional X, Y, or Z axes can be added to a map with
the Map | Add command. You can control the display of each axis independently of
the other axes on the map. In this example, we will change the axis label spacing and
add an axis title.

Adding an Axis Title


To add an axis title:
1. Move the cursor over one of the axis tick labels on the bottom X axis and left-click
the mouse. In the status bar at the bottom of the plot window, the words "Map:
Bottom Axis" are displayed. The "Bottom Axis" object is selected in the Object
Manager. This indicates that you have selected the bottom axis of the contour
map. Additionally, blue circle handles appear at each end of the axis, and green
square handles appear surrounding the entire map. This indicates that the axis is a
"sub-object" of the entire map.
2. The bottom axis properties are displayed in the Property Manager. Click on the
General tab.
3. Click the next to Title to open the Title section if it is not already open. Click in
the box next to Title text. Type "Bottom Axis" (without quotes) and click the
ENTER key on the keyboard. This places a title on the selected axis.

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.

Changing the Tick Label Properties


All properties of the axis are editable, including the tick label format and frequency. To
change the axis tick labels:
1. Click on the Scaling tab to display the axis scaling options. In the Major Interval
box, type the value 1.5 and press ENTER on the keyboard to place 1.5 X map units
between tick marks. This spacing automatically updates on the map axis.
2. Click on the General tab and click the next to Labels, if it is not already open.
Click the next to Label Format to open the Label Format section.
3. In the Label Format section, select Fixed for the Type.
4. Click in the box next to Decimal digits. Highlight the existing value, type 1, and
press ENTER on the keyboard. This indicates that only one digit follows the
decimal point for the axis tick labels.
5. The map is updated immediately after every change, showing the axis tick
spacing, labels, and the axis title.

You can use the axis properties to change the


tick mark and axis title properties.

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.

Lesson 5 - Posting Data Points and Working with Map


Layers
Post maps are created by placing symbols representing data points at the X, Y data
point locations on a map.

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.

Use of Map Layers


Map layers allow you to add multiple maps to an existing map to create one map
object displaying a variety of map types. The layers use a single set of axes and are
positioned according to the target coordinate system. For example, if you have a
contour map of weather data created, you can add a post map layer displaying the
location and station names of each data collection station.

44
Chapter 2 - Tutorial

Adding Map Layers to Existing Maps


Map layers can be added to an existing map by selecting the map and using the Map |
Add command, by dragging an existing map layer from one map object to another, or
by selecting all maps and using the Map | Overlay Maps command.

Adding a Post Map Layer


When a new post map is created with Map | New | Post Map, it is independent of
any other maps in the current plot window. When the two maps are displayed, notice
that two sets of axes are also displayed, one set for each map. When you select a map
and then use the Map | Add command, a new map layer, axis, or scale bar can be
added to the selected map.

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.

To add a post map layer to the current tutorial map:


1. Using the TUTORWS.SRF file you created in the previous lesson, click once on the
contour map.
2. Click the Map | Add | Post Layer command, or right-click on the contour map
and select Add | Post Layer.
3. In the Open Data dialog, select TUTORWS.DAT from the SAMPLES folder and click
Open.
4. The post map layer is added to the contour map. Notice in the Object Manager
that the post map layer has been added to the contour map the two maps now
share the same set of axes. Changes made to the map properties will affect both
the contour map layer and the post map layer.

45
Surfer

Changing the Post Map Properties


Once you have created a post map layer, you can customize the post map properties.

To change the post map properties:


1. Click on the word "Post" in the Object Manager or on the post map layer in the
plot window.
2. In the Property Manager, click on the General tab. Click the next to Default
Symbol, if it is not already open. Click the next to Marker Properties to open the
Symbol Properties section.
3. Next to the Symbol, click on the existing symbol. In the drop-down list, click on
the filled diamond symbol (Symbol set: Default Symbols, Number: 6) from the
symbol palette.
4. Next to Color, click on the existing color. In the drop-down color palette, select the
cyan color.
5. Opacity can be adjusted to create semi-transparent symbols by dragging the
next to Opacity, if desired.
6. The symbol appears at the posted data points on the map.
7. In the Symbol Size section, click in the Symbol size box. Highlight the existing size
and change it to 0.09 in, and press ENTER on the keyboard. The post map is
drawn with the updated symbol size.

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.

Selecting and Renaming a Map Layer


After creating a multi-layer map with a post map layer and a contour map layer, you
can still modify the individual map layers.

Selecting Map Layers


An individual map layer can be selected in the multi-layer map by clicking on the layer
in the plot window or clicking on the map layer in the Object Manager. The easiest
way to select a map layer in a multi-layer map is to click on the layer name in the
Object Manager.

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.

Renaming the Map Layers


To select a map layer and assign or change the
Object ID:
1. Click the contour map layer name in the
Object Manager. In this case, click the word
"Contours."
Enter a new object name in
2. The status bar should now report "Map: the Rename Object dialog.
Contours."
3. Choose Edit | Rename Object or press the
F2 key on the keyboard.
4. In the Rename Object dialog, type the name
"Tutorial Contour Map" and click OK. The
status bar and Object Manager update to
reflect the name change.
5. Repeat steps 1-3 and rename the post map
layer to "Tutorial Post Map".
6. If you click on the "Tutorial Contour Map"
layer in the Object Manager, notice that the
title in the title bar of the Property Manager Left-click the word Post in the
Object Manager to select the
changes to Property Manager - Map:
post map layer.
Tutorial Contour Map. When you rename an
object in Surfer, the Property Manager window reflects the name change
making it easier for you to keep track of the object you are editing. For example, if
you have eight maps in the plot window, it is beneficial to change the map names
to something meaningful to save time when trying to edit them.

47
Surfer

Adding Labels to the Post Map


You can add labels to the data points on
post maps and classed post maps.

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.

Moving Individual Post Map


Labels
You can move individual labels of post
maps and classed post maps with the
Map | Edit Post Labels command.
Alternatively, add labels, and then right-
click the post map and select Edit Post
Labels to enter edit mode. A
customizable line is automatically added
from the data point label to the actual X,
Y data point location.

To move individual labels:


1. Select the Tutorial Post Map in the
Object Manager.
2. Select the Map | Edit Post Labels
command or right-click on the Customize the post map labels with
selected map and select Edit Post Labels. the Edit Post Labels command.

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.

Lesson 6 - Creating a 3D Surface Map


Surfaces are similar to 3D wireframes, except that surfaces are three-dimensional
shaded renderings of a grid file.

Surfaces provide an impressive visual interpretation of data. Surfaces can be layered


with other surfaces, so that the surfaces will intersect with each other. Surfaces can
also have layers of other map types, excluding 3D wireframes. Surfaces allow you to
generate an elevation model of your area
of interest and then add layers of data on
the top of the surface. You can control the
color, lighting, overlay blending, and wire
mesh grid of a 3D surface.

For example, if you have location (X, Y)


and temperature (Z) data for a region and
you have the same location (X, Y) and
corresponding elevation (Z) data for the
area, you could create a grid file with the
Z variable being elevation and a grid file
with the Z variable being temperature. You
The 3D surface map shows the grid
could create a 3D surface of the elevation
with a 3D aspect and color filled areas.
grid to represent topography, then add a
contour map of the temperature variation.
You could continue to add map layers, such as a classed post map layer with the
temperature collection stations that have different symbols depending on the
elevation.

49
Surfer

Creating a 3D Surface Map


To create a 3D surface map:
1. We are going to use the same grid file you used to created the tutorial contour
map. The 3D surface map will provide a new perspective to the contour map you
have already created. Click the File | New | Plot command to open a plot
document.

2. Select the Map | New | 3D Surface command, or click the button.


3. Choose the grid file TUTORWS.GRD from the list of files in the Open Grid dialog.
The TUTORWS.GRD, created in Lesson 2 - Creating a Grid File, is located in
Surfer's SAMPLES folder.
4. Click Open, and the 3D surface is created using the default settings.

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.

To add a surface mesh:


1. Click once on the 3D surface map
to select it. The 3D surface
properties are displayed in the
Property Manager.
2. Click the Mesh tab.
The mesh lines indicate lines of
3. Check the Draw lines boxes in both constant X and Y on the 3D
the Lines of Constant X and Lines surface.
of Constant Y sections.
4. In the Lines of Constant X section, change the Frequency to five.
5. In the Lines of Constant Y section, change the Frequency to five.

The mesh is automatically added to the selected 3D surface.

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.

To change the surface material color:


1. Click on the 3D surface to select it. The 3D surface properties are displayed in the
Property Manager.
2. Click on the General tab. Click the next to Material Color to open the section if
it is not already open. Click the color bar next to Upper. In the drop-down list,
select one of the predefined colormaps, such as Rainbow.
3. If you wish to define your own colors, click on the Custom button at the bottom of
the drop-down list. The Colormap dialog opens.
4. In the Colormap dialog, select a predefined colormap from the Presets drop-down
list. The Presets list contains a variety of predefined color schemes. Alternatively,
you can click the Load
button and select a custom
color spectrum .CLR file. The
ColorScales folder contains
many sample .CLR files.
5. Notice that the colors and
anchor node positions
have changed in the
Colormap dialog. The
Rainbow preset has six
nodes that range from
purple to red. You can add,
remove, apply opacity,
customize the nodes, or
accept the default selections.
This is a 3D surface map with a mesh displayed
To reverse the color order, at a frequency of five. The 3D surface map is
click the Reverse button. using the preset Rainbow color spectrum.
6. Click OK in the Colormap
dialog to update the surface map properties with your color changes.

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

Adding a Map Layer


You can add additional map layers to the 3D surface with the Map | Add command.
All map layers, except other 3D surfaces, are converted into a type of image known as
a texture map. This texture map is then applied to the surface by stretching it and
shrinking it as necessary. When these maps are added to the surface map, you have a
choice on how to treat the texture map. You can use the colors from overlays only,
from the surface only, or blend colors from the overlays and surface. For example, you
could create a color filled contour map, add the contour map and surface, and then
use the colors from the contour map only. A 3D wireframe layer cannot be added to a
3D surface map.

When multiple 3D surfaces of differing elevations are added as layers to an existing


surface map, the surfaces can intersect and overlap each other. If a surface map is
added to another surface map with the Map | Add | Surface Layer command and
the two maps are adjacent to each other in the X or Y direction, the surfaces are
drawn side-by-side. In this example, we will add a plane layer to the surface you just
created.

First, rename and select the 3D


surface map:
1. Click on the 3D surface in the
Object Manager and select Edit |
Rename Object. Change the text
to TUTORWS to make it easier to
distinguish the map layer in the
Object Manager list. Click OK.
2. Select the TUTORWS map in either
the Object Manager or the plot
document.

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.

Lesson 7 - Adding Transparency, Color Scales, and Titles


The opacity of a map, image, text, line, fill, symbol, or entire layer can be customized
in Surfer. Opacity is the amount that you can see through an object or that light can
pass through an object. By default, objects are displayed with 100% opacity, meaning
no light can pass through the object. An object can be made semi-transparent by
adjusting the opacity value. An Opacity of 0% would be fully transparent, or fully
invisible.

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.

To create a contour map:

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

Adding Transparency to Map Layers


You can adjust the Opacity value of a map layer, or of individual contour fill, polygon
fill, text, lines, or symbols when the appropriate object is selected. The properties are
displayed in the Property Manager.

Adjusting the Opacity may be useful when


you have multiple map layers and need to
make one or more layers semi-transparent
to best represent your data.

To add transparency to the contour map:


1. Click on the contour map to select it.
2. In the Property Manager, click on the
Levels page.
3. Set the Level method to Simple, if it is
not already Simple.
4. Click the color bar next to Fill colors.
Select Rainbow from the drop-down The contour map is displayed with
list. a partially transparent fill color.
5. Click on the Layer tab.
6. Change the Opacity to 43%. The opacity for the entire layer is decreased to 43%.

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

Adding a Color Scale


You can add a color scale to contour, 3D wireframe, 3D surface, image, and vector
maps. To add a color scale to the contour map:
1. Click on the contour map to select it. The properties are displayed in the Property
Manager.
2. Click on the General tab. Be sure that the Fill contours options is checked.
3. Check the box next to Color scale. A default color scale is created. A new Color
Scale object is added to the Object Manager.

To change the color scale properties:


1. Click on the color scale bar to display the color scale properties in the Property
Manager.
2. Make adjustments to the label or line properties. You may wish to change the
Opacity to 43% to match the contour map. The color scale bar is automatically
updated with the changed properties.

To add a title to the color scale bar:


1. Click the Draw | Text
command, or the
button. Click to the left of the
scale bar. The Text
Properties dialog opens.
2. In the Text section, enter
"Elevation (Meters)", and
click OK. Click the ESC key
on the keyboard to exit the
text drawing mode.
3. Click on the text object to
select it. Click the Arrange |
Rotate command. In the
Rotate dialog, enter "90" in
the Counterclockwise rotation The map and color scale composite object
in Degrees box. Click OK. are shown in this image. The color scale
shows the same opacity as the contour map,
4. Click and drag the text box so that the colors match.
to position it next to the color
scale.
5. Select the color scale and the text in the Object Manager by selecting the first
object, holding the CTRL key, and selecting the second object. Once only those

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".

Adding a Shaded Relief Map Layer


Adding a shaded relief map layer to our existing semi-transparent map will help
display the elevation behind the contour fill. To add a shaded relief map layer:
1. Click on the contour map once to select it.
2. Click the Map | Add | Shaded Relief Layer command.
3. Select the file TUTORWS.GRD, and click Open. A shaded relief map layer is added
to the map object in the Object Manager. Notice how the shadows of the shaded
relief map layer help distinguish the topography of the grid file.
4. (Optional) In the Object Manager, you may want to click the check mark next to
the Contours or Shaded Relief Map layers to toggle the visibility of the maps on
and off.

The shaded relief map is visible behind the partially transparent contour map.

56
Chapter 2 - Tutorial

Adding a Map Title


Adding a title to a map is a great way to stay organized and create publication quality
maps. To add a title to the tutorial map:
1. Click once on the top axis to select it. The top axis properties are displayed in the
Property Manager.
2. Click on the General tab. Click the next to Title, if the section is not already
open. In the box next to Title text, type "Tutorial Map", without the quotes.

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.

This map contains a semi-transparent contour layer on top of a shaded


relief layer. A color scale and title were added to the map.

57
Surfer

Lesson 8 - Creating Maps from Different Coordinate


Systems

Map Coordinate System


A coordinate system is 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 unreferenced in local coordinates,
referenced to a geographic lat/long coordinate system, or referenced to a known
projection and datum.

Use of Map Coordinate System


If your data, grids, and base maps are in different coordinate systems, you will want
to set the coordinate system for each map layer and the entire map. If you want to
change the projection of your data, grid, or base map, you will want to set the
coordinate system.

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.

Creating the First Map Layer


To create a map layer with a defined
coordinate system in Surfer,
1. Click File | New | Plot to open a new
plot window.
2. Click Map | New | Contour Map to
create the first map layer, a new
contour map.
3. In the Open Grid dialog, click on the
Diablo.grd file and click Open. The
contour map is created.
4. Click on Contours in the Object
Manager to select the contour layer.
5. In the Property Manager, click on the
Coordinate System tab.
6. Note that the contour map layer was
The first map layer is created with a
imported with a coordinate system
predefined Coordinate System.
already specified. This map layer is in

58
Chapter 2 - Tutorial

State Plane 1927 - California III (Meters), as shown in the Name field.

Adding a Second Map Layer


To add a new map with a post map layer,
1. Create a new post map with the Map | New | Post Map command.
2. In the Open Data dialog, select the Diablo Example.dat file and click Open.
3. Click on the Map that contains the post map and drag it in the plot window so that
the two maps are side by side. Note that the axes on the two maps have very
different coordinates.
4. Click on Post in the Object Manager to select the post layer.
5. In the Property Manager, click on the Coordinate System tab. Note that the
post map does not have a predefined coordinate system.
6. Click the Set button to define the coordinate system for the post map. Since we
know this coordinate system, we can set it. Open the Predefined section. Open the
Projected Systems section. Open the UTM section. Open the North America
section. Click on the North America NAD27 UTM Zone 10N and click OK. On the
Coordinate System tab, the post map layer now has a defined coordinate
system.

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.

The two maps are overlaid. Notice that


the axes use only one of the map
layer's limits.

Setting the Coordinate System for the Map


Both map layers contain different coordinate systems. You can also change the
displayed coordinate system. In Surfer, this is referred to as the Target Coordinate
System. To change the target coordinate system:
1. Click on the Map object in the Object Manager.
2. In the Property Manager, click on the Coordinate System tab. Click the
Change button.
3. In the dialog, open the Predefined section. Open the Geographic (lat/lon) section.
Select World Geodetic System 1984 and click OK.

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.

The map axes now display latitude and longitude coordinates.

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

Lesson 9 - Custom Toolbars and Keyboard Commands


If you use a command frequently, you may want to add the command button to an
existing toolbar or create a new custom toolbar. This can easily be accomplished in
Surfer.

Creating Custom Toolbars


To create a custom toolbar:
1. Select the Tools | Customize command to open the Customize dialog.
2. Click on the Toolbars tab. Click the New button. The Toolbar Name dialog
opens.
3. Type a name for the new toolbar, such as My Custom Commands. Click OK. An
empty condensed floating toolbar will appear.
4. Drag the new toolbar to the top of the Surfer screen to dock it next to the other
toolbars.

To add a button or command to a toolbar or menu:


1. If the Customize dialog is not still open, open it
by clicking the Tools | Customize command.
2. Click on the Commands tab. The Commands
page displays all of the Surfer menus in the
Categories list. This custom toolbar has many
common Help menu commands.
3. Select a category from the Categories list.
4. Select a menu command from the Commands list.
5. Drag the command to a toolbar. Continue adding commands as needed.
6. When you are done creating your custom toolbar, click Close in the Customize
dialog.
7. The custom toolbar can be toggled on or off with the View | Toolbars command.

Creating Keyboard Shortcuts


There are often times where you may use a command often enough to merit creating
a custom keyboard shortcut. This can easily be accomplished in 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.

To create a custom keyboard command:


1. Let's verify that the Grid | Data command does not have a keyboard shortcut
assigned to it. Click Help | Keyboard Map.
2. In the Help Keyboard dialog, change the Category to Grid.
3. Visually scroll down the list of Grid menu commands. Notice that there is no Keys
assigned to GridData. Close the dialog by clicking the X in the upper right corner
of the dialog.
4. Click the Tools | Customize command to open the Customize dialog.
5. Click on the Keyboard tab to open the Keyboard page.
6. Select Plot Document from the Set Accelerator for drop-down list.
7. Select Grid from the Category drop-down list.
8. Select Data from the Commands list.
9. Click in the box next below Press New Shortcut Key.
10. Press the CTRL + SHIFT + D keys on the keyboard. The shortcut will appear
automatically in the Press New Shortcut Key box.
11. If no other command has this keyboard shortcut, [Unassigned] will be displayed
below Assigned to. If the shortcut is not assigned to another command, click the
Assign button. The shortcut is added to the Current Keys list.
12. If another command has the keyboard shortcut, the command is listed below
Assigned to. If this is the case, the Assign button is grayed out. Select a different
shortcut key for the command. Each shortcut key can be assigned to only one
command.
13. Once you have assigned CTRL + SHIFT + D to the Plot Document, Grid | Data
command, click the Close button.
14. In the plot window, press the CTRL + SHIFT + D command on the keyboard. The
Grid | Data command is executed, and the Open Data dialog opens.

63
Surfer

Lesson 10 - Overlaying Map Layers


Surfer 10 has three methods of overlaying map layers onto a single map object. You
can drag a map layer from one map object to another map object in the Object
Manager, you can select an map and click the Map | Add command to add a map
layer, or you can select multiple map objects and use the Map | Overlay Maps
command. This tutorial will cover all three methods that are available to overlay map
layers in 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.

Click the Map object to display Click Contours to open the


properties for the entire map in properties for the contour map
the Property Manager. in the Property Manager.

64
Chapter 2 - Tutorial

Method 1: Overlaying Two Existing Maps by Dragging in the Object


Manager
We will start by creating two separate map objects. In this method, we will create a
post map and a contour map. Note that each map has an independent set of axes
before they are overlaid. After the maps are overlaid, they share a set of axes.
1. Click the File | New | Plot command to open a blank plot window.
2. Click the Map | New | Contour Map command.
3. Select the Demogrid.grd file in the Open Grid dialog and click Open. The contour
map is displayed in the plot window and the Object Manager.
4. Click the Map | New | Post Map command to create a second map.
5. In the Open Data dialog, select the sample file Demogrid.dat and click Open. The
post map is displayed in the plot window and the Object Manager.

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

Method 2: Overlaying Two Existing Maps by using the Map | Add


Command
This method eliminates the requirement to make two maps before overlaying. Start
with one map object with any number of map layers. Click the Map | Add command
to immediately add a new map layer to an existing map object.
1. Select the map created in Method 1.
2. Click the Map | Add | Base Layer command. Alternatively, right-click once on
the map or one of the map layers and click Add | Base Layer.
3. In the Import dialog, select the Demorect.bln sample file and click Open. A base
map of a rectangle is displayed in the plot window and the Object Manager as a
new map layer to the existing Map object.

Method 3: Overlaying Maps with the Map | Overlay Maps Command


This method works well when you have multiple maps and map layers to overlay and
the maps already exist.
1. Click the Map | New | Base Map command.
2. Select the Demoslice.bln file in the Import dialog and click Open. The new base
map is displayed in the plot window and the Object Manager in a separate map
object.
3. Click the Map | New | Base Map command.
4. Select the DemoText.mif file in the Import dialog and click Open. The new base
map is displayed in the plot window and the Object Manager in a separate map
object.
5. Click the Edit | Select All command to select all three map objects.
6. Click the Map | Overlay Maps command. The three separate map objects are
combined into a single map object with 5 map layers.

67
Surfer

Lesson 11 - Blanking a Grid File


Surfer creates grid files that are always rectangular or square. When you need to
have a grid file where the contour lines are not rectangular or square, the grid will
need to be blanked. The Grid | Blank command combines an irregularly shaped
blanking .BLN file with a rectangular grid file. The result is a new grid file where the
contours stop at the the boundary of the blanking file.
To display a base map of a blanking file on a contour map:
In the previous lesson (Overlaying Map Layers), you created
a map with a contour map layer, a post map layer, and a
three base map layers. The first base map displays the
rectangular area of interest, while the contour map displays
a larger area than we need to display. Using the blanking
command, we will create a new grid file that has everything
outside the base map rectangle blanked.

In the existing map, click on the next to the upper two


base maps. This will turn the display of these base maps off.

To blank the grid file:


1. Before blanking, click the File | Open command.
Select the Demorect.bln file and click Open. The Uncheck the upper two
.BLN file opens in the worksheet. base maps so only the
contour, post, and original
2. The first row displays the blanking header base map are displayed.
information. Cell A1 displays the total number of
vertices (in this example, 5). Cell B1 displays the
blanking flag. The blanking flag can be either a "0" to indicate "blank outside"
or a "1" to indicate "blank inside". We want to blank outside the rectangle, so
ensure the blanking flag is set properly. A blanking flag of zero is shown in cell
B1, so the file can be closed without any changes. Click File | Close.
3. In the plot window, click the Grid | Blank command.
4. In the Open Grid dialog, select the Demogrid.grd file and click Open. This is
the grid file used to create the original contour map.
5. In the Open dialog, select the DemoRect.bln file and click Open. This is the
boundary file displayed on the map.
6. In the Save Grid As dialog, type a File name, such as Demogrid_Blanked.grd.
Change the Save as type to the desired grid file format. Select GRD Surfer 7
Binary Grid (*.grd) to save a Surfer grid file. Click Save.
7. A Surfer dialog confirms the location and name of the blanked grid file
created. Click OK.

68
Chapter 2 - Tutorial

8. Click once on the existing contour map layer to select it.


9. In the Property Manager, click on the General tab. Next to Grid file, click

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.

The blanking file is displayed as a


This is a contour map created
base map layer on the contour map.
from the blanked grid file.

Lesson 12 - Using a Didger TerraServer Image in Surfer


Didger 4 is a separately sold Golden Software program. The ability to download a free
USGS TerraServer image is a capability of Didger 4. There is a command in the
Didger program to send the downloaded image directly to Surfer as a base map. For
additional information about Didger 4, please visit:
http://www.goldensoftware.com/products/didger/didger.shtml.

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.

To download a free USGS TerraServer image in Didger 4:


1. Open Didger 4.
2. Click the Image | Download TerraServer Images command to open the
TerraServer Image Download dialog. A connection to the internet must be
established to download a TerraServer 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.

To send the Didger map to


Surfer:
1. In Didger 4, click the
Tools | Surfer | Create
Base Map command.
2. In the Surfer Map dialog,
select the Creating a
single raster base map
option and click OK.
3. In the Tagged Image
(TIFF) Export dialog,
leave all the default
settings and click OK.
4. A new instance of Surfer
will open and the
TerraServer image will be
displayed as a base map
with UTM coordinates. This map has a base map layer of the Didger 4
TerraServer image of Golden, Colorado and a
semi-transparent contour map layer. Axis titles
have been added.

70
Chapter 2 - Tutorial

To add a semi-transparent contour map layer:


1. In Surfer, select the base map.
2. Select the Map | Add | Contour Layer command.
3. In the Open Grid dialog, select the sample file TutorialTerraServ.GRD, and click
the Open button.
4. A dialog will ask Do you want to adjust the map limits to include this layer? Click
the No button. The contour map layer is now overlaid on the base map.
5. Click on the Contours map layer in the Object Manager to select the contour map
layer.
6. In the Property Manager, on the General page, check the Fill contours option.
7. Click on the Levels tab. Set the Fill colors option. Click on the current color scale
and select Rainbow from the drop-down list.
8. Click on the Layer tab. Change the Opacity value to 20%. The changes are
automatically reflected on the contour map layer.
9. (optional) Click on the Left Axis in the Object Manager to display the left axis
properties. On the General page, enter a title in the Title text box and press
ENTER on the keyboard.
10. Repeat step 9 for the Bottom Axis and Top Axis.

Lesson 13 - Changing the Projection in the Worksheet


The New Projected Coordinates command in the worksheet allows you to specify a
new projection and datum for your data. A coordinate conversion adjusts the values of
the existing coordinate system and maps them to new values.

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

To convert a grid file to a data file:


1. Use the File | New | Plot command to open a new blank plot window.
2. In the plot window, click the Grid | Convert command.
3. In the Open Grid dialog, select the sample file TutorialTerraServ.GRD (from
Lesson 12) and click Open.
4. In the Save Grid As dialog, change the Save as type to DAT XYZ (*.dat).
5. Enter the File name "Tutorial13.DAT", and click Save. The data file is saved.

To change the projection in the worksheet:


1. Use the File | Open command. In the Open dialog, select the Tutorial13.DAT file
and click Open. The data file opens in the worksheet.
2. Use the Data | New Projected Coordinates command to open the New
Projected Coordinates dialog.
3. In the New Projected Coordinates dialog, change the Source Columns (the
columns containing the data you want to reproject) to X: Column A, Y: Column B.

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.

Specify the Source and Target columns and coordinate


systems 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).

Lesson 14 - Creating a Cross Section


The ability to slice a grid file in Surfer to create a file of data points along a specified
line of section is a very powerful tool. The sliced data can be visually displayed as a
profile in Surfer, or multiple profiles can be combined to display a cross section.

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

To Digitize a .BLN that Defines the Line of the Cross Section:


1. Click the File | New | Plot command to open a new plot window.
2. Click the Map | New | Contour Map command.
3. In the Open Grid dialog, select the Demogrid.grd sample file and click Open. A
contour map is created.
4. Click once on the contour map to select it.
5. Click the Map | Digitize command. This allows you to click on the screen and

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.

Slicing the Grid file to create a Data file:


1. Click the Grid | Slice command.
2. In the Open Grid dialog, select the Demogrid.GRD sample file and click Open.
3. In the Open dialog, select the DemogridCrossSection.BLN file you created above
and click Open.

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

Modifying the Data file and converting to a .BLN File


1. Click the File | Open command.
2. In the Open dialog, select the CrossSectionSlice.DAT file and click Open. The data
file will open in the Surfer worksheet.
3. For a cross section, the accumulated distance along the section will be the X axis
(currently located in column D). The Z value will be the Y axis of the cross section
(currently column C). The information currently in column A, B, and E are not
needed to create a cross section in this example.
4. Highlight column A by clicking on the A column header button. Press the DELETE
key on your keyboard to remove column A data.
5. Repeat step 4 for column B and column E. Alternatively, the Edit | Clear
command can be used to clear the information from a selected column.
6. We are left with data in column C and column D. We want to move the data in
column D to column A, and move the data in column C to column B. Click the
column D header button to highlight the entire D column. Click the Edit | Cut
command. Click the column A header and click the Edit | Paste command. The
column D data is pasted in column A.
7. Click the column C header button to highlight the entire C column. Click the Edit |
Cut command. Click the column B header and click the Edit | Paste command,
and the column C data is pasted in column B.

Displaying the Cross Section Line:


1. Click the column A header button to highlight column A. Click the Data |
Statistics command.
2. In the Statistics dialog, check the Number of values option in the Select items to
compute section. The other items to compute do not need to be checked.
3. Click the OK button and the Statistics Results dialog appears. The Number of
values is listed as 50. This means there are 50 data values in column A. This
number may be different for you, depending on the XY values that you digitized
previously. Note your number.
4. Click the Close button in the Statistics Results dialog.
5. To create a blanking file header row, an empty row needs to be inserted before
the data. Click the row 1 button to highlight the first row. Use the Edit | Insert
command to insert a blank row before the first data values.
6. In cell A1, enter the value "50" without quotes. If your number of values was
different, enter your value in cell A1. This is the total number of data points in the
file.
7. Click the File | Save As command.

76
Chapter 2 - Tutorial

8. In the Save As dialog enter "DemogridCrossSectionLine.BLN" in the File Name


box. Select BLN Golden Software Blanking (*.bln) as the Save as type. Click the
Save button.
9. Click on the Plot 1 tab to go to the plot window where the contour map is located.
10. Click the Map | New | Base Map command.
11. In the Import dialog, select the DemogridCrossSectionLine.BLN file and click
Open. A base map of the cross section is displayed. The base map scale needs to
be adjusted to properly view the cross section.
12. To change the scale of the map, click on the Map object that contains the base
map in the Object Manager to display the map properties.
13. In the Property Manager, click on the Scale tab to open the Scale page and set
the scale to fit your needs. In this example, uncheck the Proportional XY scaling
box and change the Length (page units) in the X Scale group to 6.00 inches.
Change the Length (page units) in the Y Scale group to 1.00 inch.
14. Click on the Base object in the Object Manager to open the base map properties.
15. In the Property Manager, click on the Base Map tab to open it. Open the
Properties section by clicking the + next to Properties.
16. Open the Line Properties section by clicking the + next to Line Properties.
17. Change the Style to .1 in Dash.
18. Change the Color to Red.
19. Change the Width to 0.030 inches.
20. Click on the Bottom Axis in the Object Manager to open the bottom axis
properties.
21. On the General page, open the Title section by clicking the + next to Title.
22. Enter "Accumulated Distance" in the Title text section, without quotes. Press
ENTER on the keyboard.
23. Click on the Left Axis in the Object Manager to open the left axis properties.
24. On the General page, enter "Elevation" in the Title text section, without quotes.
Press ENTER on the keyboard. The cross section now has titles and a customized
line.
25. Right-click on the contour map and choose Add | Base Layer.
26. In the Import dialog, select the original .BLN file, DemogridCrossSection.BLN, and
click Open. Depending on the points you digitized, you may get a dialog warning
you that the limits exceed the current map limits. Click Yes in this dialog if it
appears. The cross section line is displayed over the contour map.

77
Surfer

27. Click on the Base map layer


object in the Object Manager
to open the base map
properties. On the Base Map
page, open the Line Properties
section by clicking the + next to
Line Properties.
28. Change the Style to .1 in Dash.
29. Change the Color to Red.
30. Change the Width to 0.030
inches. The cross section line on
the contour map now matches
the cross section line displayed
in the separate base map. Align
the two maps to fit your needs.
31. Click on the Top Axis object in
the Object Manager to open
the top axis properties.
32. On the General page in the
Property Manager, add a Title
text for each map. The change
is automatically updated on the The location of the cross section is displayed on
map when you press the ENTER the contour map. The actual cross section is
button on the keyboard. displayed as a base map.

33. Click File | Save As. Enter


"Tutorial_DemogridCrossSection
.SRF" in the File name box and click the Save button.

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.

XYZ Data Files


XYZ data files contain the raw data Surfer interprets to produce a grid file. Before you
create a grid file in Surfer, you must create an XYZ data file. XYZ data files must be
organized in column and row format.

By default, Surfer expects the X data to be contained in column A, the Y data in


column B, and the Z data in column C. However, the data can be placed in any order
in any column.

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.

This is an example of an XYZ data file containing several columns of


Z data.You could use this file to create several different grid files,
where each uses the same XY coordinates, but different Z data.

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

Data as Numbers or Text


Worksheet data are in one of two forms: numbers or text. Grid file creation, statistics,
post maps, and other operations require data as numbers. Text data (even if it
contains numeric digits) can be used for labels in Surfer, but it cannot be used to
create grids or in any operation requiring numbers.

Numbers can consist of digits (0 - 9), decimal


points ( . ), the letters "e," "d," "E," or "D"
(indicating an exponent), and the plus (+) or
minus (-) sign. If you type any characters
other than these when entering a number (or
type any of the special characters more than
once), Surfer automatically converts the cell
entry to text. For example, if your longitude
data appears as 104.5 W in a worksheet cell,
it is interpreted as text and cannot be used to
grid data. To successfully read this data, use
the -104.5 format to indicate a location 104.5
degrees west of the prime meridian.
Notice that column B is left aligned.
This means the numbers are formatted
You can also convert numeric data to text by as text. When a cell is highlighted, an
apostrophe appears in the active cell
typing a single quotation mark ( ' ) in front of
edit box, also indicating that the
the number. Surfer does not place the single number is formatted as text.
quotation in the worksheet cell, however.

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.

Use the Edit | Paste Special command to remove text formatting.

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.

This Surfer worksheet document shows three columns of data.

83
Surfer

Components of a Worksheet Window

The components of a worksheet window shown above are


described in the table below.

The following table lists the components of a worksheet window.

Component Name Component Function


Column Letters The letter that identifies a column of the worksheet.
Row Numbers The number that identifies a row of the worksheet.
Active Cell The cell highlighted with a bold outline. The active cell
receives data input (numeric values or text strings) from the
keyboard. Only one cell is active at a time.
Active Cell Location The location of the active cell, specified by column letter and
row number.
Active Cell Edit Box The box displaying the data or text contained in the active
cell. Data typed into an empty cell appears in both the edit
box and the active cell.
Worksheet Name The name of the data file displayed in the worksheet or the
worksheet number prior to saving.
Select Entire The button used to select all cells in the worksheet. Located
Worksheet Button in the top left corner of the worksheet.

84
Chapter 3 – Data Files and the Worksheet

Working with Worksheet Data


There are three ways to enter data into the worksheet. Data are entered into the
worksheet by using File | Open and opening a data file, by typing data directly into
the worksheet, or by copying the data from another application and pasting it into the
worksheet. Use the Data menu commands to sort the data, filter the data, view
statistics, transform the data using mathematical functions, assign default columns for
coordinate data, assign a coordinate system to the data, and project coordinates.

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.

Cells are selected by:


• Clicking on the small box above the row labels and to the left of the column label
bar selects the entire worksheet.
• To deselect all selected cells, click the left mouse button anywhere within the
worksheet, or move the active cell with an ARROW key. Alternatively, the PAGE
UP, PAGE DOWN, HOME, and END keys may also be used to deselect the cells.
• To rapidly select a large block, first select one corner of the block, and then use
the scroll bars to scroll to the opposite corner. Hold down the SHIFT key and click
on the cell at the opposite corner. The PAGE UP, PAGE DOWN, HOME, and END
keys may also be used, but the SHIFT key must be held down while these keys are
pressed. The SHIFT key is not needed while using the scroll bars.
• To select all cells in a column or row, click the column letter or row number. To
select several adjacent columns or rows, press and hold the left mouse button and
drag the pointer on the column letters or row numbers.
• While holding down the CTRL key, the active cell may be repositioned for selecting
a new, discontinuous block.
• The CTRL key is used to select multiple blocks and the SHIFT key is used to resize
the last selected block. Details and exceptions are given in separate help sections
for selecting with the mouse and selecting with the keyboard.

85
Surfer

• If entire rows or columns are selected by clicking on the headers, some


operations, such as statistics, can take a long time. Rather than clicking on the
headers, only select the cells containing data.
• Clicking and holding the left mouse button while dragging the mouse in the
worksheet selects a block. Similarly, using the SHIFT key plus the ARROW keys
selects a block.
• The keys used with SHIFT for selecting cells are the ARROW keys, PAGE UP, PAGE
DOWN, HOME, and END. TAB and SHIFT+TAB cannot be used.
• While holding down the SHIFT key, the last selected block may be resized. Use the
SHIFT key and the mouse or the SHIFT key and ARROW keys.
• The active cell is at one corner (or edge) of a selected block and must first be
positioned before selecting multiple cells.
• The last block cannot be resized if the active cell has been moved.
• Once selected, a block of cells cannot be unselected unless all cells are unselected.

Entering Data into a Cell


Edit the contents of a cell by making it the active cell. The active cell is positioned by
clicking on a cell with the mouse, by using the ARROW keys, PAGE UP, PAGE DOWN,
TAB, HOME, END, and SHIFT+TAB. Press the F2 key or highlight the contents of the
cell edit box to edit the contents of the cell.

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.

Row and Column Label Bars


The worksheet cells are located by column label bars (A, B, C…) or row label bars
(1,2,3…). Click the label to select entire rows or columns, to change row height, to
change column width, or to hide or unhide rows and columns. To select multiple rows
or columns, drag the mouse over several adjacent labels.

Selecting a Column or Row Dividing Line


The column or row dividing lines are the lines between the column letter labels and
row number labels along the borders of the worksheet. These lines divide the columns
or rows. Change the column width or row height by dragging the dividing line. Rows or
columns can be hidden or unhidden by using the mouse. The Format | Column

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:

Keyboard Command Action


ESC ESC cancels edit mode and restores the original contents
of the active cell.
ENTER ENTER stores the contents of the cell edit box and then
moves the active cell down one cell.
CTRL+ENTER CTRL+ENTER completes the entry and keeps the current
cell active.
SHIFT+ENTER SHIFT+ENTER completes the entry and moves the active
cell up one row.
ARROWS (left and Left and right ARROWS move within the cell's text if the
right) F2 key has been pressed. Otherwise, these keys store the
contents of the cell edit box and then move the active cell
to the left or right.
ARROWS (up and Up and down ARROWS store the contents of the cell edit
down) box in the active cell and move the active cell above or
below.
CTRL+LEFT ARROW The CTRL+LEFT ARROW behavior depends on the position
of the active cell. If the active cell is to the right of the
last occupied column in the current row, it moves the
active cell to the last occupied column in the current row.

87
Surfer

If the active cell is in or to the left of the last occupied


column in the current row, but to the right of the first
occupied column in the current row, it moves the active
cell to the first occupied column in the current row.
Otherwise, CTRL+LEFT ARROW moves the active cell to
the first column in the current row.
CTRL+RIGHT ARROW The CTRL+RIGHT ARROW behavior depends on the
position of the active cell. If the active cell is to the left of
the first occupied column in the current row, it moves the
active cell to the first occupied column in the current row.
If the active cell is in or to the right of the first occupied
column in the current row, but to the left of the last
occupied column in the current row, it moves the active
cell to the last occupied column. Otherwise, CTRL+RIGHT
ARROW moves the active cell to the last column in the
current row.
CTRL+UP ARROW The CTRL+UP ARROW behavior depends on the position of
the active cell. If the active cell is below the bottom
occupied row in the current column, it moves the active
cell to the bottom occupied row in the current column. If
the active cell is below the top occupied row in the current
column, but in or above the bottom occupied row in the
current column, it moves the active cell to the top
occupied row in the current column. Otherwise, CTRL+UP
ARROW moves the active cell to the first row in the
current column.
CTRL+DOWN ARROW The CTRL+DOWN ARROW behavior depends on the
position of the active cell. If the active cell is above the
top occupied row in the current column, it moves the
active cell to the top occupied row in the current column.
If the active cell is above the bottom occupied row in the
current column, but below the top occupied row in the
current column, it moves the active cell to the bottom
occupied row in the current column. Otherwise, CTRL+
DOWN ARROW moves the active cell to the last row in the
current column.
DELETE When in edit mode, DELETE deletes the character to the
right of the cursor. Otherwise, pressing the delete key
deletes the entire contents of the cell.
BACKSPACE When in edit mode, BACKSPACE deletes the character to
the left of the cursor. Otherwise, pressing the backspace
key deletes the entire contents of the cell.
PAGE UP and PAGE PAGE UP and PAGE DOWN store the contents of the cell

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.

Opening Data Files


When you create a grid file or use another command that requires data, you do not
need to open the data into the worksheet first. However, the worksheet is available if
you would like to view or edit your data. The File | Open command loads a data file
into a new worksheet.

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.

To open a blank worksheet window:


• Choose the File | New | Worksheet command in the plot document, grid node
editor, or worksheet document.

• Click the button in the toolbar.


• Use the CTRL + W keyboard command.

89
Surfer

To view worksheet data:


• Select the File | Open command in the plot document, grid node editor, or
worksheet document and then select a data file.

• 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.

The Edit | Paste Special


command in the worksheet opens
the Paste Special dialog.

The clipboard formats displayed


Select a paste special format in the Paste Special
may vary depending upon the dialog. This figure shows options after copying
original location of the information Surfer worksheet data and using paste special.
being copied. For example, data

90
Chapter 3 – Data Files and the Worksheet

copied from the Surfer worksheet may yield different options than data copied from
Excel.

Importing Worksheets into Existing Files


The File | Import command in the worksheet loads the contents of a data file into the
existing worksheet. Select a file to import into the existing file in the Merge dialog.
The contents of the new file are merged into the worksheet at the active cell so be
sure to position the cell at the edge of the existing data. Any cells in the existing
worksheet that lie to the right of and below the active cell are overwritten with the
contents of the merging file.

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.

Creating New Folders


and Changing the
View
The buttons to the
right of the Look in
field allow you to
create new folders and
change the view of the
file list.

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.

Show Options If They Are Available


If Show options if they are available is checked, then opening .TXT files or ASCII text
files with unsupported file extensions will bring up the Data Import Options dialog
where you can specify the import options.

Data Import Options


If a file is in an ASCII text format with an unrecognized file extension, the Data
Import Options dialog appears when opening the file. Choose the Delimiters used in
the file (Tab, Comma, Semicolon, Space, or Other), and the Text Qualifiers used in the
file (Double Quote or Single Quote).

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.

Start Import at Row


Specify the row number at which to start the data import in the Start import at row
box.

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.

Start Import at Row


Use the arrow buttons to change the Start import at row value. For example, a value
of one will start the data import at row one of the data set. A value of five will start
the data import at row five of the data set.

Skip Leading Spaces


Check the box next to Skip leading spaces to tell the software to ignore spaces that
appear before initial text.

Treat Consecutive Delimiters as One


Check the box next to Treat consecutive delimiters as one to instruct the software to
interpret any consecutive delimiters into a single delimiter rather than breaking to a
new column for each consecutive delimiter.

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.

Imported databases appear in a new


worksheet window. Once the worksheet is
saved, the link to the database is
removed.

The Data Link Properties dialog appears


when you use the File | Import
Database command. Data linking is used
to define links to many types of
databases. The Data Link Properties
dialog can also be accessed by clicking the
Database or Load Database button in the
Open Data or Merge dialogs.
Use the Data Link Properties dialog
to define links to a database.
Click the Help button in the Data Link
Properties dialog to access Microsoft's
help file for this dialog. If you need additional information on specific connection
information, contact your network administrator.

95
Surfer

Edit Menu Commands


The Edit menu contains several standard edit options such as Undo, Redo, Cut,
Copy, Paste, Find, Insert, Replace etc. See Chapter 21, Creating, Selecting, and
Editing Objects for more details on these commands. Some of the edit commands
have functions specific to the worksheet and some are available through the context
menus as well as the main menus. You can right-click on selected cells to open the
context menu.

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.

1. Click the Edit | Insert command to


open the Insert dialog.
2. Click the Shift Cells Down or Shift
Cells Right option to insert blank
cells and displace the original
contents either down or to the right.
3. Click the Entire Row or Entire
Column option to insert an entire row
or column in the area that contains
highlighted cells.
4. Click OK and the inserted cells are
added. When using Edit | Insert, you can
shift cells to the right or down to
make room for the new cells.

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.

1. Click the Edit | Delete command to


open the Delete dialog.
2. Click the Shift Cells Up or Shift Cells
Left option to specify if cells will be
shifted to the left or up to fill in the
gap after deleting the selected cells.
3. Click Entire Row or Entire Column to
delete the entire row or column that
contains highlighted cells.
When using Edit | Delete, you can shift
4. Click OK to close the dialog and cells to the left or up to fill in the gap.
delete the selected cells.

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.

Find and Replace


The Find and Replace dialog displays when the Edit | Find or Edit | Replace
commands are selected. The Find and Replace dialog is used to search and replace
specific numbers or text in the worksheet.

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.

The asterisk * and question mark ?


wildcards can be used in the Find
box. Click the arrow at the right to
select from a list of the most
recently used criteria.
Search for and replace specific text in the
worksheet with the Find and Replace dialog.
A question mark ? finds a single
character in the specified location. For example, 200? finds 2009, 2008, 200a, etc.

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.

Or, search to the right across rows by


selecting By row. When the last column is
reached, the search moves to the next row.

In this example, cell A2 is selected. If the


The Search order is only available if In is
Find criteria is "0", and By column is the
set to The entire limits. Search order, cell A4 is found first. If By row
is the Search order, cell B2 is found first.

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".

Deselect All First


Check the Deselect all first box to deselect all selected cells before performing the
search. All previously selected cells will be deselected prior to the search when the
Deselect all first check box is checked. If the Deselect all first box is not checked, the
results of a previous search will remain highlighted when performing the next search.

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.

Track Cursor in the Plot Document


The View | Track Cursor command allows you to enable or disable the cursor
tracking between multiple maps. Tracking is done on the current map frame's
coordinate system. Left-click a map to see the location of the cursor click on additional
maps. The cursor tracking is updated with every left-click.

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.

Example in the Plot


1. Click the Map | New | Contour Map command. In the Open Grid dialog, select
the DEMOGRID.GRD sample file (located in the SAMPLES folder), and click Open.
The contour map is created.
2. Click the Map | New | Shaded Relief Map command. In the Open Grid dialog,
select the DEMOGRID.GRD sample file (located in the SAMPLES folder), and click
Open. The shaded relief map is created. Arrange the maps to be side by side.
3. Click the View | Track Cursor command to enable cursor tracking. A check mark
next to Track Cursor indicates cursor tracking is on.
4. With the track cursor command enabled, left-clicking on one map will display the
tracking cursor on the other map in the appropriate location.
5. To disable cursor tracking, click the View | Track Cursor command.

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

Track Cursor in the Worksheet Document


The View | Track Cursor command allows you to enable or disable the cursor
tracking between worksheet data and maps in the plot window. Select cells in the
worksheet to position the tracking cursor on the map in the plot window. Alternatively,
in the plot window, click on a map that contains the same XY range as the data file.
The closest data point to the click will be highlighted in 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.

Example in the Worksheet


1. Using the example from the previous section, select the contour map.
2. Click the File | Open command to open the DEMOGRID.DAT file. The data file is
displayed in the worksheet.
3. Click the Data | Assign XYZ Columns command to ensure the X, Y, and Z
coordinate columns are specified correctly. Make changes if necessary.
4. Click the View | Track Cursor command to enable cursor tracking.
5. Click on a cell in the worksheet. The tracking cursor will move to the selected
location on the maps in the plot window. Use the tabs to toggle between the plot
and worksheet.
6. Alternatively, click on the map in the plot window and the closest data point will be
highlighted in the worksheet.

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.

Select the number format options on the


General displays numbers as fixed or
Number page of the Cell Format dialog.
exponential, whichever is shorter.

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.

General aligns text on the left side of the


cell and numbers on the right side of the
cell.

Select the alignment options on the


Left aligns text and numbers with the left Alignment page of the Cell Format dialog.
side of the cell.

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.

Select a cell background color from the


color palette. A sample of the color is
displayed in the Sample box. Save the
worksheet in Excel format to save
background color in the file.
Select the cell background color
on the Background page of the
Column Width Cell Format dialog.

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.

To set column widths or to hide columns,


select either the entire column or
individual cells within the columns and
click Format | Column Width. Enter the
width for the selected column in the
Column Width dialog. Columns can range
from zero to 512 characters wide. The
value zero (0) hides the column.
Select the desired columns and click
Changing Column Width with the Mouse Format | Column Width. Enter a number
in the Column Width dialog and click OK.
Column width can also be changed using
the mouse. When the cursor is moved to the line that defines the right boundary of
the column header, the cursor changes to . Press and hold the left mouse button
and move the cursor to the left or right to change the width of the column.

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.

To set the row height or hide rows,


select either the entire row or individual
cells within the rows and click Format |
Row Height. Enter the height for the
selected row or cells in the Row Height
dialog. Rows can range from zero to 512
points in height. A value of zero (0)
hides the row.

Select the desired rows and click Format |


Changing Row Height with the Mouse Row Height. Enter a number in the Row
Height dialog and click OK.
Row height can also be changed using the
mouse. When the cursor is moved to the
line that defines the lower boundary of the row header, the cursor changes to a line
with two arrows . Press and hold the left mouse button and move the cursor up or
down to change the height of the row.

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.

Click the Data | Sort command


in the worksheet to open the
Sort dialog.
Click the Data | Sort command to sort
data on multiple columns.
Selecting Cells to Sort
Sorting is performed only on the selected columns. If only one column is selected, only
that column is sorted. To keep records (rows of data) together, select all columns
containing data even if only one column is sorted. To decrease sort time, select a
block of cells rather than clicking on the row or column labels.

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.

Ascending or Descending Sort


The sort order in an Ascending sort is based on the ASCII table. Numeric values are
placed first, followed in order by cells starting with a space character, common
punctuation, numeric text (numbers entered as text), uppercase letters, less common
punctuation, lower case letters, uncommon punctuation, and blank cells. Descending
order is the opposite of ascending order although blank cells are still listed last.

This ASCII table shows the sort order in the worksheet.

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.

Labels in First Row


The data set may contain text identifying the data in the column (header information)
in row one. In this case, check the Labels in first row box to exclude the label row
from the sort process.

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.

Click the Data | Transform command


in the worksheet to open the Transform
dialog.

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.

Transform Equation Format


Type the formula into the Transform equation box. Formulas consist of a destination
column, row, or cell on the left side of the equation and a mathematical manipulation
on the right side of the equation. Use the column label letters, row numbers, or cell
locations on both sides of the equation. Click the down arrow to use previously entered
equations. For columns, a sample equation may be C = A + B. For rows, a sample
equation is _4=_1+_2. For cells, a sample equation would look like C2=A1+B1-C1.

110
Chapter 3 – Data Files and the Worksheet

Transform Equation Equation Equation Example


Selection Format Example (in words)
Column Column C=A+B Add columns A and B and put
variables letters the results in column C
Row Row _3 = _1 + _2 Add rows 1 and 2 and put the
variables numbers results in row 3
with
preceding
underscores
Cell Cell C1 = A1 + B1 Add cells A1 and B1 and put
variables locations the results in cell C1

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.

First and Last Columns and Rows


While calculating transformations on columns, enter the First row and the Last row to
limit the calculation to the specified rows. While calculating transformations on rows,
enter the First col and Last col to limit the calculation to the specified columns.

When you are calculating transformations on cells, the First row, Last row, First col,
and Last col options are not available.

Treat Empty Cells as 0.0


By default, if any cell is empty, the formula is not calculated for that row. If you check
Treat empty cells as 0.0, the empty cell is replaced with 0.0 and the numeric result is
placed in the destination column.

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.

Example of a column formula


An example of a formula for columns is C = A + B. If the First row is set to 5 and the
Last row is set to 25, the formula places the sum of the cells of columns A and B into
column C in rows 5 through 25.

Example of a row formula


An example of a row formula is _4=_1+_2. Rows 1 and 2 are added and inserted into
row 4 with this equation. The formula adds the contents of the 1 and 2 in each column
listed between the First col and Last col values and places the results in row 4 for that
column. 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.

Example of a cell formula


An example of a cell formula is C2=A1+B1-C1. The value in C1 is subtracted from the
sum of the values in cells A1 and B1.

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

Example of using the built in functions


This example shows how to use the built in functions. Consider, for example, taking
the cosine of data in column C. Column D is the first empty column, so we will use
column D as the destination column.
1. Click the Data | Transform command to open the Transform dialog. You do not
need to highlight any columns before selecting Transform.
2. In the Transform equation box, type "D = " without the quotes.
3. Click the Functions button.
4. Double-click on the function name COS(X) in the Function name group.
Alternatively, you could select a Function name and click the Insert button.
5. COS(X) is automatically placed in the equation as "D = COS(X)" without the
quotes.
6. Replace the X in the function with the column letter containing the data to be
transformed (column C). The equation will be "D = COS(C)" without the quotes.
7. Change the First row and Last row if you wish, and click OK to create a new data
column with column C's data transformed with the cosine.

Example of transforming numbers


This example shows how to transform
the numbers in column A in the
worksheet with the equation
3COSH(X). That is, for numeric values
in column A, find the hyperbolic cosine
multiply by three, and place the results
in column E.
1. Open the data file in the worksheet
with File | Open.
2. Click the Data | Transform The destination column is column E and the
command. A worksheet column transformed column is column A. The calculation
does not need to be selected. is made for rows 1 through 30 only.
3. Delete any equations that appear
in the Transform equation box.
4. Enter a destination column followed by an equals sign ( = ) into the Transform
equation box, in this case, E.
5. Enter 3* following the equal sign.
6. Click the Functions button.
7. Select COSH(X) from the function list, and then click the Insert button. COSH(X) is
inserted into the Transform equation box.

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.

Click the Data | Spatial


Filter command in the
worksheet to open 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.

Type Duplicate Description


All Do not delete any duplicates.
None Eliminate all of the duplicates.
First Keep the first point, as defined by the order in the data file, from
each set of duplicates.
Last Keep the last point, as defined by the order in the data file, from
each set of duplicates.
Minimum X Keep the point with the minimum X coordinate.
Maximum X Keep the point with the maximum X coordinate.
Median X Keep the point with the median X coordinate.
Minimum Y Keep the point with the minimum Y coordinate.
Maximum Y Keep the point with the maximum Y coordinate.
Median Y Keep the point with the median Y coordinate.
Minimum Z Keep the point with the minimum Z value.
Maximum Z Keep the point with the maximum Z value.
Median Z Keep the point with the median Z value.
Sum Create an artificial datum at the centroid of the duplicate points
with a Z value equal to the sum of the duplicate set's Z values.
Average Create an artificial datum at the centroid of the duplicate points
with a Z value equal to the average of the duplicate set's Z values.

115
Surfer

Midrange Create an artificial datum at the centroid of the duplicate points


with a Z value equal to the midrange of the duplicate observations'
Z values halfway between the minimum Z and the maximum Z.
Random Keep a single randomly selected representative point.

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."

Data Exclusion Filter


Enter an expression in the Data Exclusion Filter to create an arbitrary exclusion. Use X,
Y, and/or Z variables. If a point is deleted (due to duplication or exclusion), the output
cell is left blank. The Data Exclusion Filter allows you use a boolean expression to
specify how to exclude data. For example:

X=-999 or Y=-999 or Z=-999 excludes any triplet with a -999 field


X<10 or X>20 or Y<10 or excludes all data outside the range 10 to 20
Y>20
Z < 0.0 excludes any triplet with Z < 0.0

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.

Click the Data | Statistics


command in the worksheet to
open the Statistics dialog.

Select Items to Compute


Click in the check boxes next to
the statistics options to calculate
the statistics for the selected data:
• 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 reports the last
row number containing data in
Click in the box adjacent to the statistics name to
the column. compute the statistics for the selected columns.
• Number of values indicates the
number of numeric cells in the column.
• Number of missing values indicates the number of non-numeric cells in the
selection. If columns are selected by clicking the column letters, the number of
missing values includes blank values up to the last used row in the worksheet,
which may be different than 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 is the sum of all numeric cells in the column.
• Minimum indicates the minimum value in the column.
• Maximum indicates the maximum value in the column.
• Range indicates the range of the numeric values in the column (Maximum –
Minimum).

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.

Labels in First Row


Check the Labels in first row box if the first row of the selection contains descriptive
labels. If this box is checked the label appears at the top of the statistics report for
each column.

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.

Suppose many samples of size n were repeatedly collected


from the same population and the means of these many
samples were calculated. The means of the samples would
themselves form a data set. The standard error of the mean is
an estimate of the standard deviation of this theoretical sample
of means.

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.

95% Confidence Interval for the Mean

± t (n −1),α =.05 ( SE )

99% Confidence Interval for the Mean

± 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:

µ = population mean x = sample mean xi = ith data value


N = number of data values (for a population)
n = number of data values (for a sample)

121
Surfer

Average deviation The Average deviation is the average of the difference between
the absolute values of data points and the mean.

Population Mean Deviation (MD)

∑ (x − µ)
1
MD = i
N

Sample Mean Deviation (MD)

∑ (x − x)
1
MD = i
N

where:

µ = population mean x = sample mean xi = ith data value


N = number of data values (for a population)
n = number of data values (for a sample)
Standard The Standard deviation is the square root of the variance.
deviation

Population Standard Deviation

σ = σ2

Sample Standard Deviation

s = s2

where:

σ 2 = population variance s 2 = sample variance

122
Chapter 3 – Data Files and the Worksheet

Coefficient of The Coefficient of variation is the standard deviation divided by


variation the mean. The worksheet reports the quotient; it does not
convert the value to a percentage. The coefficient of variation
is a dimensionless measure of variation. This statistic is not
defined for the case of a zero mean and this measure is only
useful when dealing with strictly positive data.

Population Coefficient of Variation


V =σ /µ
Sample Coefficient of Variation V = s/x

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

µ = population mean x = sample mean xi = ith data value


N = number of data values (for a population)
n = number of data values (for a sample)

123
Surfer

Coefficient of The Coefficient of kurtosis is a measure of the data peak


kurtosis sharpness. Traditionally the value of this coefficient is
compared to a value of 0.0, which is the coefficient of kurtosis
for a normal distribution (i.e. the bell-shaped curve). A value
greater than zero indicates a peaked distribution and a value
less than zero indicates a flat distribution. Without a very large
sample size, the use of this coefficient is of questionable value.

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

 (n − 1)(n − 2)(n − 3) s  (n − 2)(n − 3)


4
i =1

where:
σ = population standard deviation
s = sample standard deviation

µ = population mean x = sample mean xi = ith data value


N = number of data values (for a population)
n = number of data values (for a sample)
Kolmogorov- The Kolmogorov-Smirnov goodness of fit for normal distribution
Smirnov goodness measures how well the data match a normal probability
of fit for normal distribution. The K-S statistic is the largest difference between
distribution a normal distribution (with a mean equal to the sample mean,
x , and a standard deviation equal to the sample standard
deviation, s) and the actual frequency distribution of the data.

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.

Assign XYZ Columns


The Data | Assign XYZ Columns command allows you to specify the X, Y, and Z
columns containing your coordinate data.

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.

To specify the X, Y and Z columns:


1. Select a worksheet column from the
X (Easting) column drop-down list.
2. Select a worksheet column from the
Y (Northing) column drop-down list.
3. Select a worksheet column from the
Z (Elevation) column drop-down list.
4. Click OK to save the assigned X, Y,
and Z columns. Use the Assign XYZ Columns dialog to
specify the worksheet columns where the X,
5. The X, Y, and Z indicators will move
Y, and Z values are located.
to the assigned columns.

Assign Coordinate System


The Data | Assign Coordinate System command opens the Assign Coordinate
System dialog. This dialog is discussed in detail in Chapter 15 – Coordinate Systems.
The Data | Assign Coordinate System links a data file to a specific coordinate
system. Once the coordinate system is defined for the data file, a Golden Software
Georeference .GSR2 file is created. This file contains all the relevant projection
information that Surfer needs to load the data in the proper projection.

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.

New Projected Coordinates


The Data | New Project Coordinates command opens the New Projected
Coordinates dialog. This dialog allows you to specify a Source Coordinate System and
project the X and Y coordinate data to a new Target Coordinate System. The input
Source Columns and output Target Columns allow you to either overwrite the original
coordinate columns, or write the new coordinates to new columns in you worksheet.
For example, this command can be useful if you have coordinate data in latitude and
longitude (i.e. Source Coordinate System) and need to project the coordinates to UTM
(i.e. Target Coordinate System), but do not wish to do this in the plot window.

126
Chapter 3 – Data Files and the Worksheet

Change coordinates in the New Projected Coordinates dialog.

To change coordinates:

1. Click the Data | New Projected Coordinates command.


2. In the New Projected Coordinates dialog, specify the columns containing the X
and Y coordinates in the Source Columns X and Y. Click the arrow to see a drop-
down list of the data columns in your worksheet. The Source Columns contain the
X and Y values in the existing coordinate system.
3. Specify the X and Y destination columns in the Target Columns X and Y. The
projected output coordinates will be located in the target columns specified. Click
the arrow to see a drop-down list of the data columns in your worksheet.

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

Saving Data Files


The File | Save As
command saves a new
document or saves a
modified document with a
new file name. The File |
Save As command in the
plot document opens the
Save As dialog. The File |
Save As command in the
grid node editor opens the
Save Grid As dialog.

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.

File Names, Formats, and File Extensions


When a worksheet file is saved, the file format can be specified by typing the
appropriate extension on the file name. If the needed file is an ASCII DAT file, type a
file name such as MYDATA.DAT. The ".DAT" extension tells the worksheet to save the
file as an ASCII DAT file.

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.

Use Caution when Saving Excel Files!


A file can be saved in an Excel format from Surfer, but only one worksheet can be
saved. Surfer does not allow for saving multiple worksheets in a single Excel
document. If a multi-worksheet Excel document is opened and saved as an .XLS file
from Surfer, be aware that only the single worksheet will be saved in the document.
If the existing file is overwritten all the unused worksheets will be lost. In this case, a
warning message is issued.

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.

From Edge (inches)


Headers and Footers are the
only items that print outside of
the margins. The From Edge
(inches) group options controls
how far the Header or Footer is
printed from the edge of the
page. If these values are
greater than the Top or
Bottom margins, it is possible
that the worksheet data can
print over the header or footer.
The text that is printed for the
header and footer is controlled
on the Options page. Change page margin properties on the Page
Setup dialog on the Margins 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.

Row and Column Headers


Check the Row and column
headers option to print the
column letters and row
numbers of the worksheet.
Change page printing options in the Page Setup
dialog on the Options page.

Black and White


If cells contain color backgrounds (set from the Format | Cell Properties command),
check the Black and white option to print the worksheet in only black and white.

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.

Automatic header/footer codes for the worksheet:


• File Name ( < F> ) prints the name of the active file. The drive and path are not
included.
• Page Number ( <P> ) prints the page number for each page. When several pages
are printed, the order of printing is controlled from the Page Order section.
• Total Page Count ( <C> ) prints the total number of pages that are required to
print out the worksheet with the specified scaling parameters.
• Current Date ( <D> ) prints the current date.
• Current Time ( < T> ) prints the current time.
• Left/Center/Right Separator (<&> ) separates the header and footer text so it is
spread out across the page. Too many separators can actually push text off the
page. If this happens, remove the <&> separator, and use spaces instead.

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.

The Print Dialog


The File | Print command in the worksheet opens the Print dialog.

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

Calculating the Memory Needed


The following examples detail how to calculate the amount of memory needed for a
worksheet. Additional memory is needed to grid the data or to create a post map
from the data.

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.

Gridding produce a regularly spaced, rectangular array of Z values from irregularly


spaced XYZ data. The term irregularly spaced means that the points follow no
particular pattern over the extent of the map, so there are many holes where data are
missing. Gridding fills in these holes by extrapolating or interpolating Z values at
those locations where no data exists.

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

Creating a Grid File


Grid files are produced using the Grid | Data command. The Data command creates
a grid file from an XYZ data file. When creating a grid file you can usually accept all of
the default gridding parameters and generate a grid file that represents your data
well. Under most circumstances, the recommended gridding method is kriging with
the default linear variogram. This is the selected default gridding method because it
gives good results for most XYZ data sets. There are several gridding options, such as
the gridding method, grid line geometry, or search parameters, that can be set when
producing a grid file.

To produce a grid file from an XYZ data file:


1. Create an XYZ data file. The data must be organized in columns: X in one column,
Y in a second column, and Z in a third column.
2. Click the Grid | Data command to display the Open Data dialog.
3. Specify the name of the XYZ data file, and click Open.
4. In the Grid Data dialog, specify any parameters for the grid file you want to
produce and click OK. The grid is created.

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.

1. In a worksheet window, define well


locations (X and Y coordinates) and water
table depth (Z value) at each location in an
XYZ data file.
2. In the plot window, click the Map | New |
Post Map command. Select the data file
created in step 1 and click Open to create a
post map displaying the data locations with
Z value labels. This step is to show the
irregularly spaced data across the map.
To create a grid file, start with an X,
Y, Z data file, with data separated
into columns.

138
Chapter 4 – Creating Grid Files

3. Click the Grid | Data command to


create a regularly spaced grid .GRD file
from the irregularly spaced XYZ data
file. Use the default values in the Grid
Data dialog and click OK to create the
.GRD file.
4. Click once on the post map to select it.
Click the Map | Add | Contour Layer
command to add a contour map of the
grid file to the post map of the data file.

The gridded data is displayed as a


contour map, overlaid on a post map.

The Grid Data Dialog


There are several gridding parameters you can set when producing a grid file. All
gridding methods require at least three non-collinear data points. Some methods
require more data points. For example, a higher-order polynomial fit needs more than
three data points; there must be at least as many data as there are degrees of
freedom.

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

Gridding options are set in the Grid Data dialog.

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

Gridding Method and Advanced Options


Surfer has several different gridding methods. These gridding methods define the way
in which the XYZ data are interpolated when producing a grid file. Choose the Gridding
Method and gridding options (Advanced Options button) in the Grid Method section.
Refer to the Gridding Methods section of this chapter for more information on the
various options.

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.

Output Grid File


Choose a path and file name for the grid file in the Output Grid File section. You can

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 Line Geometry


The Grid Line Geometry section defines the grid limits and grid density.

Minimum and Maximum X and Y Coordinate


Grid limits are the minimum and maximum X and Y coordinates for the grid. Surfer
computes the Minimum and Maximum values in the X Direction and Y Direction from
the XYZ data file. These values are used as the default minimum and maximum
coordinates for the grid.

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

To specify the grid limits:


1. Examine the values in the Grid Line Geometry section. The Minimum and
Maximum boxes for the X Direction and the Y Direction show the data limits for
the file to be gridded.
2. You can set different limits by typing new values into the boxes. For example, if
your data ranges from one to nine in the X Direction, the default limits in the X
Direction are set at one for the Minimum and nine for the Maximum. If you want
the grid file to range from zero to 10, you must set these limits by specifying the
Minimum and Maximum values to use in the X Direction. The same applies for the
Y Direction.

Spacing and # of Lines


The # of Lines in the X Direction is the number of grid columns, and the # of Lines in
the Y Direction is the number of grid rows. The direction (X Direction or Y Direction)
that covers the greater extent (the greater number of data units) is assigned 100 grid
lines by default. The number of grid lines in the other direction is computed so that the
grid line Spacing in the two directions are as close to one another as possible.

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

The simple example shown here 5


demonstrates the relationship between
grid rows, columns, and grid nodes. In 4
this example, the grid spacing is 1.0
between rows and columns. The 3
number of grid lines in the X direction
(the number of columns in the grid file) 2
is nine, and the number of grid lines in
the Y direction (the number of rows in 1
the grid file) is seven. 1 2 3 4 5 6 7 8 9
Grid File Columns
Three examples are given in the table
below. These examples show the This is an example of a nine by seven grid. The grid
columns are represented by vertical solid lines, and
default parameters generated based on the grid rows are represented by horizontal dashed
the minimum and maximum X and Y lines. The grid nodes are shown as dots at the
values from the three XYZ data files. intersection of the rows and columns.

143
Surfer

Row/Column Minimum Maximum Grid Line Spacing # of Grid Lines


X Direction 0 99 1 100
Y Direction 0 79 1 80

X Direction 100 109 0.09090909 100


Y Direction 50 57 0.09090909 78

X Direction -105.75 -105.38 0.00434343 86


Y Direction 39.6 40.03 0.00434343 100

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.

Some examples of the amount of memory needed to grid large files:


• A 10,000 x 10,000 grid will require 10000*10000*8 = 763 MB.
• A 15,000 x 15,000 grid will require 15000*15000*8 = 1.8 GB.

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.

To specify the grid density:


1. Specify the Spacing values or # of Lines for both the X Direction and Y Direction in
the Grid Line Geometry section. These values, control the grid density in the grid
file.
2. The Spacing boxes specify the number of data units between grid lines. This value
is a function of the Minimum and Maximum values and the # of Lines values.
When you change these values, the # of Lines values are automatically
recalculated to reflect the change. If the Spacing value you specify results in a
fractional number for the # of Lines value, Surfer automatically adjusts the
Spacing value slightly to generate an integer number for the # of Lines value.
3. The # of Lines boxes specify
the number of lines in the X
and Y directions. This is the
number of rows (Y) and
columns (X) generated in the
grid, and must be a whole
number. If you change the #
of Lines values, the Spacing
values automatically change to
reflect the new values. If the
data limits are different in the
X and Y directions, the Spacing
in Grid Line Geometry is
unequal if the # of Lines
values are equal.

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

Grid Line Geometry information for both examples is given below.

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

The Cross Validation Process


Given the known values at N observation locations in the original data set, cross
validation allows you to assess the relative quality of the grid by computing and
investigating the gridding errors. In Surfer, these errors are calculated by removing
the first observation from the data set, and using the remaining data and the specified
algorithm to interpolate a value at the first observation location. Using the known
observation value at this location, the interpolation error is computed as:

error = interpolated value − observed value

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.

Thus, cross validation involves four steps:


1. Select a gridding method, along with all of the defining parameters.
2. For each observation location, interpolate the value using the neighboring data,
but not the observation itself.
3. Compute the resulting interpolation errors.
4. Assess the quality of the selected gridding method using various summary
statistics of the errors.

Using Cross Validation


To obtain cross validation information:
1. Click Grid | Data.
2. Select a data file in the Open Data dialog and click Open.
3. Click the Cross Validate button in the Grid Data dialog.
4. Select the number of random points, the validation limits, and exclusion limits you
wish to use with cross validation.
5. Click the Report box to generate a Cross Validation Report.
6. Set the results path and file name in the Cross Validation Results File field.

147
Surfer

The Cross Validation Dialog


Click the Cross Validate button in the Grid Data dialog to open the Cross Validation
dialog.

Click the Cross Validate button in the Grid Data dialog to


open the Cross Validation dialog.

Number of Random Points to Validate


For large and very large data sets the cross validation process of sweeping through
each and every observation point can take a great deal of time and computational
effort. A quicker alternative is to carry-out the cross validation procedure at a random
subset of the observation locations.

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

Select Validation Points Within These Limits


Set the X Direction, Y Direction, and Z Direction values for Minimum and Maximum in
the Select validation points within these limits section. This restricts the cross
validation to a subarea of the data extent. Data falling outside of these limits may be
used during the interpolation, but they are not used as cross validation points. The
limits in the Z Direction are useful to exclude cross validation at known anomalous
observation locations.

Exclude Data Within this Distance of the Validation Point


Often observations come in relatively homogeneous clusters. In these circumstances,
the standard cross validation approach may not generate useful results as the
interpolated values are merely the values of the close-by adjacent observations. To
counter this potential problem, the X Tolerance and Y Tolerance fields define a
centered rectangular buffer zone around each of the observations at which cross
validation is carried out. This buffer zone is two times the X Tolerance in the X
direction, and two times the Y Tolerance in the Y direction. Any observations falling
within a validation point’s buffer zone are not used in the interpolation of that
validation point. When these values are zero, all points in the validation limits are
used.

Cross Validation Results File


Set a path and file name in the Cross Validation Results File field for the cross
validation results. The results are presented in an ASCII data file, which can be used
as a gridding data file. The first line in the file contains column titles. Each subsequent
line is associated with a validation point. There are seven numeric values per line.

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

Cross Validation References


Below are a few references for cross validation. The following references include
extensive discussion of the theory and application of cross validation. Isaaks and
Srivastava 1989, Kitanidis 1997, Olea 1999, and Chiles and Delfiner 1999 focus on
cross validation with kriging, but the general discussion applies to all of the supported
gridding methods in Surfer.

Chiles, J. P. and P. Delfiner. (1999) Geostatistics: Modeling Spatial Uncertainty. John


Wiley and Sons, New York, 695 pp.
Isaaks, E. H. and R. M. Srivastava. (1989) Applied Geostatistics. Oxford University
Press, Inc., New York, 561 pp.
Kitanidis, P. K. (1997) Introduction to Geostatistics: Applications in Hydrogeology.
Cambridge University Press, Cambridge, 249 pp.
Olea, R. (1999) Geostatistics for Engineers and Earth Scientists. Kluwer Academic
Publishers, Boston, 303 pp.

General Gridding Options


Each gridding method has its own set of gridding options. Some of the options are the
same or similar for the different gridding methods, while other options are specific to
particular gridding methods. The following options are available to multiple gridding
methods.

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

The Search page allows you to specify the search options,


if available for the selected gridding method.

No Search (Use All of the Data)


The search options tell Surfer how to find
data points during the calculation of grid
node values. The No Search (use all of the
data) option tells Surfer to use all data
when interpolating each grid node.
Uncheck the No Search (use all of the data)
box to activate the search during the
gridding process.

For small data sets (up to 250 points) the


No Search (use all of the data) option is
usually the most appropriate. This type of
search increases gridding speed. No
Search (use all of the data) uses all data This is an example of a four-sector
search. The three nearest points in
points in the calculation of every grid node.
each quadrant are included during
The distance weighting factors are still gridding in this example.
applied. Therefore, although a point far

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.

Number of Sectors to Search


The Number of sectors to search option divides the search area into smaller sections
to which you can apply the following three search rules. You can specify up to 32
search sectors.

152
Chapter 4 – Creating Grid Files

Maximum Number of Data to Use


The Maximum number of data to use from ALL sectors value limits the total number of
points used when interpolating a grid node. If additional points are found inside the
search range, the points are selected based on their proximity to the grid node.

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.

Minimum Number of Data to Use


The Minimum number of data in all sectors (node is blanked if fewer) value assures
that the specified number of points is encountered when interpolating a grid node. If
the minimum number of points is not found, the blanking value is assigned at the grid
node. Data points beyond the nearest points in a quadrant are ignored even if the
data points in another quadrant are farther from the grid node being calculated.

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

Radius 1 and Radius 2 are positive Radius 1 axis


values indicating the distance in data for the ellipse
units.

Angle is the inclination between the Angle


positive X axis and the ellipse axis
associated with Radius 1. This can be
any value between -360 and +360
degrees. Positive X axis

Blanking values indicate insufficient


data existed to generate a grid node
value at that particular location based The search ellipse angle is the angle between
on the specified search rules. For the positive X axis and the ellipse axis
example, if you inadvertently set your associated with Radius 1.
search ellipse size to be smaller than
half the distance between your data points, a significant number of grid nodes may be
blanked in the grid file. Blanked grid nodes cause truncation of contour lines within
contour maps, and flat regions on wireframes. In addition, blanking values are placed
outside of the convex hull of the data for non-extrapolating gridding methods, like
triangulation with linear interpolation and natural neighbor.

To specify the search options:


1. Select Grid | Data and choose a data file.
2. Select a Gridding Method.
3. Click the Advanced Options button.
4. Click the Search tab in the advanced options dialog.
If the search page does not exist, a sector search is
not allowed (the gridding method uses all of the data).
5. If the No Search (use all of the data) option is
checked, click in the box to uncheck this option if you
want to set search rules.
6. Specify the Number of sectors to search. The number
of sectors can range from one to 32.
7. Specify the search rules so the desired number of
points is considered during interpolation at each grid
node.
The search ellipse
8. Click OK in the advanced options dialog to return to
graphic reflects changes
the Grid Data dialog. made to search ellipse
options.

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.

Usually, points closer to the grid node are given more


weight than points farther from the grid node. If, as
in the example above, the points in one direction
have more similarity than points in another direction,
it is advantageous to give points in a specific direction
more weight in determining the value of a grid node.
The relative weighting is defined by the anisotropy
ratio. The underlying physical process producing the The anisotropy settings have
data, as well as the sample spacing of the data, are an axis ratio and angle.
important in the decision of whether or not to reset
the default anisotropy settings.

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.

Another example of when anisotropy might be employed is an isotherm map (contour


map) of average daily temperature over the upper Midwest. Although the X and Y
coordinates (Easting and Northing) are measured using the same units, along the
east-west lines (X lines) the temperature tends to be very similar. Along north-south
lines (Y lines) the temperature tends to change more quickly (getting colder as you
head north). When gridding the data, it would be advantageous to give more weight
to data along the east-west axis than along the north-south axis. When interpolating

155
Surfer

a grid node, observations that lie in an 0.00

east-west direction are given greater


weight than observations lying an -20.00

equivalent distance in the north-south


direction. -40.00

Depth
-60.00

The anisotropy settings include a Ratio


and an Angle setting. The Ratio is the -80.00

maximum range divided by the minimum


range. An anisotropy ratio less than two -100.00

is considered mild, while an anisotropy


0.00 500.00 1000.00 1500.00 2000.00 2500.00 3000.00

Distance
ratio greater than four is considered 0.00

severe. Typically, when the anisotropy


ratio is greater than three its effect is -20.00

clearly visible on grid-based maps. The


Angle is the preferred orientation -40.00
Depth
(direction) of the major axis in degrees.
-60.00

Example -80.00

An example where an anisotropy ratio is


appropriate is an oceanographic survey -100.00
0.00 500.00 1000.00 1500.00 2000.00 2500.00 3000.00
to determine water temperature at Distance
varying depths. Assume the data are
collected every 1000 meters along a In the oceanographic survey described
here, the contour lines cluster around
survey line, and temperatures are taken
the data points when an anisotropy
every ten meters in depth at each ratio is not employed. In the bottom
sample location. With this type of data contour map, an anisotropy ratio
set in mind, consider the problem of results in contour lines that are a more
creating a grid file. When computing the accurate representation of the data.
weights to assign to the data points,
closer data points get greater weights than points farther away. A temperature at 10
meters in depth at one location is similar to a sample at 10 meters in depth at another
location, although the sample locations are thousands of meters apart. Temperatures
might vary greatly with depth, but not as much between sample locations.

NOTE: Unless there is a good reason to use an anisotropy ratio, you should accept the
default value of 1.0.

Detailed discussions of anisotropy and kriging as well as anisotropy equations are


given in Chapter 5, Variograms.

156
Chapter 4 – Creating Grid Files

For each different gridding method, anisotropy might be specified in a slightly different
manner.

Breaklines and Faults


Breaklines and faults are a means to show discontinuities in the surface. Select
gridding methods support breaklines and/or faults. Breaklines and faults are defined
with boundary .BLN files.

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.

Using Breaklines and Faults when Gridding


To reach the Breaklines and Faults page, click the Advanced Options button in the
Grid Data dialog. Then click on the Breaklines and Faults tab. The Breaklines and
Faults page contains two fields for entering the file names of the faults and breaklines
to use when gridding. If faults are not available with the selected gridding method,
only breaklines are available. The page is then named Breaklines.

 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.

The gridding algorithm search uses a single Z value at


the closest point along the line. The search can cross
the breakline to search for data.

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.

The following gridding methods support breaklines:


• Inverse Distance to a Power
• Kriging
• Minimum Curvature
• Nearest Neighbor
• Radial Basis Function
• Moving Average
• Data Metrics
• Local Polynomial

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:

A breakline uses Z values in a blanking file.

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.

The following gridding methods support faults:


• Inverse Distance to a Power
• Minimum Curvature
• Nearest Neighbor
• Data Metrics

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:

A fault is defined by a blanking file.

160
Chapter 4 – Creating Grid Files

Choosing Gridding Methods


Grid method parameters control the interpolation procedures. When you create a grid
file, you can usually accept the default gridding method and produce an acceptable
map. Different gridding methods provide different interpretations of your data
because each method calculates grid node values using a different algorithm. If you
are not satisfied with the map of your data, you might consider producing grid files
using several different gridding methods and comparing the results.

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.

General Gridding Recommendations


The following list gives you a quick overview of each gridding method and some
advantages and disadvantages in selecting one method over another.

• 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

Polynomial Regression Radial Basis Function


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

Triangulation with Linear Interpolation Moving Average


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

Data Metrics Local Polynomial

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

Choosing Methods Based on the Number of XYZ Data Points


The size of your input data set should be considered when selecting a gridding
method. For example, some gridding methods interpret small data sets more
effectively than others do. Surfer needs a bare minimum of three non-collinear XYZ
points to perform the gridding process.
• Ten or fewer points are not enough to define more than a general trend in your
data. Triangulation with Linear Interpolation and Moving Average are not effective
with few points. As with most data sets, Kriging and Radial Basis Function
methods will produce the best representation of your data in this situation. If you
want only to define the trend of the data, you can use Polynomial Regression.
With 10 or fewer points, gridding is extremely fast, so you might want to try the
different methods to determine the most effective method for your data.
• With small data sets (<250 observations), Kriging with the default linear
variogram, or Radial Basis Function with the multiquadric function produce good
representations of most data sets.
• With moderate-sized data sets (from 250 to 1000 observations), Triangulation
with Linear Interpolation is fast and creates a good representation of your data.
Although Kriging or Radial Basis Function generate the grids more slowly, they
also produce good data representations.
• For large data sets (>1000 observations), both Minimum Curvature and
Triangulation with Linear Interpolation are quite fast, and both produce good
representations. As with most other data sets, Kriging or Radial Basis Function
probably produce the best maps but are quite a bit slower.
• Using Kriging or Radial Basis Function with large data sets does not result in
significantly different gridding times. For example, if your data file contains 3,000
or 30,000 data points, the gridding time is not significantly different. Either data
set might take a considerable amount of time to grid, but they take approximately
the same amount of time.

166
Chapter 4 – Creating Grid Files

Exact and Smoothing Interpolators


Gridding methods included with Surfer are divided into three general categories:
exact interpolators, smoothing interpolators, and data metrics. Some exact
interpolators can incorporate a smoothing factor that causes them to become
smoothing interpolators.

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.

The following methods are exact interpolators:


• Inverse Distance to a Power when you do not specify a smoothing factor
• Kriging when you do not specify a nugget effect
• Nearest Neighbor under all circumstances
• Radial Basis Function when you do not specify an R2 value
• Modified Shepard's Method when you do not specify a smoothing factor
• Triangulation with Linear Interpolation
• Natural Neighbor

Smoothing interpolators or smoothing factors can be employed during gridding when


you do not have strict confidence in the repeatability of your data measurements.
This type of interpolation reduces the effects of small-scale variability between
neighboring data points. Smoothing interpolators do not assign weights of 1.0 to any
single point, even when a point is exactly coincident with the grid node. When
smoothing is used, weighting factors are assigned so the map is smoother. In the
extreme case, all data points are given equal weight and the surface becomes a
horizontal plane at the average for all data in the data file.

167
Surfer

The following methods are smoothing interpolators:


• Inverse Distance to a Power when you specify a smoothing factor
• Kriging when you specify an error nugget effect
• Polynomial Regression
• Radial Basis Function when you specify an R2 value
• Modified Shepard's Method when you specify a smoothing factor
• Local Polynomial
• Moving Average

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.

Inverse Distance to a Power


The Inverse Distance to a Power gridding method is a weighted average interpolator,
and can be either an exact or a smoothing interpolator.

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.

Normally, inverse distance to a power behaves as an exact interpolator. When


calculating a grid node, the weights assigned to the data points are fractions, and the
sum of all the weights is equal to 1.0. When a particular observation is coincident with
a grid node, the distance between that observation and the grid node is 0.0, and that
observation is given a weight of 1.0, while all other observations are given weights of
0.0. Thus, the grid node is assigned the value of the coincident observation. The
Smoothing parameter is a mechanism for buffering this behavior. When you assign a
non-zero Smoothing parameter, no point is given an overwhelming weight so that no
point is given a weighting factor equal to 1.0.

One of the characteristics of inverse distance to a power is the generation of "bull's-


eyes" surrounding the position of observations within the gridded area. You can
assign a smoothing parameter during inverse distance to a power to reduce the
"bull's-eye" effect by smoothing the interpolated grid.

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

Ẑ j is the interpolated value for grid node j

Zi are the neighboring points

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

Inverse Distance to a Power Advanced Options Dialog


In the Grid Data dialog, specify Inverse Distance to a Power as the Gridding Method
and click the Advanced Options to open the Inverse Distance Advanced Options
dialog.

The General page in the Inverse Distance Advanced Options dialog


allows you to specify the parameters to use when gridding with
the inverse distance to a power gridding method.

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.

Breaklines and Faults Page


Specify breaklines and faults on the Breaklines and Faults page. For more
information about breaklines or faults, refer to the Breaklines and Faults section in this
chapter.

Inverse Distance to a Power References


Davis, John C. (1986), Statistics and Data Analysis in Geology, John Wiley and Sons,
New York.
Franke, R. (1982), Scattered Data Interpolation: Test of Some Methods, Mathematics
of Computations, v. 33, n. 157, p. 181-200.

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.

An important component of the kriging gridding method is the variogram. Variograms


are discussed in detail in Chapter 5 - Variograms. The default linear variogram
provides a reasonable grid in most circumstances, as long as a nugget effect is not
used. It is advised that you not change the variogram components without first
modeling the variogram with the Grid | Variogram | New Variogram command. If
you do not understand variograms or variogram modeling, use the default linear
variogram with no nugget effect. When in doubt, use the default linear variogram.

172
Chapter 4 – Creating Grid Files

Kriging Advanced Options Dialog


In the Grid Data dialog, specify Kriging as the Gridding Method and click the
Advanced Options to open the Kriging Advanced Options dialog.

Specify the variogram parameters, kriging standard deviations file,


kriging type, and drift type in the Kriging Advanced Options dialog.

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.

Output Grid of Kriging Standard Deviations

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.

The numerical integration required for point-to-block variogram calculations necessary


for Block kriging is carried out using a 3x3, two-dimensional Gaussian-Quadrature. In
particular, Surfer uses Section 25.4.62 of Abramowitz and Stegun (1972).

Point kriging is the default method.

In the diagram to the left, the crosses


indicate a block of grid nodes and the
filled circles indicate data points. If we
were to interpolate the center grid
node with Point kriging, the data point
closest to the center grid node would
have the greatest weight in
determining the value of the grid
node. If we were to interpolate the
center grid node with Block kriging, all
three data points within the block of
grid nodes are averaged to interpolate
the grid node value.

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).

Abramowitz, M., and Stegun, I. (1972), Handbook of Mathematical Functions, Dover


Publications, New York.
Cressie, N. A. C. (1990), The Origins of Kriging, Mathematical Geology, v. 22, p. 239-
252.
Cressie, N. A. C. (1991), Statistics for Spatial Data, John Wiley and Sons, Inc., New
York, 900 pp.
Deutsch, C.V., and Journel, A. G. (1992), GSLIB - Geostatistical Software Library and
User's Guide, Oxford University Press, New York, 338 pp.
Isaaks, E. H., and Srivastava, R. M. (1989), An Introduction to Applied Geostatistics,
Oxford University Press, New York, 561 pp.
Journel, A.G., and Huijbregts, C. (1978), Mining Geostatistics, Academic Press, 600
pp.
Journel, A.G. (1989), Fundamentals of Geostatistics in Five Lessons, American
Geophysical Union, Washington D.C.

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

There are three sets of associated boundary conditions:

On the edges: (1 − Tb ) 2 + (Tb ) ∂Z = 0


∂2Z
∂n ∂n

∂ (∇2 Z )
On the edges: =0
∂n

∂2Z
At the corners: =0
∂x∂y
where

∇2 is the Laplacian operator n is the boundary normal

Ti is the internal tension Tb is the boundary tension

Minimum Curvature Advanced


Options
In the Grid Data dialog, specify
Minimum Curvature as the
Gridding Method and click the
Advanced Options to open the
Minimum Curvature Advanced
Options dialog.

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:

Default Max Residual = 0.001 (Zmax - Z min)

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 relaxation approach is a local smoothing process and, consequently, short-


wavelength components of Z are found quickly. On the other hand, the relaxation
process does not propagate the effects of the data constraints to longer wavelengths
efficiently.
As recommended by Briggs (1974) and Smith and Wessel (1990), this routine
determines convergence by comparing the largest magnitude nodal change in one
iteration to the specified tolerance. In Surfer, this is done with the Maximum
Residual.

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.

Internal and Boundary Tension


Qualitatively, the minimum curvature gridding algorithm is attempting to fit a piece of
sheet metal through all of the observations without putting any creases or kinks in the
surface. Between the fixed observation points, the sheet bows a bit. The Internal
Tension is used to control the amount of this bowing on the interior: the higher the
tension, the less the bowing. For example, a high Internal Tension makes areas
between observations look like facets of a gemstone. The Boundary Tension controls
the amount of bowing on the edges. By default, the Internal Tension and the
Boundary Tension are set to zero. Both the Internal Tension and the Boundary Tension
must be between zero and one.

Anisotropy
Set Anisotropy settings if needed. For more information about anisotropy settings,
refer to the Anisotropy section of this chapter.

Breaklines and Faults Page


Specify breaklines and faults on the Breaklines and Faults page. For more
information about breaklines or faults, refer to the Breaklines and Faults section in this
chapter.

Minimum Curvature References


Briggs, I. C. (1974), Machine Contouring Using Minimum Curvature, Geophysics, v.
39, n. 1, p. 39-48.
Press, W.H., Flannery, B.P., Teukolsky, S.A., and Vetterling, W.T. (1988), Numerical
Recipes in C, Cambridge University Press.
Smith, W. H. F., and Wessel, P. (1990), Gridding with Continuous Curvature Splines in
Tension, Geophysics, v. 55, n. 3, p. 293-305.

180
Chapter 4 – Creating Grid Files

Modified Shepard's Method


Modified Shepard's Method uses an inverse distance weighted least squares method.
As such, modified Shepard's method is similar to the inverse distance to a power
interpolator, but the use of local least squares eliminates or reduces the "bull's-eye"
appearance of the generated contours. The modified Shepard's method can be either
an exact or a smoothing interpolator.

The Surfer algorithm implements Franke and Nielson's (1980) modified quadratic
Shepard's method with a full sector search as described in Renka (1988).

Shepard's Method Advanced Options Dialog


In the Grid Data dialog, specify
Modified Shepard’s Method as the
Gridding Method and click the
Advanced Options button to open
the Shepard’s Method
Advanced Options dialog.

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.

Modified Shepard's Method References


Franke, R., and Nielson, G. (1980), Smooth Interpolation of Large Sets of Scattered
Data, International Journal for Numerical Methods in Engineering, v. 15, p.
1691-1704.
Renka, R. J. (1988), Multivariate Interpolation of Large Sets of Scattered Data, ACM
Transaction on Mathematical Software, v. 14, n. 2, p. 139-148.
Shepard, D. (1968), A two-dimensional interpolation function for irregularly spaced
data, Proc. 23rd Nat. Conf. ACM, p. 517-523.

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).

Natural Neighbor Advanced Options


In the Grid Data dialog, specify Natural Neighbor as the Gridding Method and click the
Advanced Options button to open the Natural Neighbor Advanced Options dialog.

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.

Natural Neighbor References


The main reference for this method is Sibson (1981), however, also refer to Sibson
(1980) and Watson (1994). Watson (1994) discusses the Natural Neighbor gridding
technique in some detail, though Surfer does not use any of Watson's source code.

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.

Nearest Neighbor Advanced Options


In the Grid Data dialog, specify
Nearest Neighbor as the
Gridding Method and click the
Advanced Options button to
open the Nearest Neighbor
Advanced Options dialog.

Search
Set the search range and angle.
For more information on search
properties, see the Search
section of this chapter.

Breaklines and Faults Page


Specify breaklines and faults Set the search parameters on the General page
on the Breaklines and Faults in the Nearest Neighbor Advanced Options dialog.
page. For more information
about breaklines or faults, refer
to the Breaklines and Faults section in 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.

Regression Advanced Options Dialog


In the Grid Data dialog, specify Polynomial Regression as the Gridding Method and
click the Advanced Options button to open the Regression Advanced Options
dialog.

Specify the Surface Definition and Parameters


in the Regression Advanced Options dialog.

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.

Max Total Order


The Max Total Order specifies the maximum sum of the Max X Order and Max Y Order
powers. All of the combinations of the X and Y components are included in the
polynomial equation as long as the sum of the two powers does not exceed the Max
Total Order value. The Max Total Order must be at least equal to the higher value of
the Max X Order or Max Y Order. The highest order polynomial is 10, which means
that the Max Total Order must be between zero and 10.

Polynomial Regression Reference


Draper, N., and Smith, H. (1981), Applied Regression Analysis, second edition, Wiley-
Interscience, 709 pp.

Radial Basis Function


Radial Basis Function interpolation is a diverse group of data interpolation methods.
In terms of the ability to fit your data and to produce a smooth surface, the
Multiquadric method is considered by many to be the best. All of the radial basis
function methods are exact interpolators, so they attempt to honor your data. You
can introduce a smoothing factor to all the methods in an attempt to produce a
smoother surface.

186
Chapter 4 – Creating Grid Files

Radial Basis Function Advanced Options


In the Grid Data dialog,
specify Radial Basis Function
as the Gridding Method and
click the Advanced Options
button to open the Radial
Basis Advanced Options
dialog.

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.

Basis Function Types


The basis kernel functions define the optimal set of weights to apply to the data points
when interpolating a grid node. The available basis kernel functions are listed in the
Basis Function list in the Radial Basis Function Advanced Options dialog.
1
Inverse Multiquadric B ( h) =
h + R2
2

Multilog B(h) = log(h 2 + R 2 )

Multiquadric B ( h) = h 2 + R 2

B ( h) = ( h 2 + R 2 )
3/ 2
Natural Cubic Spline

Thin Plate Spline B (h) = ( h 2 + R 2 ) log( h 2 + R 2 )


187
Surfer

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

Radial Basis Function References


A concise and readable introduction to radial basis function interpolation can be found
in Carlson and Foley (1991a). Given the clarity of presentation and the numerous
examples, Hardy (1990) provides an excellent overview of the method, although this
paper focuses exclusively on the special case of multiquadrics.

Carlson, R.E., and Foley, T.A. (1991a), Radial Basis Interpolation Methods on Track
Data, Lawrence Livermore National Laboratory, UCRL-JC-1074238.

Carlson, R. E., and Foley, T. A. (1991b), The Parameter R2 in Multiquadric


Interpolation, Computers Math. Applic, v. 21, n. 9, p. 29-42.
Franke, R. (1982), Scattered Data Interpolation: Test of Some Methods, Mathematics
of Computations, v. 33, n. 157, p. 181-200.
Hardy, R. L. (1990), Theory and Applications of the Multiquadric-BiHarmonic Method,
Computers Math. Applic, v. 19, n. 8/9, p. 163-208.
Powell, M.J.D. (1990), The Theory of Radial Basis Function Approximation in 1990,
University of Cambridge Numerical Analysis Reports, DAMTP 1990/NA11.

Triangulation with Linear Interpolation


The Triangulation with Linear Interpolation method uses the optimal Delaunay
triangulation. The algorithm creates triangles by drawing lines between data points.
The original points are connected in such a way that no triangle edges are intersected
by other triangles. The result is a patchwork of triangular faces over the extent of the
grid. This method is an exact interpolator.

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

Triangulation with Linear Interpolation Advanced Options


In the Grid Data
dialog, specify
Triangulation with
Linear Interpolation as
the Gridding Method
and click the
Advanced Options
button to open the
Triangulation
Advanced Options
dialog.

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.

Triangulation with Linear Interpolation References


The Surfer implementation of triangulation with linear interpolation is based upon
several papers. Lee and Schachter (1980) present a complete discussion of Delaunay
triangulation, including the details of two algorithms and the underlying mathematical
proofs. Lawson (1977) is equally informative. The algorithm presented in Guibas and
Stolfi (1985) form the basis for the Surfer implementation.

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.

Lawson, C. L. (1977), Software for C1 surface interpolation, Mathematical Software


III, J. Rice (ed.), Academic Press, New York, p. 161-193.
Lee, D. T., and Schachter, B. J. (1980), Two Algorithms for Constructing a Delaunay
Triangulation, International Journal of Computer and Information Sciences, v.
9, n. 3, p. 219-242.

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.

Moving Average Advanced Options


In the Grid Data dialog,
specify Moving Average as
the Gridding Method and
click the Advanced Options
button to open the Moving
Average Advanced
Options dialog.

Minimum Number of Data


The Minimum number of data
(node is blanked if fewer)
value sets the specified
number of points when
interpolating a grid node. If
the minimum number of
points is not found, the
blanking value is assigned to
Set the blanking options and the search ellipse in
the grid node. the Moving Average Advanced Options dialog.

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 )}

and where n = number of data points in the local data set.

The Z(r,c) location refers to a specific node within the grid.

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.

Data Metrics Advanced Options


In the Grid Data dialog, specify Data Metrics as the Gridding Method and click the
Advanced Options button to open the Data Metrics Advanced Options dialog.

A description of the metric is listed in the right side of the


General page when you click on each metric.

Data Metric to Grid


In the Data Metric to Grid section, select the desired data metric. The right side of the
dialog will update to contain additional information about the selecte metric.

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.

Breaklines and Faults


Specify breaklines and faults on the Breaklines and Faults page. For more
information about breaklines or faults, refer to the Breaklines and Faults section in this
chapter.

Data Metrics Descriptions


There are five groups of data metrics, Z Order Statistics, Z Moment Statistics, Other Z
Statistics, Data Location Statistics, and Terrain Statistics.

Z Order Statistics
The data at a grid node within the search parameters are sorted for the Z order
statistics.

{z [1] , z [2] ,  , z [n] }


where z[1] ≤ z[2 ] ≤  ≤ z[n ] . Square brackets indicate ordered Z values.

Data Definition Equation


Metric
Minimum each nodal value is the minimum Z value Z (r , c ) = min (z1 , z 2 ,  , z n ) = z[1]
of data selected by the specified sector
search centered at that node
Lower each nodal value is the 25th percentile Z Z (r , c ) = z  n 
Quartile value of data selected by the specified 4
 
sector search centered at that node
Median each nodal value is the median Z value of Z (r , c ) = z  n 
data selected by the specified sector 2
 
search centered at that node
Upper each nodal value is the 75th percentile Z Z (r , c ) = z  3n 
Quartile value of data selected by the specified  4 
 
sector search centered at that node
Maximum each nodal value is the maximum Z value Z (r , c) = max(z1 , z 2 , , z n ) = z[n ]
of data selected by the specified sector
search centered at that node

194
Chapter 4 – Creating Grid Files

Range each nodal value is the difference between Z (r , c) = z[n ] − z[1]


the maximum Z value and the minimum Z
value for the data selected by the
specified sector search centered at that
node
Midrange each nodal value is the average of the z[n ] + z[1]
maximum Z value and the minimum Z Z (r , c ) =
value, for the data selected by the 2
specified sector search centered at that
node
Interquartile The Interquartile Range data metric Z (r , c ) = z  3n  − z  n 
Range generates a grid for which each nodal  4  4
   
value is the difference between the 75th
percentile Z value and the 25th percentile
Z value, for the data selected by the
specified sector search centered at that
node. This data metric shows the spatial
variation of variability of the data, but it
focuses on the middle fifty percent of the
data only. Thus, it is insensitive to
variations in the tails of the local
distributions.

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

search centered at that node. Note that


this measure is useless for data whose
local mean values are close to zero; this
includes data that changes sign within
the domain of interest.

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

by the specified sector search centered at


that node.
The Median Absolute Deviation (M.A.D. ) Z (r , c ) = d  n 
data metric generates an output grid for 2
 
which each nodal value is the median
absolute deviation of the data selected by
the specified sector search centered at
that node.
where d i = zi − z  n 
M.A.D. 2
 

these di are sorted into


ascending order and indexed as

{d [1], d [2],, d [n]}


The Root Mean Square (R.M.S.) data n
Z (r , c ) = ∑z
metric generates an output grid for which 1 2
R.M.S. each nodal value is the root mean square n
i
of the data selected by the specified i =1
sector search centered at that node.

Data Location Statistics


The separation distances between the current grid node and each of the selected data
are used in the computation of the data location statistics. In the following discussion,
let the location of the current grid node be represented as (x0, y0).

The list of separation distances is defined as The Ri are sorted in ascending


order
and indexed as

Ri = ( x i − x 0 )2 + ( y i − y 0 )2 {R[1] , R[2] ,  , R[n] }

196
Chapter 4 – Creating Grid Files

Data Metric Definition Equation


Count each nodal value is the number of data Z (r , c ) = n
selected by the specified sector search
centered at that node. Under most
circumstances, the best interpolation
results occur when the Count is
approximately homogeneous throughout
the area of interest.
Approximate each nodal value is the number of data
Z (r , c ) =
n
Density selected by the search centered at that
πR[n ]
node, divided by πRn2 where R[n ] is the
distance from the node to the farthest
selected datum. The area over which the
density is computed is bounded by the
distance to the farthest selected datum.
When the data are relatively sparse, the
computed density is slightly over-stated.
Distance to each nodal value is the distance to the Z (r , c ) = R[1]
Nearest nearest datum selected by the specified
sector search centered at that node
Distance to each nodal value is the distance to the Z (r , c ) = R[n ]
Farthest farthest datum selected by the specified
sector search centered at that node
Median each nodal value is the median Z (r , c ) = R n 
Distance separation distance between the node 2
 
and all of the data selected by the
specified sector search centered at that
node
Average each nodal value is the average n
Z (r , c ) = ∑R
Distance separation distance between the node
1
i
and all of the data selected by the n i =1
specified sector search centered at that
node
Offset each nodal value is the distance between
Distance the node and the centroid of all of the Z (r , c ) = (x0 − xc )2 + ( y0 − yc )2
data selected by the specified sector where the centroid coordinates
search centered at that node
(xc, yc ) are
n

∑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

where εi is an error term.

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.

Data Definition Equation


Metric
Terrain each nodal value is the Z (r , c ) = RadiansToDegrees(atan(hypot ( A, B )))
Slope terrain slope of the least-
squares-fit plane of the data
selected by the specified
sector search centered at
that node
Terrain each nodal value is the Z (r , c ) = 270.0 − RadiansToDegrees(atan 2( A, B ))
Aspect terrain aspect, as an angle
from zero to 360 degrees, of
the least-squares-fit plane
of the data selected by the
specified sector search
centered at that node

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

The form of these polynomials are:

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

A XY = 2(T XX T XY + TYX TYY )


AYY = TYY
2
+ T XY
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

where Wi is the weight for datum i and p is the specified power.

Let the collection of neighboring

{(xi , y i , z i ) for i = 1,2,  , N }


data be enumerated as

The local least squares


parameters are computed by
minimizing the weighted sum of
the squared residuals:
N
Minimize ∑ W [F (x , y ) − z ]
i =1
i i i i
2

Choose a Power and Polynomial Order in the


Local Polynomial Advanced Options dialog.

200
Chapter 4 – Creating Grid Files

Local Polynomial Advanced Options


In the Grid Data dialog, specify Local Polynomial as the Gridding Method and click the
Advanced Options button to open the Local Polynomial Advanced Options dialog.

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.

Producing a Grid File from a Regular Array of XYZ Data


When your XYZ data are collected or generated on regular intervals it is possible to
produce a grid file that uses your values directly and does not interpolate the values
for the grid nodes. You can use the Grid | Data command to create a grid file in the
correct format.

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.

To create a grid based on a function:


1. Click the Grid | Function. The Grid Function dialog is displayed.
2. Enter the function of interest into the box titled: Enter a function of the form Z = f
(X,Y). The function calculation is repeated one time for each Z value to be written
to the output grid file. The number of grid nodes in the output grid and, therefore,
the number of calculations to be performed, is based on the Minimum, Maximum
and Increment values specified.
3. In the Minimum X and Y boxes, specify the beginning values used in the specified
function. These values are entered into the defined function and the first grid
node is calculated based on these values. These values also specify the lower
limits for X and Y in the output grid file.

202
Chapter 4 – Creating Grid Files

4. In the Maximum X and Y


boxes, specify upper
values to be applied to
the function and the
upper X and Y limits for
the grid.
5. In the Increment boxes,
specify the amount to
step in the X and Y
directions for each grid
line. This is similar to
the grid spacing setting Set the mathematical function, the minimum and
in the Grid Data dialog. maximum X and Y values, and the function increment
6. In the Output Grid File values in the Grid Function dialog.

section, click the


button and specify the path and file name for the grid file to be created.
7. Click OK and a grid file is created based on the function and parameters you
specify.

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

an integrated data analysis tool. The primary 400

purpose of the variogram modeling subsystem is to 350

assist users in selecting an appropriate variogram 300


model when gridding with the kriging algorithm. The
variogram modeling subsystem may also be used to

Variogram
250

quantitatively assess the spatial continuity of data 200

even when the kriging algorithm is not applied. 150

100

Surfer's variogram modeling feature is intended for 50

experienced variogram users. The novice variogram 0

user may find the following four authors helpful:


0.00 0.50 1.00 1.50 2.00 2.50 3.00 3.50 4.00
Lag Distance
Cressie (1991), Isaaks and Srivastava (1989),
Kitanidis (1997), and Pannatier (1996). Please refer This is a variogram using the
to the Suggested Reading section of this chapter for default parameters.
full references for each of the previous books. If you
do not understand variograms or if you are unsure
about which model to apply, use Surfer's default linear variogram with the kriging
algorithm.

Variogram modeling is not an easy or straightforward task. The development of an


appropriate variogram model for a data set requires the understanding and application
of advanced statistical concepts and tools: this is the science of variogram modeling.
In addition, the development of an appropriate variogram model for a data set
requires knowledge of the tricks, traps, pitfalls, and approximations inherent in fitting
a theoretical model to real world data: this is the art of variogram modeling. Skill with
the science and the art are both necessary for success.

The development of an appropriate variogram model requires numerous correct


decisions. These decisions can only be properly addressed with an intimate knowledge
of the data at hand, and a competent understanding of the data genesis (i.e. the
underlying processes from which the data are drawn). The cardinal rule when
modeling variograms is know your data.

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.

Remember that a particular directional experimental variogram is associated with a


direction. The ultimate variogram model must be applicable to all directions. When
fitting the model, the user starts with numerous slices, but must ultimately mentally
integrate the slices into a final 3D model.

Kriging and Variograms


The kriging algorithm incorporates four essential details:
1. When computing the interpolation weights, the algorithm considers the spacing
between the point to be interpolated and the data locations. The algorithm
considers the inter-data spacing as well. This allows for declustering.
2. When computing the interpolation weights, the algorithm considers the inherent
length scale of the data. For example, the topography in Kansas varies much
more slowly in space than does the topography in central Colorado. Consider two
observed elevations separated by five miles. In Kansas, it would be reasonable to
assume a linear variation between these two observations, while in the Colorado
Rockies such an assumed linear variation would be unrealistic. The algorithm
adjusts the interpolation weights accordingly.

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.

Consider the following variogram grid:

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.

The separation distance is: The separation angle is:

 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.

The separation angle and separation distance


for each pair are calculated using
the previous equations.

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 (γ)

250 26 Model Curve


20
200
17
21 17
150
13 31 37
35
Scale (C) 28
Sill

11
100
18
Pairs
13
50

4 Experimental Variogram Curve


Nugget Effect 4
0
0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0

Lag Distance (h)

This is a variogram model showing the variogram parameters.

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.

MODEL CURVE: shows the shape of the variogram model.

EXPERIMENTAL CURVE: displays the groups of variogram pairs on a plot of separation


distance versus the estimated variogram.

For more information on the nugget effect, scale, and length settings, see the Model
section.

Creating a Variogram
To create a new variogram,

1. Click the Grid | Variogram | New Variogram command, or click the


button.
2. Select the data file in the Open Data dialog and click Open to create a new
variogram from the data file.
3. The New Variogram dialog is displayed.
4. Set the data columns to use, how to treat duplicate data, and create any exclusion
filters on the Data tab.
5. Set the initial variogram grid settings on the General tab.
6. Click OK to create the 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.

New Variogram Dialog


The New Variogram dialog contains options for setting up the variogram grid used
for the variogram. Once the variogram is created, the variogram properties, such as
the variogram model used, are changed in the Property Manager. Once the
variogram grid is created, it is used for the duration of the variogram modeling effort.
The Variogram Grid section of this chapter provides more information on variogram
grids.

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.

Data Exclusion Filter


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 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.

Max Lag Distance


Max Lag Distance specifies the largest separation distance contained in the variogram
grid. Any pairs separated by more than the maximum lag distance are not included in
the variogram grid. The default value of the Max Lag Distance is one-third the
diagonal extent of the data rounded down at the second significant figure (i.e. 1.2345
becomes 1.2).

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

The Experimental Page


The Experimental page in the variogram properties dialog contains parameters for
the experimental variogram such as the lag direction, estimator type, maximum lag
distance, number of lags, lag width, and vertical scale.

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:

Direction - Tolerance < Angle <


Direction + Tolerance

thus, the width of the entire


angular window is twice the The Experimental page in the Property Manager
contains the parameters for the experimental
Tolerance. For example, the
variogram. The diagram in the Lag Direction group
default Tolerance of 90° captures shows the direction and size of the angular window
all directions (omni-directional of the current variogram.
variogram). The diagrammatic
representation of the current
angular window appears in the Lag Direction section.

216
Chapter 5 - Variograms

Step Amount and Step Direction


When building a complete model of a variogram, it is necessary to review the
variogram and the model in many directions. Surfer allows you to step through as
many directions as desired in an animated fashion. Since Surfer uses a variogram
grid approach, it can compute and replot directional variograms almost
instantaneously. The Step Amount specifies the increment in the lag Direction each
time the Step CW or Step CCW buttons are clicked. When the Step CW button is
clicked, the lag Direction is decremented by the Step amount and the variogram plot is
automatically updated. When the Step CCW button is clicked, the lag Direction is
incremented by the Step Amount and the variogram plot is automatically updated.

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.

An observation is an (X,Y,Z) triple. A pair of observations contains two such triples.


Consider the set of N pairs of observations that go into the calculation of a single
plotted point on an experimental variogram. These N pairs are ordered pairs; the two
observations are not randomly ordered within a pair. The first observation in the pair
is the point with the smaller Y value and the second observation is the point with the
larger Y value. The first observation is called the "head" (denoted by an "h"), and the
second observation is called the "tail" (denoted by a "t").

Let
Zhi be the observed value of the head observation of the ith pair, and

Zt i be the observed value of the tail observation of the ith pair.

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

Then define the following two intermediate quantities:

Lag Variance = VARh × VARt


 Zht 
Lag Covariance =   − ( AVEh × AVEt )
 N 
Variogram
The classical variogram estimator is:

γ =
(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).

Maximum Lag Distance


The Max lag distance specifies the extent of the separation distance axis (abscissa or X
axis). This value should never be larger than the Max lag distance specified in the
New Variogram dialog. Pairs with separation values beyond the New Variogram
Max lag distance have been eliminated from the variogram already. The Max lag
distance specified when creating the variogram grid in the New Variogram dialog
limits the maximum separation distance that you can look without recreating a new
variogram grid. The Max lag distance specified in the variogram properties dialog
limits the maximum separation distance you will look. The Max lag distance specified
on the Experimental page in the variogram properties is often less than the Max lag
distance specified when creating the variogram grid.

Number of Lags
The Number of lags specifies how many experimental variogram points are computed
and plotted. The default Number of lags is 25.

Lag Width and Auto Lag Width


When the Auto lag width box is checked, the Lag width is automatically set equal to
the Max lag distance divided by the Number of lags. For example, if the Max lag
distance is 100, and the Number of lags is five, the Lag width would be set to 100 / 5
= 20. In this case, the first plotted point would summarize all pairs with separation
distances greater than or equal to zero and less than 20. The second plotted point
would summarize all pairs with separation distances greater than or equal to 20 and
less than 40, etc. Lag intervals are 0 to 20, 20 to 40, ..., 80 to 100; they do not
overlap. You can use Lag width to smooth a variogram.

219
Surfer

Smoothing the Variogram with Lag Width


When the Auto lag width box is not checked, the Lag width may be independently
specified. In this case, the Lag width is not a function of the Max lag distance and the
Number of lags. This flexibility allows for overlapping lag intervals and, therefore, a
smoothed experimental variogram.

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.

for(lag = 0; lag < Number of Lags; ++lag )


{
center = Max Lag Distance / Number of Lags * (lag+0.5);
from = max( center - ( Lag Width / 2.0 ), 0.0 );
to = min( center + ( Lag Width / 2.0 ), Max Lag Distance );
}

Vertical Scale and Auto Vertical Scale


The Vertical scale specifies the extent of the variogram axis (ordinate or Y axis). If
the Auto vertical scale box is checked, the vertical scale is determined on the fly so
that the entire variogram fits on the plot. When the Auto vertical scale box is checked
the vertical scale is recomputed every time the variogram is redrawn. As you step
around with the Step CCW or Step CW buttons, the vertical scale changes with each
step.

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

The Model Page


The Model page in the variogram
properties allows you to set a
specific variogram model and its
parameters. Computing an
experimental variogram from your
data is the only certain way to
determine which variogram model
you should use. A detailed
variogram analysis can offer
insights into the data that would
not otherwise be available, and it
allows for an objective assessment
of the variogram scale and
anisotropy. There are lengthy
chapters in many geostatistics
textbooks discussing the tools and
techniques necessary to generate Options such as the variogram model
a variogram (e.g. Isaaks and are set through the Model page.
Srivastava, 1989).

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

A is the component’s Length parameter.

The anisotropically rescaled relative separation distance for the variogram equations is
computed by the following matrix equation:

cos θ − sin θ  ( 1 A )2 0   cos θ sin θ   ∆ x 


h= [∆ x ∆ y ]  2 
 sin θ cos θ   0 ( )
ρ
A  − sin θ cos θ  ∆ y 

where
[∆ x ∆ y] is the separation vector (in map coordinates),

A is the component’s Length parameter.

222
Chapter 5 - Variograms

θ is the anisotropy Angle, and


ρ is the anisotropy Ratio.

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 nugget effect is made up of


two components:

Nugget Effect = Error Variance +


Micro Variance This is the nugget effect model.

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.

Surfer's implementation of the nugget effect follows the recommendation of Cressie


(1991, Section 3.2.1), and this reference should be consulted for a more rigorous
presentation of the nugget effect and its partitioning.

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.

An example of when anisotropy might be employed is an isotherm map (contour map)


of average daily temperature over the upper Midwest. Although the X and Y
coordinates (i.e., Easting and Northing) are measured using the same units, along the
east-west lines the temperature tends to be very similar. Along north-south lines, the
temperature tends to change more quickly (getting colder as you head north). When
creating a variogram with this data it would be advantageous to give more weight to
data along the east-west axis than along the north-south axis. When interpolating a
grid node, observations that lie in an east-west direction are given greater weight than
observations lying an equivalent distance in the north-south direction.

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 Page


AutoFit takes a user specified variogram model and an initial set of parameters, and
attempts to find a better set of parameter values. For example, if a user has selected
a spherical variogram model with a nugget effect, the AutoFit tool can be used to
determine the "best" fitting anisotropy parameters.

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.

The underlying fitting algorithm is a simple implementation of Powell's Search Method.


This search does not involve the use of derivatives. This means there are no gradient
calculations. One iteration of this algorithm includes a line search along each of the
individual parameter directions, and then a line search along the accumulated
direction moved during this iteration. There is some useful discussion of this method
in Press et al. (1988, Section 10.1). However, this routine does not attempt to build a
set of conjugate directions.

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

The Automatic Variogram Fitting dialog is opened by clicking the AutoFit


button on the Model page in the Property Manager. The AutoFit
feature does not select an appropriate model. Before using AutoFit, select
reasonable model parameters and then use AutoFit to fine tune the model.

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

OldObjective - NewObjective < OldObjective * TargetPrecision/100

Note that the target precision is given as a percentage.

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

Parameter Fit Limits


The Parameter Fit Limits define the range of values over which the fitting algorithm
searches. The Parameter Fit Limits allow the user a great deal of control in applying
the fitting algorithm. For example, if you specify the Maximum equal to the Minimum,
the fitting algorithm does not adjust the specified parameter.

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.

Variogram Model Graphics


Surfer allows for a general nested variogram model. There are no limits on the
number of models that can be nested in Surfer. Because of this, there are hundreds
of possible combinations of variogram models. 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.

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

The variogram model components


available in Surfer are shown below. For
all these models, the variogram equation
variables:
γ (h ) is the semi-variogram

C is the scale for the structured


component of the variogram
h is the anisotropically rescaled, relative
separation distance

Variogram Model Components Select a variogram model component in


the Add Component dialog.
The variogram model components
available in Surfer are:

229
Surfer

230
Chapter 5 - Variograms

231
Surfer

The Statistics Page


The Statistics page in the Property Manager contains one option, a Display
Statistics button. Clicking this button opens the Properties dialog. This dialog shows
histograms and scatter plots of the data, as well as providing statistics on the data.

On the Statistics page, you can show an X, Y, or Z


histogram, view statistics, or generate a variogram report.

232
Chapter 5 - Variograms

The X, Y, Z Histogram options show the distribution of the X, Y, and Z data


respectively. The histogram is shown to the right of the options. The XY Scatter
option shows the distribution of the data as a simple scatter diagram.

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.

The Plot Page


Most of the visual characteristics of the
variogram display are controlled though
the Plot page.

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.

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.

Symbols
To display Symbols, check the Enable
box in the Symbols section.

To change the symbol properties, click


the + next to Marker Properties. You
can change any desired symbol
properties, including the symbol type, Control the display of the variogram graph
size, and color. on the Plot page of the variogram
properties in the Property Manager.

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

Default Linear Variogram


The default linear variogram takes the form

γ (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.

Using Variogram Results in Kriging


Once you have completed the variogram, you can use the results of the variogram
model when gridding the data with the Kriging gridding option.

To use model results:


1. Make sure the plot window containing the variogram is open. If you switch to a
new plot window, the variogram results cannot be used.
2. Select Grid | Data.
3. In the Open Data dialog, choose the data file to be modeled and click Open.
4. In the Grid Data dialog, select Kriging for the Gridding Method.
5. Click the Advanced Options button to open the Kriging Advanced Options
dialog.
6. Click the Get Variogram button to use the variogram model open in the plot
window. If more than one variogram exists in the document, a dialog is displayed
prompting you for the variogram to use.
7. Click OK in both dialogs and the variogram is used to create the grid.

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 shape of the surface is shown by


the contour lines. Contour maps can
display the contour lines; they can also
display colors and patterns between the
contour lines.

As an example, consider an island in a


lake viewed from above. The island This is a contour map
shoreline represents the same elevation consisting of contour
(the same Z value) around the entire lines representing elevation.
island. Viewed from above, the shoreline can be thought of as a contour line. If the
level of the lake drops by two feet, the new shoreline represents a new contour line.
If the water continues to drop in two-foot intervals, additional contours would be
generated, each accurately expressing the shoreline at each elevation (each Z level).
A contour map created in this way would display contours at two-foot intervals,
describing the island's shoreline at different elevations. An excellent introduction to
contour maps is given in the free booklet, "Topographic Mapping," issued by the U.S.
Geological Survey.

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

Creating a New Contour Map


To create a new contour map:

1. Click Map | New | Contour Map, or click the button.


2. Select a grid file in the Open Grid dialog. Click Open.
The map is automatically created with reasonable defaults.

This example contour map shows filled color


contours and a color scale bar.

240
Chapter 6 – Contour Maps

Overlaying a Contour Map onto another Map Layer


When contour maps are created using the Map | New command, they are
independent of other maps in the plot window. For example, creating an image map
while a contour map is present in the plot window yields two separate maps, each with
its own set of axes and scaling parameters. To create a single map with the image
map on the contour map, select both maps by clicking the Edit | Select All
command. Overlay the maps using the Map | Overlay Maps command.

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.

Adding a Contour Map Layer to an Existing Map


Alternatively, you can add the contour map directly to the existing image map by
creating the contour map using the Map | Add command. This automatically adds the
contour map to the image map axes.

To add an contour map layer to an existing map:


1. Click on the existing map to select it.
2. Click the Map | Add | Contour Layer command.
3. Select a grid file in the Open Grid dialog and click Open.
4. The contour map layer is automatically added to the existing map.

Editing an Existing Contour Map


To change the features of the contour map, click once on the contour map in the
Object Manager or plot window. When the contour map is selected, the contour map
properties are displayed in the Property Manager.

241
Surfer

Contour Map Properties


The contour map properties dialog contains the following tabs: General, Levels,
Layer and Coordinate System. The Layer page and Coordinate System page is
common to other map types like post 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.

The General Page


The contour map properties General page controls the Grid file, Smoothing, Fault line
properties, Filled Contours, and Blanked Regions for a contour map. To open the
General page, click on a contour map to select it. In the Property Manager, click on
the General tab.

Change contour map properties in the


Property Manager on the General page.

242
Chapter 6 – Contour Maps

Input Grid File


The Grid file lists the current grid file used in the contour map.

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

Fault Line Properties


If your grid file contains faulting information, you can set the fault line color, style, and
thickness of the fault line drawn on the contour map by clicking on the Fault Line
Properties button.

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.

The Levels Page


The contour map properties Levels page controls the display of contours, contour
labels, and color fill on the contour map. The levels can be set using a simple method,
which uses the same options for all major and minor contour lines. Or, an advanced
option can be set that allows more control over individual contour line properties.

Display Simple Options


To use the simple options, click on the contour map to select it. In the Property
Manager, click on the Levels tab. Change the Level method to Simple.

244
Chapter 6 – Contour Maps

Switching Between Advanced and Simple Levels


When switching the Level method from Simple to Advanced contour levels, all Simple
options are initially shown in the Properties dialog that contains the Advanced
options. However, when switching the Level method from Advanced to Simple, it is
likely that some level customizations will be lost.

Adjust the contour map contour line properties on the


Levels page in the Property Manager.

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.

Major Contour Every


The Major contour every option sets the frequency for how often a major contour line
appears on the map. Major contour lines and minor contour lines can have different
properties. By default, the first line is the Minimum contour. The Major contour every
value tells the program how many contour lines to skip before the next major contour
line. If the Major contour every value is set to 1, every contour line is a major contour
line. If the value is 2, every other line is a major contour line. If the value is 3, every
third line is a major contour line, and so on.

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.

Major Contours Line Properties


Click on the next to Line Properties to set the major contour line properties.

Major Contours Show Labels


Check the Show labels box to display contour labels along major contour lines. When
checked, all major contour lines contain labels. When unchecked, no major contour
lines contain labels. If you want to set label visibility on an individual contour line
basis, set the Level method to Advanced and use the options in the Levels dialog.

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.

Minor Contours Line Properties


Click on the next to Line Properties to set the minor contour line properties.

Minor Contours Show Labels


Check the Show labels box to display contour labels along minor contour lines. When
checked, all minor contour lines contain labels. When unchecked, no minor contour
lines contain labels. If you want to set label visibility on an individual contour line
basis, set the Level method to Advanced and use the options in the Levels dialog.

247
Surfer

The Advanced Levels Dialog


To use the advanced options, click on the contour map to select it. In the Property
Manager, click on the Levels tab. Change the Level method to Advanced. To open the
advanced levels Properties dialog, click the Edit Levels button next to Contour levels.

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 Levels Page


Control advanced settings for the Level, Line, Fill, Label, and Hach properties of the
contour map on the Levels page. Properties can be adjusted for all contours at once
(by clicking on the column buttons), or for individual contours (by double-clicking on
the specific contour level).

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

Level Parameters for All Levels


To apply level parameters to all defined levels, click the Level, Line, Fill, Label, or Hach
buttons at the top of the contour level list. For example, to define the contour range
and the interval between contours, click the Level button and specify these
parameters in the Contour Levels dialog.

Clicking the Level, Line, Fill, Label, and Hach buttons allow
you to apply parameters to multiple levels at once.

Level Parameters for One Level


To set parameters for a specific contour level, double-click any of the elements in the
list. For example, to change one contour level line's properties, double-click on the
specific line to open the line properties. Make any changes and click OK. To edit one
contour level's value, double-click on the individual Level to open the Z Value dialog,
enter a new value, and click OK.

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.

Load and Save


The Load and Save buttons allow you to load and save .LVL level files containing
contour level settings. If you want to retain contour map settings such as contour
intervals, contour labels, line color, and color fill you can save the setting in a level
.LVL file. Once you have modified the settings click the Save button on the Levels
page in the contour map properties dialog. Level files can only be used with maps of
similar Z ranges.

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

Add and Delete


Use the Add and Delete buttons to add or delete specific contour levels.

To add, delete, or modify individual contour levels:


1. Click on a contour map to select it.
2. In the Property Manager, click on the Levels tab.
3. Change the Level method to Advanced.
4. To open the advanced levels dialog, click the Edit Levels button next to Contour
levels.
5. Click on an existing contour level value to select it.
6. Click the Add button to add a contour level with a value halfway between the
selected level and the next lower level. Adding levels creates irregularly spaced
contours.
7. Click the Delete button to remove the selected level from the list.
8. To modify an existing level, double-click the level value. Enter a new value for the
contour level in the Z Level dialog. Click OK and the contour level list is updated.
9. When you are finished changing the contour levels, click OK and the map is
displayed with your changes.

Specifying Contour Levels


The Contour Levels dialog is used to assign regularly spaced contour levelsor color
zones (i.e. 3D wireframe). For example, assume the smallest Z value is defined as 50,
the largest Z value is 100, and the interval between contours or zones is 10. In this
case, contour lines are drawn at Z levels of 50, 60, 70, 80, 90, and 100. If the range
of grid Z values goes beyond the defined minimum and maximum contour levels, the
contours outside the levels are not drawn.

You can manually change the Z value of


any single contour level by double-
clicking on the level value on the Levels
page.

The Contour Levels Dialog


Click the Level button on the Levels
page of the contour properties dialog to
open the Contour Levels dialog.
Customize contour levels in
the Contour Levels dialog.

250
Chapter 6 – Contour Maps

Data Limits
The actual Data Limits of the grid file are listed for reference. These values cannot be
changed.

Minimum, Maximum, Interval Contour Values


Enter values for the Minimum and Maximum contours, and the Interval value that
defines the spacing in Z units between adjacent contour lines.

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.

OK and Cancel buttons


Click OK and the contour level list is updated with the selections made in the Contour
group. Click Cancel to close the dialog without making any changes.

To Create Contour Levels at Regular Intervals


The easiest way to create regular contour intervals is to use the simple level method:
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 Simple.
4. Set the values for the Minimum contour and Maximum contour.
5. Set the Contour interval value that defines the spacing in Z units between adjacent
contour lines.

Regularly spaced contours are automatically created.

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.

Most line properties are edited in the


Property Manager in a Line
Properties section. When changing
line properties for a selected object,
the Line Properties section will
appear in a different location in the
Property Manager, depending on
the type of object selected. Specify individual line properties in the Property
Manager in a Line Properties section.

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.

The Line Properties Dialog


Most line properties are edited
in the Property Manager in
a Line Properties section.
When changing line properties
for a selected object, the Line
Properties section will appear
in a different location in the
Property Manager, depending
on the type of object selected.

Some objects use a Line


Properties dialog. This dialog
is accessed differently, Specify individual line properties in the
depending on the type of in Line Properties dialog.
object selected.

It provides the following options:

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.

The Line Dialog


Click the Line button on the Levels
page of the contour Properties
dialog to open the Line dialog.

The Line dialog provides the


following options:

• Properties: In the Properties


Specify line properties for multiple
group, select Uniform to apply contour lines in the Line dialog.
the same line properties to all
lines. Select Gradational to apply a color spectrum to the lines.

256
Chapter 6 – Contour Maps

• Affected Levels: The Affected Levels group is used to set line color on a frequency
basis.

You can set the frequency of the line


properties in the Affected Levels group.
This example has an index contour
of a thicker width every fifth contour line.

• 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

This is a contour map using This is a contour map using


gradational line widths. gradational line colors.

You can set the frequency of the line properties in the Affected Levels group.

Assigning Gradational Line Properties


Gradational line color and line widths can be assigned to contour lines.
Gradational line properties on a contour map can be done with the advanced contour
level method. To create gradational lines:
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, select Gradational contour lines.
7. Click the line Style button to assign a specific style to all of the contour lines.
8. Click the Color button to assign a color spectrum to the contour lines.
9. To assign varying line thickness, enter numbers into the Min width and Max width
edit boxes. These line widths are applied to the minimum and maximum contour
levels respectively. All intermediate line widths are interpolated proportionally.
10. If the Skip box in the Affected Levels section is set to a number other than zero,
the contour lines are not all assigned the colors or widths set in the Line dialog.
11. Click OK in the Line dialog to return to the advanced levels dialog. The selected
line colors and widths are shown under Line. Be aware that some video cards and
monitors are not capable of generating smooth gradations from one color to

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.

Assigning the Same Line Properties to all Contour Levels


The easiest way to assign the same line properties to all contour levels is to use the
simple levels method:
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. Set the Major contour every value to one. This means that all contour lines are
major contour lines.
5. Open the Line Properties section under Major Contours. Set the Style, Color,
Width, and Opacity.

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.

Setting Line Properties on a Frequency Basis


If the contour map should have a two different line types at a regular interval, the
easiest way to create this interval would be to use the simple contour levels method.
To set line properties on a frequency basis 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. Setting this value to one means every contour line is a major contour line.
Setting this value to two means every other value is a major contour line. Setting
this value to three means every third line is a major contour line, and so on.
5. Open the Line Properties section under Major Contours. Set the Style, Color,
Width, and Opacity.
6. Open the Line Properties section under Minor Contours. Set the Style, Color,
Width, and Opacity. This will set the line properties for all non-major contour lines.

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.

Apply Multiple Sets of Affected Levels


You can set the Affected Levels as many times as you want before leaving the dialog.
For example:
• In the Line dialog, enter First=one, Set=one, First = 1 First = 2
Skip=four and click the OK button. This applies
the properties to the first contour level, skip Levels Set = 1 Set = 4
four levels, set the next level, and so on. Skip = 4 Skip = 1

• In the Line dialog, enter First=two, Set=four, 0 Yes No


Skip=one and then click the OK button. 10 No Yes
20 No Yes
This applies the new properties starting at the 30 No Yes
second level. Four consecutive levels are modified,
40 No Yes
one is skipped, four are modified, one is skipped,
etc. This combination of Affected Levels applies one 50 Yes No
set of properties to one group of levels and another 60 No Yes
set of properties to a second group of levels.
70 No Yes
Combinations of settings for line properties are
limitless. 80 No Yes
90 No Yes
100 Yes No

261
Surfer

Assigning Line Properties to Specific Contour Levels


To assign line properties to specific contour levels, you must use the advanced contour
levels method.
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. Double-click the line sample for the contour line you want to modify.
6. The Line Properties dialog is displayed, allowing you to select the line style,
color, width, and opacity.
7. Click OK in the Line Properties dialog and repeat the procedure for any other
contour lines you want to change.
8. When you are done, click OK and the map is drawn with the specified line
properties.

In this example, the line sample for the 14 Level is selected.

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.

Color Filled Contour Maps


Surfer allows you to fill the areas between contour lines with color fill. The color fill
can gradationally change from the minimum to maximum contours, or specific fill
properties can be assigned to individual contour levels.

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

Contour Fill Properties


Contour maps can be filled using either a simple contour level method or an advanced
contour level method.

Use the Fill Colors option in the Property Manager to change the fill color properties
for a simple 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 Simple.
6. Click the color bar next to Fill colors. Select the desired predefined colormap.
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.

The Fill Dialog


With an advanced level contour map, the Fill dialog will open, allowing you to set
additional properties.

To open the Fill dialog:


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.
Specify methods to assign fill patterns
7. In the advanced contour levels and colors in the Fill dialog.
Properties dialog, click the Fill
button. The Fill dialog opens.

265
Surfer

The Fill dialog provides the following options:

• 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.

Assigning Color Fill Based on a Fill Spectrum


To assign color fill based on a fill spectrum for a simple level contour map, use the Fill
Colors option:
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 Simple.
6. Click the color bar next to Fill colors. Select the desired predefined colormap.

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.

Assigning Color Fill to Specific Contour Levels


To assign color fill to specific contour levels, you need to use the advanced contour
level method.
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. Double-click the fill sample for the contour level you want to modify.
8. Select the fill properties from the Fill Properties dialog.

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.

Creating a Filled Contour Map Containing Blanked Areas


When a filled contour map contains blanked areas, the blanked area has a default
color assigned to it. You can select the fill for the blanked areas as well as the line
surrounding the blanked areas on the General page in the contour map properties.
Blanked areas are typically created with the Grid | Blank command. Blanked areas
can also be created due to insufficient data during the gridding process.

To assign fill and line properties to blanked areas:


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. In the Blanked Regions section, click the next to Fill Properties. Choose the Fill
Pattern, Foreground Color, Foreground Opacity, Background Color, and
Background Opacity for the blanked areas. Use the Load From if you want the Fill
Pattern to use an image on your computer.
5. Click the next to Line Properties. Choose the line Style, Color, Opacity, and Width
for the line surrounding blanked areas.

The contour map automatically updates to show the blanked area properties.

Displaying a Filled Contour Map without Contour Lines


To create a filled contour map without contour lines using a simple 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 Simple.
6. Click the next to Line Properties under the Major Contours section.
7. Set the Style to Invisible.
8. Click the next to Line Properties under the Minor Contours section.
9. Set the Style to Invisible.

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.

This contour map (DEMOGRID.GRD) has invisible 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.

To show labels on advanced contour level maps:


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. To turn the display of individual labels on or off, double-click on the word Yes or
No. In the Label column, the labeled contour levels are indicated by the word Yes.
8. To change properties for all labels, click the Label button. The Labels dialog is
displayed.
9. Make any changes and click OK in both dialogs. The change is shown on the map.

270
Chapter 6 – Contour Maps

The Labels Dialog


Click the Label button to open the
Labels dialog.

The Labels dialog provides the


following options:

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.

Label to Label Distance


Label to Label Distance specifies the minimum distance (in inches or centimeters)
between labels along the contour line. Surfer searches for the next suitable location
for a label after moving the minimum distance specified by the Label to Label
Distance. The next label is not drawn until a segment of the necessary length, within
the curve tolerance limits, is found. As the Label to Label Distance is increased, fewer
labels are drawn on the contours.

Label to Edge Distance


Label to Edge Distance specifies the minimum distance (in inches or centimeters) from
the label to the edge of the map. This feature controls label placement so labels do not
overwrite the map borders or axes.

Affected Levels - Label Frequency


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.

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).

Editing Contour Label Positions


Contour labels can be interactively moved, added, and deleted. To enter contour label
edit mode, select a contour map by clicking on it in the plot window or by clicking on it
in the Object Manager. Next, select the Map | Edit Contour Labels command.
Alternatively, right-click on the selected map and select Edit Contour Labels. Each
contour label is displayed with a rectangular outline.

Move Individual Contour Label


To move a label, select it with the mouse or keyboard and drag it to a new location. To
drag with the mouse, hold down the left mouse button and move the cursor to a new
location. To drag with the keyboard, position the cursor on top of the label, hold down
the SPACEBAR, and press the ARROW keys.

272
Chapter 6 – Contour Maps

Cancel and Undo Label Movement


To cancel label movement and to return the label to its original position, press the ESC
key before releasing the left mouse button or SPACEBAR.

Use the Edit | Undo command to undo a label move, label deletion, or label insert.

Add a Contour Label


To insert a contour label, hold down the CTRL key and left-click with the mouse on a
contour line. A label is not added if the contour is too small or too curved for a label to
fit.

Delete a Contour Label


To delete a label, click once on the label and press the DELETE key.

Move Around the Plot Window in Edit mode


If you are zoomed in on the contours, use the scroll bars to move to off window
locations. Alternatively, click and hold the scroll button of a wheel mouse to pan the
plot window.

Exit the Edit mode


To leave contour label edit mode, press the ESC key or choose the Edit Contour
Labels command again.

Reset Contour Labels to Default Positions


If you make any changes to the contour map, changes to the contour labels are
deleted. Surfer displays a warning message that the custom labels will be lost in this
case.

273
Surfer

Setting Label Properties on a Frequency Basis


If the contour map should have two labels on a frequency basis, the easiest way to
create this interval would be to use the simple contour levels method. To set label
frequency 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
labels. Setting this value to one means every contour line is a major contour line.
Setting this value to two means every other value is a major contour line. Setting
this value to three means every third line is a major contour line, and so on. Only
the major contour lines will be labeled.
5. Open the Line Properties section under Major Contours. Check the Show labels
box.
6. Open the Line Properties section under Minor Contours. Uncheck the Show labels
box.

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

Removing All Labels


To avoid displaying contour labels on the contour map when the Level method is set to
Simple:
1. Click on the contour map to select it.
2. In the Property Manager, click on the Levels tab.
3. In the Major Contours section, uncheck the Show labels box. All major labels are
now removed from the contour map.
4. In the Minor Contours section, uncheck the Show labels box. All minor labels are
now removed from the contour map.

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.

To display hachures on a 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.

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.

The Hachures Dialog


Clicking the Hach column button
opens the Labels 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.

Hachure Closed Contours Only


If the Hachure Closed Contours Only check box is checked, then only closed contour
lines use hachures. If a contour line intersects the border of the map, hachures are not
displayed on that contour line. If the Direction is set to Uphill, only peaks are
hachured. If the Direction is set to Downhill, only depressions are hachured. If the
Hachure Closed Contours Only option is not checked, then all contours are hachured
relative to the Affected Levels.

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.

Setting Hachures on a Frequency Basis


The Affected Levels settings are used to modify the contour levels on a frequency
basis. These settings can be found by clicking the Hach button on the Levels page in
the contour map properties dialog.

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.

To use Affected Levels with hachures:


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.

277
Surfer

5. Set the Level method to Advanced.


6. Click the Edit Levels button next to Contour levels.
7. Click the Hach button to open the Hachures dialog.
8. Set the First contour level affected by the setting, the Set number indicating the
number of levels to set with the specified properties, and the Skip number
indicating the number of levels to skip assigning the specified properties.
9. Click OK.
10. Click OK in the dialog to make the changes on the map.

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).

Masking Portions of a Contour Map with a Base Map


To mask areas of a contour map, you can overlay a base map or filled shape on the
contour map. The base map must contain polygons that can be filled with patterns or
colors that obscure the underlying contour map.

To overlay a masking base map:


1. Create a contour map of your grid file.
2. Select the contour map. Choose the Map | Add | Base Layer command and
select a vector base map. This will add a base map layer to your contour map and
create a single multi-layer map. Note: The base map must contain polygons
(areas).
3. Right-click on the base map in the Object Manager and select Order Objects |
Move to Front. The base map moves to the top of the list.
4. When the base map is selected, the base map properties appear in the Property
Manager. Click on the Base Map tab.
5. Click the next to Fill Properties to specify the fill properties to apply to the
boundaries from the base map. The map is automatically updated to show the
boundaries that mask the underlying contour lines.

278
Chapter 6 – Contour Maps

To add an empty base map and use the drawing tools:


1. Create a contour map of your grid file.
2. Select the contour map. Choose the Map | Add | Empty Base Layer command.
This will add an empty base map on top of the contour map.
3. Select the base map in the Object Manager and choose the Arrange | Enter
Group command. Everything you draw will be added to this base map layer until
you exit the group.
4. Use the Draw | Polygon command to draw a polygon over the contour map. You
could use any of the Draw menu commands. By drawing objects inside an empty
base map, the drawn objects become map objects.
5. Use the Arrange | Exit Group command.
6. When the base map is selected, the base map properties are displayed in the
Property Manager.
7. Click the next to Fill Properties to specify the fill properties to apply to the
boundaries from the base map. The map is automatically updated to show the
boundaries that mask the underlying contour lines.

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.

Exporting 3D Contour Lines


To export 3D contour lines:
1. Create a contour map by clicking the Map | New | Contour Map command.
Select the .GRD file and click Open.
2. Select the contour map by clicking on Contours in the Object Manager. It does
not matter if the contour map is overlaid with other maps as long as only the
contour map is selected.
3. Click Map | Export Contours to display the Save As dialog. Enter the File name,
specify the Save as type, and click Save. The file is exported with the specified
extension.

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 Map | New | Base Map


command creates base maps from
existing boundary files. Use the
base map properties in the
Property Manager to set the
base map line, fill, symbol, font,
and opacity properties. With some
images, you can also reassign the
base map coordinates. You can
also set the base map coordinate
system.
This map shows multiple base maps,
Some base maps consist of multiple depicting roads waterways, and
a USGS urban area satellite image
objects (i.e. polygons, polylines, text,
for Golden, Colorado, USA.
etc.). The sub-objects can be selected
individually in the Object Manager and edited in the Property Manager. Enter the
group to edit multiple sub-objects at once.

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

Creating a Base Map


To create a new base map from an existing file:

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.

Adding a Base Map Layer to an Existing Map


You can add a base map directly to an existing r map by creating the base map using
the Map | Add command. This automatically adds the base map to the existing map
axes.

To add a base map layer to an existing map:


1. Click on the existing map to select it.
2. Click the Map | Add | Base Layer command.
3. Select a grid file in the Open Grid dialog and click Open.
4. The base map layer is automatically added to the existing map.

The Map | Add | Base Layer command adds a base map layer to the selected map.

Editing an Existing Base Map


To change the features of a base map, click once on the base map to select it. The
properties are displayed in the Property Manager.

Empty Base Map


The Map | New | Empty Base Map command allows you to create an empty base
map with the intention of creating new geometry within the empty base map limits by
using the Enter Group command.

282
Chapter 7 – Base Maps

The Map | Add | Empty Base Layer


command allows you to add an empty
base map layer to an existing map.

The Base Map Limits Dialog


The Map | New | Empty Base Map
command opens the Base Map Limits
dialog.

Use the Base Map Limits dialog to specify


Minimum and Maximum X and Y Minimum and Maximum values.
Enter the limits of the new empty base
map in the Minimum and Maximum boxes for the X and Y coordinates. This specifies
the initial limits of the new base map, but may be overridden on the map Limits page
later if needed.

Base Map Properties


41
Line and fill properties can be applied to
all the polygons on the map, but all
polygons must use the same properties.
40
For example, choosing a red fill for the
polygons on the base map causes all
polygons on the selected map to be red.
39
You cannot select individual polygons on
the map and assign unique fill or line
properties to them. For polylines,
assigned line properties are the same for 38

all polylines. This is the same as the line


properties assigned to the lines defining
the polygons on the base map. If the 37
-109 -108 -107 -106 -105 -104 -103
base map displays point locations
(represented by symbols), the same symbol A base map can contain polygons,
properties are assigned to all the point polylines, and points. In this map, the
locations. polygons are state and county
boundaries and the points are cities.

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.

Base Map Page


The Base Map page in the base
map properties contains options
for setting vector map properties
and image coordinates.

The base map properties Base


Map page contains the following
options:

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.

The Image Coordinates section is available when a


base map contains only a single image.

Type a new value into the xMin, xMax, yMin, and


yMax boxes to update the limits on the base map.
The Image is automatically updated. The map
Limits and Scale are also both automatically
updated.

When the Image Coordinates section is not


available because other objects exist in the base
map, you can set the image coordinates by
clicking on the image instead of the base. When
you change the Spatial Extents for an Image, you
will need to set the map Limits and Scale.
Click on the image to modify the
limits in the Property Manager.

285
Surfer

Changing Properties in a Base Map


Properties can be assigned to base map polylines, polygons, text, symbols, or images.
Any properties you assign are applied to all the objects in the base map. The only
properties that can be changed in images are the coordinates.

To change the properties of all objects in a base map:

1. Click on the Base map layer in the Object


Manager.
2. On the Base Map page in the Property
Manager, click the button next to the type of
property you want to change (i.e. Line Properties,
Fill Properties, Font Properties, or Marker
Properties). If the option is not present, the base
map does not contain any objects of that type.
For example, if the base map does not contain
any polygons, the Fill Properties option is not
available.
3. Specify the properties you want to assign to the
objects in the base map.
Select the Base map layer
The base map is automatically redrawn. The specified to change properties for all
properties are applied to all the polyline, polygon, of the objects.
text, or symbols in the base map.

Changing Properties of Individual Objects


To change the properties of an individual object in a
base map:

1. Click the object within the base map layer (i.e.


Polygon, Polyline, etc.) in the Object Manager.
2. Make changes to the properties available for that
object on the appropriate page (i.e. Line page, Fill
page, etc.) in the Property Manager.
3. The property change is automatically shown for the
individual object. Select the sub-object to change
individual properties.

286
Chapter 7 – Base Maps

Changing Properties of Multiple Objects


To change the properties of multiple objects in a
base map:
1. Click the Base map layer in the Object
Manager.
2. Click Arrange | Enter Group. Alternatively,
right-click on the Base map layer and select
Enter Group.
3. Use the SHIFT or CTRL key to select multiple
sub-objects of the base map layer.
4. The shared properties are displayed in the
Property Manager. Make changes as
needed. The objects will automatically update
to reflect the new properties.
5. Click Arrange | Exit Group to exit the base
map group. Alternatively, right-click on the
Base map layer and select Exit Group.
Enter the group and select multiple
sub-objects to change properties.

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.

The Info page is located in the


Property Manager for the selected
object. A single object must be
selected to display the Info page.

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.

Total Number of Vertices


The Total number of vertices displays how many vertices are used in the selected
object. The Draw | Reshape command can be used to see the vertex locations for
polygons and polylines.

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.

Information Displayed for Objects


Apart from the above, the Info page displays other information for the following
objects:

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

To select multiple objects but not all objects in the base


map, click on the Base map in the Object Manager.
Click the Arrange | Enter Group command. Once you
have entered the base map group, you can use the CTRL
or SHIFT keys on the keyboard to select multiple base
map objects. When you have selected all of the desired
objects, make any changes in the Property Manager.
When all changes are made, click the Arrange | Exit
Group command to exit the group.

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.

Placing Boundaries on Other Maps


Base Maps can be used to place boundary features on any type of map. To place
boundary lines on a map, add a base map layer to the existing map with the Map |
Add | Base Map Layer command.

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.

Limits and Scale


When you overlay maps, if the new map limits exceed that of the current map limits,
Surfer gives you the option to adjust the map limits to include all layers.

Adding a Boundary Base Map to Another Map


To add a boundary base map to another map:
1. Create a map (in this example, a contour map) with the Map | New command.
The grid file should use limits that cover the same general extent as the boundary
base map.
2. Select the contour map and click the Map | Add | Base Map Layer command to
add a base map layer.
3. In the Import dialog, select your boundary file and click the Open button.
4. To clip the map to specific limits, click on the Map object in the Object Manager.
Open the Limits page in the Property Manager.
5. If necessary, set the scale on the Scale page.
6. The map automatically redraws to the new limits and size.

Assigning Coordinates to an Image Base Map


If your image is already georeferenced, when you import the image as a base map,
the image will be referenced accordingly. If your image is not georeferenced, you can
assign coordinates to the image. You can redefine image coordinates using the Map |
New | Base Map command (not the File | Import command). By default, image files
that are not georeferenced are assigned a coordinate system that corresponds to the
rows and columns of the raster image. Under most circumstances, these coordinates
do not match the coordinate systems used on other types of maps. In order to overlay
this base map with other maps, you will need to redefine the coordinates for the
image. After the image coordinates are redefined, the image base maps can be used
in overlays with other types of maps. The image coordinate options are grayed unless
the base map consists of a single image.

291
Surfer

To change the base map image coordinates:


1. Use the Map | New | Base Map command. The
Import dialog opens.
2. Select the image to create the base map (for
example, Demogrid.TIF located in the SAMPLES
folder). Click Open.
3. In the Object Manager, click on the Base
object to open the base map properties in the
Property Manager.

On the Base Map page, you can change the image


coordinates. Click on the Base object
to open the base map
properties in the
In the Image Coordinates section, type the XMin, Property Manager.
XMax, YMin, and YMax values to apply to the image.

The image is updated using the new


coordinates.

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.

To change the base map image extents:


1. Use the Map | New | Base Map command. The Import dialog opens.
2. Select the image to create the base map (for example, Demogrid.TIF located in
the SAMPLES folder). Click Open.
3. In the Object Manager, click on the Image object to open the image properties in
the Property Manager.
4. Set the Spatial Extents for the image.

292
Chapter 7 – Base Maps

5. Click on the Map object in the Object Manager.


6. Click on the Limits tab. Check the Use data limits box.
7. Click on the Scale tab. Change the scale properties, if necessary.

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.

Loading Image Files as a Base Map


Image files can be loaded into Surfer with the Map | New | Base Map command.

The General Page


Click on the Image object in the
Object Manager to open the image
properties in the Property Manager.

Opacity
Change the Opacity of an image by
entering a value from 0% (completely
transparent) to 100% (completely

opaque) or dragging the


to change the opacity percentage.

The General page controls the


Spatial Extents image Opacity and Spatial Extents.
The Left, Right, Top, and Bottom
values in the Spatial Extents group displays the current extents of the image. Enter a
new value into the Left, Right, Top, and/or Bottom boxes to change the image extents.

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.

This post map shows varied symbols and labels.


A contour map is overlaid.

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.

This classed post map displays colored symbols and labels.


The legend to the right adds information about how the symbols are classed.

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.

Creating a Post Map or Classed Post Map


To create a post map:

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.

To create a classed post map:

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.

Editing an Existing Post Map or Classed Post Map


To change the features of the post map or the classed post map, open the map
properties by clicking on the map in the plot window or clicking on the post map name
in the Object Manager. The properties are displayed in the Property Manager.

297
Surfer

Adding a Post or Classed Post Map to an Existing Map


When post maps or classed post maps are created, they are independent of other
maps in the plot window. For example, creating a post map or classed post map while
a contour map is present in the plot window yields two separate maps, each with its
own set of axes and scaling parameters. To create a single map with the post map or
the classed post map data points on the contour map, select both maps by clicking the
Edit | Select All command. Overlay the maps using the Map | Overlay Maps
command.

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 Posting


Data files used to produce post maps contain the X and Y coordinates used to locate
points on the map. They can also provide additional information used to place labels
on the map, define the symbols to use, the symbol size, and the angle at which each
symbol is drawn. The first row of the data file may optionally contain the title for each
column. These titles are used by the dialogs to associate a descriptive name with each
column letter. Following the titles are the actual data, organized as one point (record)
per row. Columns within the data file contain various properties for the point such as
its X coordinate, Y coordinate, Z value, etc. The data must contain, at a minimum, the
X and Y coordinates. Incomplete or blank records in the X and Y coordinate columns
are not plotted on the 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.

XY Coordinates in the Data File


The X and Y coordinates define the symbol locations and the extents of the post map.
These coordinates can be in any columns in the data file, but Surfer assumes X is in
column A and Y is in column B by default.

A data file used to create a post map can contain several columns of data.

Z Values in the Data File


Z values in the data values, such as elevation or concentration, are associated with
each X,Y location. This is typically the same column that was used when creating a
grid file. Z values can be used to proportionally scale the posted symbols. You can
define the minimum and maximum symbol size, and all points are scaled in proportion
to these sizes. See Specifying Scaled Symbols for more information.

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

Data Labels in the Data File


Data labels are text strings or numbers associated with each point on a post map.
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.

Symbol Specifications in the Data File


Post map data files can contain a column defining which symbol set and symbol index
to use for each posted point. This information can be specified in one of three ways:

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.

Symbol Angle Values from the Data File


The angle (in degrees) for the posted symbol can be specified in the data file for non-
classed post maps. Positive angles rotate the symbols in a counterclockwise direction.
On classed post maps, all symbols are drawn at the same orientation, which is
specified within the classed post map properties dialog.

300
Chapter 8 – Post Maps

This is a sample data file containing the symbol


set and index for symbols on a post map.

Updating Post Map and Classed Post Map Data Files


A copy of the data file is created and embedded within the post map at the time the
post map is created. This means any subsequent changes made to the data file are
not reflected in the post map. To incorporate changes made to a data file into its
associated post map, the data file must be reassigned to the map.

To automatically updated a post or classed post map:


1. Select the map to be updated.
2. Use the File | Reload Map Data command. All map layers on the selected map
are reloaded. This can change your map properties (i.e. base map containing an
image).

To manually update a post or classed post map:


1. Select the map to be updated.
2. Click once on the post map or classed post map in the Object Manager to select
it.
3. In the Property Manager, click on the General tab.

4. Click on the button next to Data file.


5. Select the updated data file and click Open. The map automatically redraws with
the updated data.

301
Surfer

Post Map and Classed Post Map Properties


The post map properties contains four pages: General, Labels, Layer and
Coordinate System. The classed post map properties has one extra page, the
Classes page. The Layer page and the Coordinate System pages are the same as in
contour map or base map and are already discussed in Chapter 6, Contour Maps. We
will discuss the General page, Labels page and the Classes page in the next
sections.

General Page – Post Map


To edit a post map, click once on the post map to select it. In the Property Manager,
click on the General tab. The post map properties General page contains the
following options:

Change post map properties in the


Property Manager on the General page.

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.

X and Y Coordinate Columns


Set X coordinates and Y coordinates to the columns containing the X and Y
coordinates, respectively. If an empty cell is encountered in either of these columns,
the corresponding point is excluded from the map. To change the column, click on the
existing column name and select the new column from the list.

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

Default Symbol Section


The Default Symbol section is used to specify the symbol set and symbol (unless a
Symbol column is used). Click the next to Marker Properties to open the Symbol
Properties section. From here, you can change the Symbol Set, Symbol index, Opacity,
and symbol Color. To eliminate the display of symbols, select one of the blank symbol
positions in the symbol palette.

Default Angle (degrees)


The Default angle (degrees) specifies the angle in degrees to apply to all the symbols
on the map (unless an Angle column is used). Positive angles of up to +360 degrees
rotate the symbol in a counterclockwise fashion. To change the Default angle
(degrees), highlight the existing angle value and type a new value or click and drag

the to the desired value.

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

Proportional Scaling Dialog


To open the Proportional Scaling dialog, click on the post map to select it. In the
Property Manager, click on the General tab. Change the Sizing method to
Proportional to use proportional scaling. Click the Scaling button next to Proportional
to open the Proportional Scaling dialog.

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.

The Proportional Scaling dialog is opened by clicking on the Scaling


button on the General page in the Property Manager.

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.

If Scaling Method is set to Linear, a standard linear interpolation is used:


H n = [((Z n − Z1 ) / (Z 2 − Z1 )) * (H 2 − H1 )] + H1

306
Chapter 8 – Post Maps

If Scaling Method is set to Square Root, the equation used is:

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.

This graph shows the height versus Z value relationship


for linear proportional symbols and square root
proportional symbols.

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

General Page – Classed Post Map


To edit a classed post map, click once on the classed post map to select it. In the
Property Manager, click on the General tab. The classed post map properties
General page contains the following options:

Change classed post map properties in the


Property Manager on the General page.

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.

First Row and Last 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. 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.

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.

Change post map or classed post map label properties on the


Labels page in the Property Manager.

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.

Position Relative to Symbol


The Position relative to symbol controls the offset of the label from the symbol center.
To change the position, click on the existing position and select the new position in the
drop-down box. Specify Center, Left, Right, Above, Below, or User defined. User
defined allows you to specify the exact offset (in page units) in the X offset and Y
offset boxes. The posted labels are all placed in the same position relative to the
associated symbol. Positive values in the X offset shift the label position to the right
and positive values in the Y offset shift the label position upward. The X offset and Y
offset values are numbers between -4.000 and +4.000 inches (-10.160 and +10.160
centimeters).

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.

This map has a contour map layer (DEMOGRID.GRD)


and a post map layer (DEMOGRID.DAT). The post points are
labeled. The labels have been moved with the Map | Edit Post Labels
command. Leader lines go from the data point to the posted label.

Enable for Dragged Labels


Check the Enable for dragged labels option to display leader lines when labels are
manually dragged to a new location with the Map | Edit Post Labels command. The
leader line will display a line from the original label location to the dragged 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).

This map has a 3D wireframe layer (DEMOGRID.GRD)


and a post map layer (DEMOGRID.DAT). The post points are
labeled and have 3D leader lines from the data point to the post label.

313
Surfer

Leader Line Properties


Click the next to Line Properties to display the Line Properties options, allowing you
to specify the line Style, Color, Opacity, and Width for leader lines.

Editing Post Labels


Post map and classed post map labels can be moved interactively so that labels do not
overlap or so that labels appear in a more desirable location. To move labels, a post
map or classed post map must have the Worksheet column on the Labels page set to
a column other than None to use the Map | Edit Post Labels command.

Entering Edit Post Labels Mode


To enter the post map label edit mode, click on a post map or classed post map in the
plot window or Object Manager. Once the post map is selected, click the Map |
Edit Post Labels command. Alternatively, right-click on the selected map and select

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.

Move Individual Post Labels


To move a label, enter the Edit Post Labels mode. Click once on the label you wish to
move. Once the label is selected, hold down the left mouse button and drag the label
to a new location. When the label is in the desired location, release the mouse button.

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.

Exit Edit Post Labels Mode


To end post map label edit mode, press the ESC key or click the Map | Edit Post
Labels command again.

Move Around the Plot Window in Edit mode


If you are zoomed in on the post map, use the scroll bars to move to locations that
appear off the screen. Alternatively, click and hold the scroll button of a mouse wheel
to pan the plot window.

314
Chapter 8 – Post Maps

Custom Label Location and Changed Coordinate System


When either the source coordinate system or the target coordinate system changes,
all post map label customizations are returned to the default location.

Reset Labels to Default


All labels in the post map can be reset to the default position. To reset the labels, click
on the post map to select it. In the Property Manager, click on the Labels tab.
Change the Position relative to symbol to any position other than the currently
selected position to reset the labels to the default locations. The Post Map
Properties dialog message appears. Click Yes to restore all of the labels to the default
positions.

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.

The Classes page allows you to open the dialog where


you can set class properties for the classed post map.

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.

Loading a Classed Post Map Class .CLS File


Click the Load button to load an existing classed post map .CLS class file.

Saving a Classed Post Map Class .CLS File


Click the Save button to save a classed post map .CLS class file. The range minimum,
range maximum, symbol set, symbol index number, color, and symbol size are saved
in the .CLS file.

Customizing the Properties For Each Class


The class list box displays summary statistics and allows you to specify the properties
for each class.

• 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

Classed Post Map Legends


Legends can be displayed for classed post maps. The classed post map legend displays
a symbol for each class and optional information about the class. To display a classed
post map legend, click once on the classed post map to select it. In the Property
Manager, click on the General tab. Check the Show legend option to display a legend
that relates the symbols in the map to each class.

Editing Legend Properties


To change the legend properties, click once on the legend to select it. In the Property
Manager, the properties for the classed post map legend are displayed.

Customize the class post map legend in the Property Manager.

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:

\sym places the class symbol in the legend


\lower places the lower class limit in the legend
\upper places the upper class limit in the legend
\tab places a tab in the class text, tab stops are defined at every 0.25
inches starting at the frame edge

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:

A sample classed post map


legend shows classes, symbols,
and text in the class lines.

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.

Symbol Size Method


The Symbol size method allows you to specify the size of the legend symbols.
Selecting Based on font causes the symbols to be drawn using the size specified in the
Class group. Selecting Same as plot draws the symbols the same size as they appear
on the map. This can cause symbols for different classes to be different sizes.
Selecting Custom allows a size to be entered for the legend symbols in the Custom
size option.

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.

A Colormap is used to map Z


values to specific colors. Surfer
automatically blends colors to
produce a smooth color
gradation over the map.

The color schemes for image


maps can be saved in color
spectrum .CLR files. With such a This image map shows the Grand Canyon.
Colors show elevation change in the area.
file, the colors defined for one
image map can be used with
any other image map. Since the colors are stored as a percentage of the grid data
range, a single color spectrum file can be used for multiple maps, even if the
associated grid files cover significantly different data ranges.

Creating a New Image Map


To create an image map:

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

Overlaying an Image Map onto another Map Layer


When image maps are created using the Map | New command, they are independent
of other maps in the plot window. For example, creating an image map while a contour
map is present in the plot window yields two separate maps, each with its own set of
axes and scaling parameters. To create a single map with the image map on the
contour map, select both maps by clicking the Edit | Select All command. Overlay
the maps using the Map | Overlay Maps command.

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.

Adding an Image Map Layer to an Existing Map


Alternatively, you can add the image map directly to the existing contour map by
creating the image map using the Map | Add command. This automatically adds the
image map to the contour map axes.

To add an image map layer to an existing map:


1. Click on the existing map to select it.
2. Click the Map | Add | Image Layer command.
3. Select a grid file in the Open Grid dialog and click Open.
4. The image map layer is automatically added to the existing map.

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.

Editing an Image Map


To change the features of the image map, click once on the image map in the plot
window or in the Object Manager to select it. The properties are displayed in the
Property Manager.

324
Chapter 9 – Image Maps

Image Map Properties


The image map properties contain three tabs: General, Layer, and Coordinate
System. The Layer tab and Coordinate System tab contain the same options that
are available for contour maps. These options are discussed in Chapter 6 - Contour
Maps. Properties that belong to the map, but that have an affect on the image map
layer, are discussed in Chapter 14, Common Map Properties.

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:

Input Grid File


The Grid file displays the
path and file name for
the grid file used for the
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.

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.

Show Color Scale


The Show color scale option permits the display of 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. When the
Show color scale box is checked, the color scale bar is displayed. Refer to Chapter 17
for information about color scale bars.

Missing Data Color


The Missing Data section sets the color for blank regions of the grid. To select a
different missing data color, click on the existing color to the right of Color and click on
the desired color from the palette. Click the Custom button at the bottom of the color
palette to define new colors in the Colors dialog. Refer to Chapter 17 for information
about the Colors dialog.

Missing Data Opacity


To change the Opacity of the missing data, enter a value from 0% (completely
transparent) to 100% (completely opaque) by highlighting the existing value and
typing a new value or by dragging the to change the opacity percentage.

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.

The colors on a shaded relief map


are based on the reflectance from
the grid surface. Reflectance values
range from zero to one. A
reflectance value of zero means
that no light is reflected toward the
viewer. A reflectance value of one
means that all incident light is
reflected toward the viewer. This shaded relief map shows Telluride,
Colorado with the default shaded relief
shading and gradient settings.
Because colors are assigned to
entire grid cells, sparse grids (grids
with relatively few rows and columns) are poor candidates for shaded relief maps.
Shaded relief maps based on grids with too few cells look blocky or fuzzy. The Grid |
Spline Smooth or Grid | Mosaic commands can be used to make a denser grid from
an existing grid. For more information on these commands, refer to Chapter 19 – Grid
Operations.

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.

Creating a Shaded Relief Map


To create a shaded relief map:

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.

Overlaying a Shaded Relief Map onto Another Map Layer


When shaded relief maps are created using the Map | New command, they are
independent of other maps in the plot window. For example, creating a shaded relief
map while a contour map is present in the plot window yields two separate maps, each
with its own set of axes and scaling parameters. To create a single map with the
shaded relief map on the contour map, select both maps by clicking the Edit | Select
All command. Overlay the maps using the Map | Overlay Maps command.

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.

Adding a Shaded Relief Map Layer to an Existing Map


Alternatively, you can add the shaded relief map directly to the existing contour map
by creating the shaded relief map using the Map | Add command. This automatically
adds the shaded relief map to the contour map axes.

330
Chapter 10 – Shaded Relief Maps

To add a shaded relief map layer to an existing map:


1. Click on the existing map to select it.
2. Click the Map | Add | Shaded Relief Layer command.
3. Select a grid file in the Open Grid dialog and click Open.
4. The shaded relief map layer is automatically added to the existing map.

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.

Editing an Existing Shaded Relief Map


To change the features of the shaded relief map, click once on the shaded relief map
in the plot window or in the Object Manager to select it. The properties are displayed
in the Property Manager.

Shaded Relief Map Properties


The shaded relief map properties contains three tabs: General, Layer and
Coordinate System. The Layer tab and the Coordinate System tab contain the
same options that are available for for contour maps. These options are discussed in
Chapter 6 – Contour Maps. Properties that belong to the map, but that have an affect
on the shaded relief map layer, are discussed in Chapter 14, Common Map Properties.

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:

Input Grid File


The Grid file displays the path and file name for the grid file used for the 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.

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

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 shaded
relief map. Select the
new grid file and click
Open to reference the
new 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.

Peucker’s approximation uses a piecewise linear approximation. This method gives


somewhat better results than the Simple method, but redrawing the map takes
slightly longer. With Peucker’s approximation, 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.

The Lommel-Seeliger law method is based on an analysis of light scattering from a


surface. This method is a compromise between an ideal diffuser and a real surface.
With some surfaces, this may actually give better results than the Lambertian
reflection method. The Light Position Angles section allows the Horizontal (degrees), or
azimuth, and Vertical (degrees), or zenith, values to be specified with this option.

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.

Light Position Angles


The Light Position Angles section specify 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
(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.

Missing Data Color


The Missing Data section sets the color for blank regions of the grid. To select a
different missing data color, click on the existing color to the right Color and click on
the desired color from the palette. Click the Custom button at the bottom of the color
palette to define new colors in the Colors dialog. Refer to Chapter 17 for information
about the Colors dialog.

334
Chapter 10 – Shaded Relief Maps

Missing Data Opacity


To change the Opacity of the missing data, enter a value from 0% (completely
transparent) to 100% (completely opaque) by highlighting the existing value and
typing a new value or by dragging the to change the opacity percentage.

Shaded Relief References


Many of the parameters for the shaded relief map are technical in origin, and a
detailed development is beyond the scope of this document. For a complete
presentation of the underlying theory and mathematics, see Horn (1982).

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.

1-Grid Vector Map


Vector map information, direction
and magnitude, can be derived
from one grid. The arrow symbol
points in the "downhill" direction
and the length of the arrow
depends on the magnitude, or
steepness, of the slope. A vector
is drawn at each grid node unless
some nodes are skipped by
changing the Frequency setting on
the Symbol page in the vector
map properties.

For example, consider a grid


containing elevation information.
If water were poured over the
surface, the direction arrows
would point in the direction water
flows - from high elevation to low
elevation. Magnitude is indicated
by arrow length. In the water flow
example, the steeper slopes would
have longer arrows.

This vector map is overlaid on a filled contour map.


Longer arrows indicate areas of steeper slope.

337
Surfer

2-Grid Vector Map


2-grid vector maps use two
separate grid files to
determine the vector
direction and magnitude. The
grids can contain Cartesian or
polar data.

With Cartesian data, one grid


consists of X component data
and the other grid consists of
Y component data.

With polar data, one grid


consists of angle information
and the other grid contains
length information. This map shows two Cartesian grid files. The blue
vectors are X component grid values. The red vectors
are Y component grid values. The black is the vector
that Surfer plots when the two grids are specified
when creating a 2-grid Cartesian vector map.

Creating a New Vector Map


To create a 1-grid vector map:

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.

To create a 2-grid vector map:

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

Overlaying a Vector Map onto another Map Layer


When vector maps are created using the Map | New command, they are independent
of other maps in the plot window. For example, creating a vector map while a contour
map is present in the plot window yields two separate maps, each with its own set of
axes and scaling parameters. To create a single map with the vector map on the
contour map, select both maps by clicking the Edit | Select All command. Overlay
the maps using the Map | Overlay Maps command.

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.

Adding a Vector Map Layer to an Existing Map


Alternatively, you can add the vector map directly to the existing contour map by
creating the vector map using the Map | Add command. This automatically adds the
vector map to the contour map axes.

To add a 1-gridvector map layer to an existing map:


1. Click on the existing map to select it.
2. Click the Map | Add | 1-Grid Vector Layer command.
3. Select a grid file in the Open Grid dialog and click Open.
4. The vector map layer is automatically added to the existing map.

To add a 2-gridvector map layer to an existing map:


1. Click on the existing map to select it.
2. Click the Map | Add | 2-Grid Vector Layer command.
3. Select the first grid file in the Open Grid dialog. This is the X component or Angle
component grid file. Click Open.
4. Select the second grid file in the Open Grid dialog. This is the Y component or the
Length component grid file. Click Open.
5. The vector map layer is automatically added to the existing map.

Any number of vector maps can be combined with any other map layers.

339
Surfer

Editing a Vector Map


To change the features of an existing vector map, click once on the vector map in the
plot window or in the Object Manager to select it. The properties are displayed in the
Property Manager.

Vector Map Properties


The vector map properties contains five tabs: Data, Symbol, Scaling, Layer and
Coordinate System. The Layer tab and the Coordinate System tab contain the
same options that are available for contour maps. These options are discussed in
Chapter 6 – Contour Maps. Properties that belong to the map, but that have an affect
on the image map layer, are discussed in Chapter 14, Common Map Properties.

Data Page - 1-Grid Vector Map


To edit a 1-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 Data page contains
the following options:
Specify the input grid file on the Data page for
a 1-grid vector map.
Input Grid File
The Grid file displays the
path and file name for the grid file used for the 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.

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.

Data Page - 2-Grid Vector Map


To edit a 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 Data page contains
the following options:

Input Grid Files


The Input Grids section
displays the path and file
name for the grid files
used for the map. If the
entire file name is not
Specify the Coordinate System, Angle, Units, and two grid
shown, place the mouse files on the Data page for a 2-grid polar vector map.
over the file name. A
small window will appear
with the full path and name displayed.

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.

Zero = North Zero = East


Numbers increase Numbers increase
clockwise. counter-clockwise.

This image shows the two


coordinate Angle orientations.

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.

Show Color Scale


The Show color scale option permits the display of a color scale bar adjacent to the
map. The color scale bar indicates the colors assigned to the vector symbols on the
map, and the associated Z level values are displayed as labels on the color scale bar.
When the Show color scale box is checked, the color scale bar is displayed. Refer to
Chapter 17 – Adding Colors to Maps for information about color scale bars.

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:

Change vector scaling properties in the Property


Manager on the Scaling page.

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

scaling provides a better 1.60


visual representation of
symbols that, for the 1.50
most part, are scaled in
one dimension (such as 1.40
arrows with varying shaft
length). When scaling the 1.30
arrows in two dimensions
SYMBOL SIZE
(symbol width and shaft 1.20
Logarithmic
length), Square root or
Square Root
Logarithmic scaling 1.10
Linear
displays the arrows more
effectively. To change 1.00
the Scaling method, click 100 110 120 130 140 150 160 170 180 190 200
the current option. A
Magnitude
drop-down list is
displayed. Click on the This graph shows the length of the vector relative
new option and the map to the magnitude of the vector with the three
automatically updates. different scaling methods.

348
Chapter 11 – Vector Maps

Reverse Vector Orientation


The direction the arrowhead points can be reversed by checking the Reverse vector
orientation check box. By default, vectors point in the "downhill" direction. Checking
the Reverse vector orientation points the vectors in the "uphill" direction.

Show Scale Legend


Check the Show scale legend box to display a legend of the vector lengths. Multiple
vectors can be displayed in the legend. See the Vector Length Legend section for more
information on vector map legends.

Vector Magnitude (data)


Set the Minimum and Maximum data values for the vectors in the Magnitude (data)
section. Check the Use data limits box to set the vector minimum and maximum to the
grid minimum and maximum values. Setting a new Minimum and Maximum is useful
in displaying a series of maps in which you would like all of the vectors to be scaled
the same even though the data minimum and maximum may differ.

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).

Vector Length Legend


A vector length legend displays scaled vectors with the appropriate value next to each
vector. By default, the vector length legend displays the minimum and maximum
vector length as symbols along with a numeric value for each symbol. This is useful in
determining what the vectors on a 1-grid vector map or a 2-grid vector map
represent.

Creating a Vector Length Legend


The Scaling page in the vector map properties contains a Show scale legend check
box. Check the Show scale legend box to display the vector length legend.

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

Editing the Vector Length Legend


To edit the legend, click
once on the vector length
legend in either the plot
window or the Object
Manager it to select it.
The properties are
displayed in the Property
Manager.

The vector length legend


has the following options:

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.

Titles can contain multiple


lines. To create a multiple Change the vector length legend
properties in the Property Manager.
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.

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.

Clipping Symbols on Vector Maps


In a 1-grid vector map or a 2-grid vector map, any symbols at the edge of the map
are truncated at the map limits. This results in a partial vector being drawn when the
vector extends beyond the map limits.

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.

Two-Grid Vector Map Data


The two components of a vector map, magnitude and direction, can also be created
from two grids. You can use either Cartesian or Polar data with two-grid vector maps.
Both grids must have the same grid line geometry. See Chapter 4, Creating Grid Files
for more information on grid line geometry.

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

A = (a1, a2) = (0, 3.5)


2
B = (b1, b2) = (3.5, 0)
C = (a1+b1), (a2+b2)
1 = (0+3.5), (3.5+0) = 3.5, 3.5

0 B
0 1 2 3 4

The vector direction is determined by adding the X component


and Y component vectors together.

The magnitude of the vector is:

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

0.71 3.50 4.95

This is the resulting vector map from the X component


and Y component grids shown previously.

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.

Negative Data and Polar Grids


Magnitude values cannot be negative. If you have chosen a gridding technique that
displays trends in the data, such as Kriging, you may end up with negative values in
your grid even if the original data are all positive. Regridding the magnitude data and
decreasing the grid spacing is one way to make the grid honor the data better. If you
regrid the magnitude data you must also regrid the angle data using the same grid
line geometry. If you do not want to change the grid line geometry of the grids or if
decreasing the grid lines is not completely eliminating the negative data, then you can
use Grid | Math to set all negative values equal to zero.

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:

Angle Grid Length Grid

After combining the grids:

This is a two-grid vector map


created with polar data (angle
grid and length grid).

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.

Adding a Map Layer


When wireframe maps are created, they are independent of other maps in the plot
window. For example, creating a wireframe map while a contour map is present in the
plot window yields two separate maps, each with its own set of axes and scaling
parameters. To create a single map with the contour map on the wireframe map,
select both maps by clicking the Edit | Select All command. Overlay the maps using
the Map | Overlay Maps command.

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.

Wireframes cannot be overlaid with other wireframes or on raster-based maps such as


3D surfaces, image maps, and shaded relief maps. Wireframes can be overlaid with
contour maps and other map types.

Editing an Existing 3D Wireframe


To change the features of the 3D wireframe map, click once on the wirefram map in
the plot window or in the Object Manager to select it. The properties are displayed in
the Property Manager.

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:

Input Grid File


The Grid file displays the path and file
name for the grid file used for the 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.

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.

Show Upper Surface


Check the Show upper surface box to display only the top portion of the surface. If the
Remove hidden lines box is checked, only those portions of the upper surface not
obscured by other portions of the surface are drawn.

Show Lower Surface


Check the Show lower surface box to display only the bottom of the surface. If the
Remove hidden lines box is checked, only those portions where the bottom of the
wireframe is not obscured by other portions of the surface are drawn. A base cannot
be displayed when viewing the lower surface.

Remove Hidden Lines


Check the Remove hidden lines box to remove the display of X and Y lines behind
other lines on the surface. When hidden lines are not removed, the wireframe has a
transparent appearance.

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

Plot Lines of Constant


The Plot Lines of Constant section allows you to specify the lines to be used when
displaying the wireframe. Any combination of X, Y, and Z lines may be used.

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.

To modify the base of a wireframe:


1. Check the Show base box to display the base. The base on a wireframe is the lines
connecting the wireframe to the corners of the axes.
2. Add X and Y lines to the base by checking the Show vertical lines box.

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.

The Properties Dialog – Z Levels


In the Property Manager, click on the Edit
In the Property Manager, click on Levels button to open the dialog and set the Z
the Z Levels tab. Then, click the Levels options for a wireframe.
Edit Levels button to open the Z
Levels page. The 3D wireframe Z Levels page controls the display of lines of constant
Z. When displaying the Z lines on a 3D wireframe, use the options on the Z Levels
page to control which levels of Z lines to display. You can specify the Z contour levels
and the line properties for the individual Z lines on this page.

The Z Levels tab on the


properties dialog provides
the following options:

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.

Level Value For One Level


To set a specific contour
level, double-click the level
value in the list that you wish Change the Z level properties in the
to change. Properties dialog on the Z Levels page.

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.

Level Line Property For One Level


To set a specific contour level line property, double-click the sample line next to the
level value you wish to change. The Line Properties dialog opens. Make changes to
the line properties and click OK.

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.

Editing Z Levels Zones


To edit Z Levels Zones:
1. Click on the wireframe map to select it.
2. Click on the Z Levels tab in the Property Manager.
3. Click the Edit Levels button next to Z levels.
4. Change the properties on the Z Levels page.
5. Click OK and the 3D wireframe is updated.

365
Surfer

Color Zones 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.

In the Property Manager, click on the Edit


The Properties Dialog – Levels button to open the dialog and set the
color zones options for a wireframe.
Color Zones
In the Property Manager, click on the Color Zones tab. Then, click on the Edit
Levels button to open the 3D wireframe Color Zones page. The Color Zones page
controls the color to apply to lines of constant X, Y, and Z based on Z values in the
grid file.

The Color Zones tab on the


Properties dialog provides
the following options:

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.

Level Value for One Level


To set a specific contour level,
double-click the level value in
the list that you wish to
Change the color zone properties in the
change. The Z Value dialog Properties dialog on the Color Zones page.
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.

366
Chapter 12 – 3D Wireframes

Level Line Property for One Level


To set a specific contour level line property, double-click the sample line next to the
level value you wish to change. The Line Properties dialog opens. Make changes to
the line properties and click OK.

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.

Apply Zones to Lines of Constant X, Y, and Z


The Apply zones to lines of constant allows the selection of which type of lines you
want the color zones applied. Check the boxes next to X, Y, and Z to apply the colors
to lines of constant X, Y, or Z.

Color Scale Bar


A color scale bar can be displayed on the map by checking the Color Scale check box
on this page.

367
Surfer

Editing Color Zones


To edit the color zones:
1. Click once on the wireframe to select it.
2. In the Property Manager, click on the Color Zones tab.
3. Click the Edit Levels button next to Color zones.
4. In the Properties dialog, change the desired line and level properties on the
Color Zones page.
5. Check the X, Y, or Z boxes to apply the color zone to that type of constant line.
6. Click OK and the wireframe is updated.

Color Filled Wireframe


Wireframes do not allow you to create filled contours, but you can create a 3D
wireframe and add a filled contour map layer. This allows you to create a filled contour
wireframe. Usually, 3D surface maps are better for creating this type of map.

To create a filled contour map and overlay onto a 3D wireframe map:


1. Create a 3D wireframe map with the Map | New | 3D Wireframe command.
Select the grid file and click Open. The wireframe is created.
2. Click once on the wireframe map to select it.
3. Click the Map | Add | Contour Layer command. Select the grid file and click
Open. The contour map is added to the wireframe.
4. Click once on the contour map in the Object Manager to select it.
5. In the Property Manager, click on the General page. Check the Fill contours
box.
6. Click on the Levels page. Set any parameters for the contour map. The map will
automatically update to display the changes.
7. The result is a filled contour map draped over the 3D wireframe map. Since no
hidden line removal is performed on the contour map, it may be necessary to
adjust the tilt so all areas are visible. Select the Map | Trackball command or

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

Specifying the Lines to Draw on a Wireframe


Any combination of X, Y, and Z lines can be displayed on wireframe maps. When using
X and Y lines to represent the surface, a mesh appears on top of the surface. When
using the Z lines, an elevated contour map is drawn.

To specify which lines to draw on the 3D wireframe:


1. Click once on the wireframe map to select it.
2. In the Property Manager, click on the General tab.
3. In the Plot Lines of Constant section, check the appropriate boxes to display any
combination of X, Y, and Z lines on the wireframe.
4. When displaying the Z lines on a wireframe, use the options on the Z Levels page
to control which levels of Z lines to display. Specify the Z contour levels and the
line properties for the individual Z lines on this page. The selected levels affect the
Z contours on the wireframe and do not display contour labels or hachures.
5. To display contour labels or hachures on a wireframe, add a contour map layer.
Select the wireframe map and use the Map | Add | Contour Layer command.
6. Set any other desired options on the General page.
7. The wireframe is displayed with the line types you have chosen.

Line Property Precedence


Wireframe line properties can be assigned on three different pages in the Property
Manager depending on the effect you are trying to achieve.
1. Color Zones page
2. Z Levels page
3. General page

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.

To change the base parameters:


1. Click on the wireframe map to select it.
2. In the Property Manager, click on the General tab.
3. Check the Show base box to display the base lines.
4. To display vertical base lines, check the Show vertical lines box. Vertical lines are
drawn on the face between the base and the surface border. The vertical lines
represent the X and Y grid lines extended from the border of the surface to the
base.
5. To specify base height, enter the value into the Elevation box. The value is in Z
data units. The smaller the number entered in the Elevation box, the farther the
base begins from the bottom of the wireframe surface, creating a thicker base.
6. Specify the line properties for the base in the Line Properties section.
7. The wireframe is drawn with the specified base parameters.

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.

Color can be used to show Z values on


surfaces. The colors are blended to
form a smooth gradation. Once the
color is selected, the lighting can be
adjusted, changing the appearance of
the map. This 3D surface map is displayed
with custom colors and no axes.
Customize your map in any way
you choose to display exactly
Creating a 3D Surface the map you want.
To create a 3D surface:

1. Use the Map | New | 3D Surface command, or click the button.


2. Select a grid file in the Open Grid dialog and click Open.
3. The 3D surface map is created.

Adding a Map Layer


When surface maps are created, they are independent of other maps in the plot
window. For example, creating a surface map while a contour map is present in the
plot window yields two separate maps, each with its own set of axes and scaling
parameters. To create a single map with the contour map on the surface map, select
both maps by clicking the Edit | Select All command. Overlay the maps using the
Map | Overlay Maps command.

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.

Editing an Existing 3D Surface


To change the features of the 3D surface map, click once on the surface map in the
plot window or in the Object Manager to select it. The properties are displayed in the
Property Manager.

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:

Input Grid File


The Grid file displays the path and
file name for the grid file used for
the 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.

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.

Change mesh properties in the


Frequency Property Manager on the Mesh page.
You can change the frequency of the
X lines by entering a new number into the Frequency box. If this value is one, every
grid node in the X direction will have a mesh line. If this value is two, every other grid
node in the X direction will have a mesh line. If this value is three, every third grid
node in the X direction will have a mesh line, and so on.

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)

Drawing Mesh Lines


To draw mesh lines on a 3D surface map:
1. Click on the surface map to select it.
2. In the Property Manager, click on the Mesh tab.
3. Check the Draw lines boxes in the Lines of Constant X and Lines of Constant Y
sections.
4. Change the Line Properties for the X and Y lines.
5. You can change the frequency of the lines by entering a new number into the
Frequency boxes.
6. If you overlay two or more surface maps, the mesh lines may appear dashed or
broken. Experiment with the Surface offset values to change the distance above
the surface that the mesh is drawn.

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.

Lighting Set 3D surface map lighting properties in the


Property Manager on the Lighting tab.
There are three lighting options.
Click on the current lighting
option next to Model. In the drop-down list, select the desired lighting option.
• None disables all lighting effects. The color shown is from the surface material
color only.
• Smooth splits each grid cell is into two triangular polygons. Gouraud shading is
used to interpolate colors within the triangles from the three vertices of each
triangle. This results in smooth transitions across the triangles and the entire grid,
but it is slightly slower than flat shading.
• Flat uses a single vertex (grid node) to define the shaded color for the entire
polygon. Note that each grid cell is divided into two triangular polygons. This
results in a faceted look since each triangle is only filled with a single color.

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

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.

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

component. Increasing the percentage of specular light results in strong shadow


effects and more pronounced "shiny" or glare spots. The default Specular color is
90% black.

In general, these reflectivity colors should be specified as shades of gray in order to


evenly reflect the surface material color components. However, special effects are
possible by specifying non-gray colors for the reflectivity. For example, assume the
Ambient reflectivity is set to pure red, and the Diffuse and Specular components are
set to pure black. The Diffuse and Specular components are essentially disabled by
setting their reflectivity color to black. The only light that is reflected to the viewer is
red ambient light. Portions of the surface that lack a red component in the material
color will appear black, since only red light is reflected to the viewer.

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.

Map Layer Visibility


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.

Fill and Line Properties


The Fill and Line Properties dialog is used to set the base fill and line properties of a
3D surface map. To open the Fill and Line Properties dialog,
1. Click on the surface map to select it.
2. In the Property Manager, open the General tab.
3. Open the Base section if necessary.
4. Check the box next to Show Base to show the base from the surface to the axes.
5. To open the Fill and Line Properties dialog, click the Edit Base Properties button
next to Properties.

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

Setting the 3D Surface Map Base Properties


1. To set the 3D surface map base properties:
2. Click on the surface map to create it.
3. In the Property Manager, click on the General tab.
4. Check the Show base box to enable the base.
5. Click the Edit Base Properties button next to Properties.
6. Set the fill and line properties in the Fill and Line Properties dialog.
7. Click OK in the Fill and Line Properties dialog. The map automatically will
update to show the base properties on the surface map.

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.

Maps can be displayed at any orientation using the


options on the View tab. The Projection, Rotation,
Tilt, and Field of view of a map are changed on the
View tab.

Map scale controls the size of a map on the printed


page. This is accomplished by defining a
correspondence between length on the map (in map
units) and length on the printed page (in page
units). For example, one mile on the map
Click on the Map object to open
corresponds to one inch on the page. The map
the map properties.
scale is set using the options on the Scale tab.

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.

Editing Map Properties


Properties common to all layers in a map are displayed in the Property Manager
when the Map object is selected. Specific properties of a map layer are controlled by
the specific map layer properties. The properties of one or more maps can be opened
by selecting the Map object in the Object Manager or by clicking on the Map object in
the plot window.

Click on the Map object to Click on the Contours object to


open the map properties. open the contour properties.

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.

The View page is located in the


Property Manager when a Map object
is selected in the Object Manager.

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.

A small Field of view shows the


map in perspective as the if the
observer was far from the
viewpoint, making the perspective The Field of view cross section shows the position of the
eye (E), the center of the surface (C), the distance from
more pronounced. A large Field of
the eye to the point (d), and the radius of the bounding
view shows the map in sphere around the surface plot (r).
391
Surfer

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.

Axes are part of the map on which they are


drawn. Therefore, when the scale is redefined,
the axes are modified accordingly. Because
Surfer calculates reasonable tick spacing
based on the map lengths and map limits,
redefining the scales can result in different tick
spacing along the axis.

Default Scale This map scale was customized.


The Y dimension covers a greater
By default, map scales are defined
extent than the X dimension in this
proportionally in the X and Y dimensions, with map. By default, the Y axis would be
the longest side measuring six inches on the six inches in length, and the X axis is
printed page. proportionally shorter.

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.

Map Units Per In. (cm.)


The Map units per in. (cm.) option sets the
number of map units per page unit in the
associated dimension. For example, to draw a
map at a scale of 1000 map units per inch,
type the value 1000 into the box. The Length
(page units) value is automatically updated to Specify the relative X, Y, and Z
reflect the change. map scaling on the Scale page.

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.

Using Different Scaling in the X and Y Dimensions


Under some conditions, different map units are used for the X and Y dimensions.

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.

Using Scaling to Minimize Distortion on Latitude/Longitude Maps


When you display maps based on latitude and longitude coordinates extending over a
large region, they might appear somewhat distorted. This occurs because one degree
of latitude is not equivalent to one degree of longitude.

For example, consider a base map of the state of California (CA2000.GSB).

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.

As an approximation, the distance covered by one degree of latitude at the equator is


equal to the distance covered by one degree of latitude at the poles, and is
approximately 69 miles. This distance between degrees of latitude remains nearly
constant over the globe, although it does vary slightly because the earth is not a
perfect sphere. However, the distance between a degree of longitude decreases from
the equator to the poles. For any latitudinal position, you can determine the length, in
miles, between degrees of longitude based on the formula:
Distance covered by 1° of longitude (in miles) = cosine (latitude) x 69.172.

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.

To determine the scaling factors:


1. Determine the latitude for the parallel through the center of the map, and obtain
the cosine for this latitude value. The center parallel in CA2000.GSB is
approximately 37.27 degrees. The cosine of 37.27 is 0.80.
2. Click on the Map in the Object Manager to select it. The map properties are
displayed in the Property Manager.
3. Click the Scale tab to set the X direction for the map. You can set either the
Length (page units) value or the Map units per in. (cm.) value. The X Scale Map
units is 1.72 inches in this example.
4. Uncheck the Proportional XY scaling box.
5. Multiply the X Scale Map units value by the cosine of the latitude, and enter this
number into the Y Scale Map units field. 1.72 (X Scale Map units) X 0.80 (cosine of
latitude) = 1.38 (Y Scale Map units). Enter 1.38 into the Map units per in. box
under Y Scale.
6. The map is automatically updated.

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.

Let's say you are plotting the map at


an X scale of 1" = 2 map units
(longitude). For the map to be scaled
appropriately, you would plot the Y
scale at 1" = 1.372 map units When the map is scaled so 1° of longitude
(latitude, 2 x 0.686 = 1.372). This equals 1° of latitude, map distances are
effectively stretches the map in the distorted. Notice that the graticules form
latitude (N-S) direction. Now the map squares (equal spacing).

396
Chapter 14 – Common Map Properties

distances are nearly the same in the longitude and


latitude directions.

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.

Limits XY Min and Max


Set custom xMin, xMax, yMin, and
yMax map limits in the Spatial
Extents group.

Map limits can be set larger or


smaller than the limits of the current
map. For example, if you have a map
that ranges from zero to 100 in the X
dimension, but you only want to
display the map from 25 to 50 in the
X dimension, use 25 and 50 as the
new minimum and maximum values
on the Limits page.
Specify the map limits in the
Property Manager on the Limits page.
Use Data Limits
The Use data limits check box resets the map limits to the limits of the grid file, base
map, or post map data file limits.

397
Surfer

Example

The map limits of the map


have been adjusted to the
limits of the area of interest.
The map limits of the map are set to the default limits as
defined by the base map. The limits of a smaller area of
interest are indicated with the dashed rectangle.

Limits and 3D Wireframes


Map limits cannot be defined for 3D wireframes; this constraint includes composite
maps containing 3D wireframe layers. These maps are limited to the extent of the grid
file used to create the wireframe. To change the limits of a grid file for a wireframe,
use Grid | Extract or create a new grid file with new limits. Alternatively, use a 3D
surface map with mesh lines to simulate a wireframe map.

Limits and Axis Scaling


When you change map limits, axes that use automatic scaling are redefined to fit the
new limits of the map. If you do not use automatic scaling for the axes, the axes are
drawn over the same range as the original map and will not match the map using the
new limits.

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.

Limits and Map Scale


When new map limits are defined for a map, the map scale is not changed. For
example, if the map uses a scaling of 1 inch = 1000 meters, the new map uses this
same scale. This can result in maps much smaller or larger than the original map. In
this case, click on the map and set the new scale on the Scale page.

Limits and Post Maps


Limits can be set on post maps or maps containing a post map layer. When a posted
point lies outside the map limits, the posted symbol and the label are clipped from the
map. When a posted point is at or inside the map limits, the entire symbol and posted
label are printed, even if the symbol and label extend beyond the limits of the map.

Limits, Scale, and Adding Map Layers


When a new map layer is added to an existing map or a modified map layer exceeds
the current map limits, a message appears prompting you to adjust the map limits to
include all the layers. Select Yes to adjust the map limits. Select No to preserve the
current map limits.

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.

This is a contour map displaying green filled contours.


The remainder of the contours are 0% opaque, allowing
the light blue background to be seen. A heavy dark
blue map border has also been added to the map.

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.

To modify the frame properties:


• Click the + next to Line Properties to open the Line Properties section and
customize the map border.
• Click the + next to Fill Properties button to open the Fill Properties section and
customize the map background.

401
Surfer

Target Coordinate System


Maps can be displayed in any coordinate system. The map is displayed in the
coordinate system defined as the Target Coordinate System for the map. A coordinate
system normally has a defined projection and datum. If some map layers are using a
different source coordinate system than the map's target coordinate system, the map
layer is converted to the map's Target Coordinate System. The map's Target
Coordinate System is the new coordinate system that you want to use to project your
X, Y coordinate data. Refer to Chapter 15, Coordinate Systems for more information.

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.

Specify the map coordinate system on the Coordinate System page.

To modify the target coordinate system:


1. Click on the Map in the Object Manager to select it.
2. In the Property Manager click on the Coordinate System tab.
3. 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.

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.

A local coordinate system generally is considered unreferenced. A local system has a


location that begins numbering at an arbitrary location and increments numbers from
this location. This is frequently referred to as a Cartesian coordinate system.

A Geographic coordinate system uses a spherical surface to define locations on the


earth. Geographic coordinate systems are commonly called unprojected lat/long.
Surfer has several predefined geographic coordinate systems available. Each system
has a different datum. The same latitude and longitude value will plot in different
locations depending on the datum.

A Projected coordinate system consists of a projection and a datum. Each projection


distorts some portion of the map, based on the ellipsoid and datum specified.
Coordinates can be lat/long, meters, feet, or other units. Different projections cause
different types of distortion. 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.

Map Coordinate System Overview


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.

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 cannot be converted to a new coordinate


system.

Source Coordinate System - Map Layer


Maps can be created from data, grids, or base map files in any coordinate system.
The Source Coordinate System is the coordinate system for the original data, grid, or
base map used to create a map layer. A coordinate system normally has a defined
projection and datum. If some map layers are using a different source coordinate
system than what you want the map to display, the map layer is converted to the
map's Target Coordinate System.

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.

Specify the map layer coordinate system


on the Coordinate System page.

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

Target Coordinate System - Map


Maps can be displayed in any coordinate system. The map is displayed in the
coordinate system defined as the Target Coordinate System for the map. A coordinate
system normally has a defined projection and datum. If some map layers are using a
different source coordinate system than the map's target coordinate system, the map
layer is converted to the map's Target Coordinate System. The map's Target
Coordinate System is the new coordinate system that you want to use to project your
X, Y coordinate data.

The Coordinate System page is located in the Property Manager when a Map
object is selected.

Specify the map coordinate system on the Coordinate System page.

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

Displaying Data with Different Coordinate Systems in a


Single Map
Surfer allows you to display map layers from any coordinate system in a single map.
To do so, you need to assign the coordinate system for each map layer. Then, change
the desired target coordinate system for the map.

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 System


The Assign Coordinate
System dialog is accessed from
several locations. It links a file,
map layer, or map to a specific
coordinate system. Once a
coordinate system is defined for
a file, a Golden Software
Georeference .GSR2 file is
created. This file contains all the
relevant coordinate system
information that Surfer needs to
load the file in the proper
coordinate system in the future.

When a .GSR2 file is created for


a data file, it is read when
creating grids or maps from the
data file. The resulting grid or
map layer has the same
coordinate system as the original
data file.

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

Modify Coordinate System


Select any coordinate system from the Select a coordinate system list. Click the Modify
button to open the Define Coordinate System dialog. Modify any properties and
click OK. The modified coordinate system is added to the Custom list.

New Custom Coordinate System


Click the New button to open the Define Coordinate System dialog and define a
custom projection and datum. The new custom projection and datum will be listed in
the Custom section with the name you defined.

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.

Example 1: Select a Predefined Coordinate System (i.e. UTM)


1. In the Assign Coordinate System dialog, click the button to the left of
Predefined.
2. Click the button to the left of Projected Systems.
3. Click the button to the left of UTM.
4. Click the button to the left of WGS84.
5. Select WGS84 UTM zone 13N.
6. Click OK. The projection for this data is now set to WGS84 UTM zone 13N.

Example 2: Create and Select a Custom Coordinate System


1. In the Assign Coordinate System dialog, click the New button to open the
Define Coordinate System dialog.
2. Change the Name to Lambert Conformal Conic Custom.
3. From the Projection drop-down list, select Lambert Conformal Conic.
4. Make any necessary changes to the Parameter or Values in the Projection section.

411
Surfer

5. Make any necessary changes to the Datum section.


6. Click OK and the Lambert Conformal Conic Custom projection is added to the
Custom section.
7. Click the custom projection and click OK to apply the projection to the data.

Example 3: Saving a Custom Coordinate System


1. In the Assign Coordinate System dialog, click the + button to the left of
Custom.
2. Select the coordinate system in the Custom section and click the Add to Favorites
button.
3. Click the button to the left of Favorites to open the Favorites section. The
custom projection is saved here.
4. Click OK to close the dialog.

Define Coordinate System Dialog


Click the New or Modify buttons in the Assign Coordinate System dialog to open the
Define Coordinate System dialog. The Define Coordinate System dialog allows
you to create a Custom coordinate system. Select a Projection, enter the projection
Parameters, and specify a Datum. Click OK and the new coordinate system will be
added to the Assign Coordinate System dialog Custom list for future use.

The Define Coordinate System dialog provides the following options:

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.

The projection options


include: Unprojected
Lat/Long, Albers Equal
Area Conic, Azimuthal
Equidistant, Bonne,
Cassini, Eckert IV, Eckert
VI, Equidistant Conic,
Equidistant Cylindrical,
Gnomonic, Hotine Oblique
Mercator, Lambert
Azimuthal Equal Area,
Lambert Conformal Conic,
Mercator, Miller
Cylindrical, Mollweide,
Oblique Mercator,
Orthographic, Polyconic,
Robinson, Robinson-
Sterling, Sinusoidal,
Stereographic, Transverse
Define a custom coordinate system in the Define
Mercator, Universal Transverse Coordinate System dialog.
Mercator (UTM), and Van Der
Grinten.

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.

One of the simplest forms of projection is analogous to shining a light through a


translucent globe onto a piece of paper and tracing the outlines. Other forms of
projection may involve dozens of complex mathematical equations. Since no two-
dimensional representation of a three-dimensional surface can be accurate in every
regard, a variety of different projections have been developed to suit different
purposes. Some projections are accurate in terms of area but not in scale, some are
accurate in terms of scale but not in shape, and so on. The selection of an appropriate
projection for a map depends on which characteristics of a map are most important or
most desirable for a given project or audience.

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.

However, the Earth is actually somewhat ellipsoidal (or egg-shaped), approximately


1/300th wider than it is tall, assuming a vertical orientation with respect to the axis of
rotation. This shape needs to be taken into account to produce larger scale maps of
any significant accuracy.

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.

This is an example of an ellipsoid The diagram shows the semimajor


(dashed blue line) superimposed and semiminor axes on an ellipse.
on a sphere (solid black line).

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:

f = (Semimajor Axis - Semiminor Axis)/Semimajor Axis

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.

For more information on these subjects, see the Projection References.

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.

Some datums are designed to provide a marginally accurate representation of


coordinates spanning the entire Earth, while other datums are designed to provide
more accurate results in a particular region at the expense of lesser accuracy in other
parts of the world. For example, the South American Datum of 1969 (SA69) is tailored
to provide good results for maps of the South American continent and surrounding
areas, but, as a consequence, provides poor results for the rest of the world.

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.

Surfer supports conversions for over 200 different predefined datums.

Custom Datum Definition


Click the New button in the Assign Coordinate System dialog to open the Define
Coordinate System dialog. Use the Datum group to define a custom datum and
specify the exact datum parameters and values.

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.

Conversion Parameter and Values


You can edit the conversion parameter and values directly by selecting the value you
want to edit and typing a new value over it. Parameters vary depending on the
selected Conversion Method.

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

Understanding Local Datums


To understand how local datum transforms affect data, you need to understand the
ellipsoid, the spheroid, and how both relate to the datum. The spheroid is the a perfect
circular object, located at mean sea level. This is constant everywhere. Because of
local variations in the gravitational field, the shape actually has local variations.

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.

The image from Verhoogan, shows the variation in the geoid,


ellipsoid, and actual topographic surface.

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.

Following are the characteristics of this projection:


• Lines of longitude are parallel to each other.
• Lines of latitude are parallel to each other.
• Lines of longitude are at right angles to lines of latitude.
• Regions near the equator or selected standard parallels are minimally distorted.
• Regions near the poles are highly distorted.

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

Following are the characteristics of this projection:


• Lines of latitude form concentric arcs.
• Lines of longitude are straight and radiate outward from the tip of the imaginary
cone.

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.

Following are the characteristics of this projection:


• The side of the Earth that is facing away from the center of the projection is not
visible.

Examples of this type of projection are: Azimuthal Equidistant, Gnomonic,


Orthographic, Stereographic, and Lambert Azimuthal Equal Area.

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.

In maps of smaller regions, shapes may not be obviously distorted.

However, it has the following drawbacks:


• In order for a projection to be equal area, consistency in the shapes, scales,
and/or angles across the map must be sacrificed.
• Meridians and parallels may not intersect at right angles.

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.

A side effect is that conformal projections preserve the precise perpendicular


intersections between parallels and meridians on the map. When mapping smaller
areas, relative shape is preserved.

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.

Drawback of equidistant projection is that, in order for a projection to be equidistant,


however, consistency in the surface areas, shapes, and/or angles across the map must
be sacrificed.

Examples of equidistant projections are: Azimuthal Equidistant, Equidistant Cylindrical,


Equidistant Conic, and Cassini.

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.

Drawback of this type of projection is that, in order for a projection to be azimuthal,


areas, shapes, and angles may be sacrificed at areas not close to the center of the
map.

Examples of azimuthal projection are: Azimuthal Equidistant, Gnomonic, Lambert


Azimuthal Equal Area, Orthographic, and Stereographic.

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.

In addition to the characteristics described above, some projections have highly


specialized characteristics that may be useful in certain applications. For example, on
maps made with a Mercator projection, all lines of constant direction (rhumb lines) are
known to be straight, thereby making such maps very desirable as navigational charts.

423
Surfer

Predefined Coordinate Systems in Surfer


In the Assign Coordinate System dialog, the coordinate systems under Predefined
are separated into different categories.

The Predefined section includes all coordinate


systems that have been predefined for Surfer.

Expand the Predefined section by clicking the + button. The Predefined section
includes all coordinate systems that have been predefined for Surfer.

Geographic (lat/long) Coordinate Systems


In the Assign Coordinate System dialog, the Geographic (lat/long) category
contains unprojected latitude and longitude coordinate systems. Coordinates are
always in latitude and longitude. Each coordinate system has a different datum.
Datums are defined for specific regions. Properties for each coordinate system and
datum are listed in the dialog by clicking on the desired system.

Polar/Arctic/Antarctic Projection Systems


The Polar/Arctic/Antarctic category contains different projections that can be used
near the north and south poles. Several different projections fit into this category:
Lambert Conformal Conic, Orthographic, and Stereographic. Coordinates are always in
latitude and longitude. 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 regions. Properties for each coordinate
system and datum are listed in the dialog by clicking on the desired system.

424
Chapter 15 – Coordinate Systems

Regional/National Projection Systems


The Regional/National category contains different projections that can be used for
specific regions or countries of the world.

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.

State Plane Coordinate Systems


The State Plane category contains both 1927 and 1983 systems. Coordinates are in
either feet or meters. The difference between the 1927 and 1983 systems are in the
definition of the false easting, northing, central longitude, central latitude, standard
parallel or datum. Settings are defined for specific regions of individual states.
Properties for each coordinate system and datum are listed in the dialog by clicking on
the desired system.

UTM Coordinate Systems


The UTM category contains different systems separated by country, region, or type.
Coordinates are in meters. The differences between the systems are in the definition
of the false easting, northing, central longitude, central latitude, standard parallel or
datum. Settings are defined for specific regions or individual countries. Properties for
each coordinate system and datum are listed in the dialog by clicking on the desired
system.

World Projection Systems


The World category contains different projections that can be used to display the map
in a particular way. Several different projections fit into this category: Bonne, Eckert
IV, Eckert VI, EPSG 3395 – Mercator, EPSG 3785 – Popular Visualisation CRS /
Mercator, Equidistant Conic , Equidistant Cylindrical, Miller, Mollweide, Orthographic
Western Hemisphere, Robinson and Robinson-Sterling, Sinusoidal, and Van Der
Grinten. Coordinates are in latitude and longitude. The difference between the
projections are in the definition of the false easting, northing, central longitude,

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.

Albers Equal Area Conic Projection


The Albers Equal Area Conic projection scale is constant along any given parallel and
accurate along the two specified standard parallels. This projection is used in the
National Atlas of the United States. The Albers Equal Area Conic projection is useful for
equal area maps of low-aspect regions (regions that are wider than they are tall).

426
Chapter 15 – Coordinate Systems

The following table provides the parameters of the projection:

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

Azimuthal Equidistant Projection


The Azimuthal Equidistant projection is a planar projection. Directions and scale are
true from the center point of the map. Shapes are true at the center of the map, but
are distorted the further you move from the center. When using a polar view of this
projection, all meridians are straight lines. When using an equatorial view, the central
longitude and equator are straight lines, otherwise, only the central longitude is a
straight line. This projection is typically used in polar hemispheric maps.

The following table provides the parameters of the projection:

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.

The following table provides


the parameters of the
projection:

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.

This projection is useful for high-aspect regions


(regions taller than they are wide).

The following table provides the parameters of


the projection:

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.

The following table provides the parameters of the projection:


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.

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.

The following table provides the parameters of the projection:

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

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.

Equidistant Conic Projection


There is no distortion in scale, shape, or area along the standard parallels in an
Equidistant Conic projection. Scale is true along all longitudes and along the standard
parallels. Direction is locally true along the standard parallels. This projection is useful
for maps of low-aspect regions (regions that are wider than they are tall).

The following table provides the parameters of the projection:

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

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 Standard Specifies the latitude of the second of two standard parallels, in degrees. See
Parallel above.

Equidistant Cylindrical Projection


The coordinates are
equidistant with respect to
the center of the
Equidistant Cylindrical
projection. Distortion is
minimal at the specified
standard parallel and
increases dramatically with
distance north or south
from this parallel. Typically,
this projection is used with
maps covering small areas.

The following table


provides the parameters of
the projection:

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.

Geographic Coordinate System


This is a simplistic cylindrical projection. If the coordinates in a Surfer map layer are
stored in a geographic coordinate system (also known as Unprojected Lat/Long or
latitude/longitude), the map is displayed on the screen by simply treating the
longitudes as horizontal offsets and the latitudes as vertical offsets.

When plotting latitude/longitude coordinates, Surfer constructs the map coordinate


system by first determining the latitude for the center of the map. Then the
appropriate scale is determined for the east-west (longitude) relative to the north-
south (latitude) dimension of the map.

436
Chapter 15 – Coordinate Systems

The features of a geographic coordinate system (Unprojected Lat/Long) map are:


• Meridians (lines of constant longitude) are equally spaced and are drawn
perpendicular to the parallels.
• Parallels (lines of constant latitude) are equally spaced over the entire map and
are drawn perpendicular to the meridians. The further your map area is from the
equator, the further apart the parallels are spaced.
• The spacing between meridians is different than the spacing between parallels
except when the equator is at the north-south center of the map.
• At the center of the map, the scale is accurate in both the north-south and east-
west direction.
• Scale is accurate in the north-south direction over the extent of the map.
• East-west scale increases towards the poles, and decreases towards the equator.
• There are no parameters for this projection.

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

The following table provides the parameters of the projection:

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

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.

Hotine Oblique Mercator Projection, 1-Point with Azimuth


The Hotine Oblique Mercator projection is a
cylindrical, conformal projection. The scale is
accurate along the chosen central line by the
longitude/latitude settings below. This
projection is useful for oblique areas (areas
that do not follow lines of latitude and
longitude), such as the Alaska panhandle
because the central line does not have to
follow a line of constant longitude.

This projection is typically used with areas


that are state or province sized and it is not
suitable for maps of the world. There are two
forms of the Hotine projection equation. If
using the 1 point method, the projection is
defined by a point and an azimuth that
defines a line (Alternate B, Snyder).

The following table provides the parameters


of the projection:

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

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.
Central Scale Specifies the central scaling factor for the projection. This value is
Factor (KO) often set to 1.0, but may be set to another value for specific
applications.
Use Alpha If False, use Snyder's Alternate A form; if True use the azimuthal
Parameter form (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 Meridian Defines one end of the X extent for the central line.
2nd Defines the other end of the Y extent for the central line.
Standard
Parallel
2nd Meridian Defines the other end of the X extent for the central line.
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 coordinates 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.

440
Chapter 15 – Coordinate Systems

Hotine Oblique Mercator Projection, 2-Point


The Hotine Oblique Mercator projection is a
cylindrical, conformal projection. The scale is
accurate along the chosen central line by the
longitude/latitude settings below. This projection
is useful for oblique areas (areas that do not
follow lines of latitude and longitude), such as
the Alaska panhandle because the central line
does not have to follow a line of constant
longitude.

This projection is typically used with areas that


are state or province sized and it is not suitable
for maps of the world. There are two forms of
the Hotine projection equation. If using the 2
point method, the projection is defined by
selecting two points to form a line (Alternate A,
Snyder).

The following table provides the parameters of


the projection:

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

Lambert Azimuthal Equal Area Projection


Scale on a Lambert Azimuthal Equal Area projected map is accurate only from the
center to any other point on the map. Distortion is minimal near the center and
increases with distance from the center. This projection is useful for continents, polar
regions (hemispheres), or smaller regions. The Lambert Azimuthal Equal Area
projection is not generally used for world maps due to extreme distortion outside the
center of the map.

The following table provides the parameters of the projection:


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.

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.

Lambert Conformal Conic Projection


In a Lambert Conformal Conic
projection, scale is constant along any
given parallel and accurate along the
specified standard parallels. Scale is
the same in all directions at any given
point. This projection is useful for
equal area maps of low-aspect regions
(regions that are wider than they are
tall).

The pole is a point in the hemisphere


containing the standard parallels and
the graticules stretch to infinity in the
other hemisphere. The Lambert
Conformal Conic projection is used for
many of the zones in the State Plane
Coordinate System.

The following table provides the


parameters of the projection:

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

The following table provides the parameters of the projection:

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 Projection


Scale is constant along any given
parallel and accurate along the
equator in a Miller Cylindrical
projection. Scale is the same in all
directions near any given point.
Miller Cylindrical projection maps
use variable latitudinal scale as a
way to minimize distortion as you
move north or south from the
equator. The method effectively
corrects for the relative distances
covered by one degree of longitude
relative to one degree of latitude as
you move away from the equator.
Distortion is minimal near the
equator, but becomes extreme
toward the poles.

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.

The following table provides the parameters of the projection:


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.

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.

The following table provides the parameters of the projection:

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.

Oblique Mercator Projection


The Oblique Mercator projection is a cylindrical,
conformal projection. The scale is accurate along
the chosen central line by the longitude and
latitude settings below (1st Point and 2nd Point).

This projection is used for oblique areas which are


areas that do not follow lines of latitude and
longitude, such as the Alaska panhandle. This
projection is usually used with areas that are state
or province sized. This projection is not suitable
for maps of the world.

The following table provides the parameters of the


projection:

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.

This projection is useful for "view of globe" or


"view from space" pictures of the Earth. A
limitation of this projection is that the
hemisphere facing away from the center of the
projection is not visible. Objects near the edge of
the visible hemisphere may be clipped.

The following table provides the parameters of


the projection:
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

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

The following table provides the parameters of the projection:


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.
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.

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.

The Robinson and Robinson-


Sterling projections produce
visually similar results, but

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.

The following table provides the parameters of the projection:


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 option is only available for the Robinson-
Sterling projection.

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.

The following table provides the parameters of the projection:


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.

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

The following table provides the parameters of the projection:


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 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

State Plane Coordinate System Projections


The State Plane Coordinate
System (SPCS) divides the
United States into a number of
zones, and defines a different
projection for each zone such
that a suitable map of any given
zone is plotted. SPCS is used
mainly for intrastate views such
as county or parish maps.

Unlike most forms of projection


where the datum may be
specified separately, the SPCS is
tied to a specific datum. There
are two State Plane Coordinate
Systems commonly used.
The State Plane Coordinate
System of 1927 uses the North
American Datum 1927 (NAD27),
while the State Plane Coordinate System of 1983 uses the North American Datum
1983 (NAD83).

The following table provides the parameters of the projection:

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

Transverse Mercator Projection


The Transverse Mercator
projection is also known as the
Gauss-Kruger projection or the
Gauss Conformal projection. This
projection is cylindrical and
conformal. In this projection,
scale is constant along any
straight line that is parallel to
the specified central meridian.
Scale increases with distance
from the central meridian.
Distortion is minimal near the
center of the projection and
increases dramatically with
distance from the center.
Distortion is considerable when
projecting coordinates that fall
within a few degrees of the
poles. This projection is useful
primarily for mapping small
regions no more than a few
degrees across, particularly
high-aspect regions (regions
taller than they are wide). A limitation of this projection is that coordinates at or near
the poles cannot be projected. An additional limitation is that regions larger than a
quadrant (e.g. having greater than 90 degrees extent either vertically or horizontally)
result in portions of the projected image folding over each other due to constraints of
the mathematical formulas used. The projection is best used with areas that are no
greater than 30 degrees wide or tall, and preferably with areas that are much smaller.

The following table provides the parameters of the projection:


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.

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.

Universal Transverse Mercator (UTM) Projections


The Universal Transverse Mercator
system, commonly known as UTM,
divides the Earth into sixty discrete
zones, each representing a vertical
slice of the globe spanning six
degrees of longitude. A Transverse
Mercator projection is applied to
each zone with the central meridian
of the projection at the center of the
given zone and the central latitude
of the projection at the equator. This
coordinate system is the basis for
many standardized regional maps,
such as tract or neighborhood maps
by the US Census Bureau and
topographic quadrangles by the US
Geological Survey.

UTM is not generally used for


coordinates outside the range of -80
to +84 degrees latitude due to the
distortion inherent in Transverse
Mercator projections near the poles.

459
Surfer

The following table provides the parameters of the projection:


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.
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. 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.
Projection in Choose True if your map is in the southern hemisphere. Choose False if your
Southern map is in the northern hemisphere.
Hemisphere

Van der Grinten Projection


This projection is typically used for maps of the world and the scale is accurate along
the equator. This projection was used by the National
Geographic for world maps. The central longitude and
the equator are straight lines and the poles are greatly
distorted.

To get good results with the Van der Grinten projection,


the map must have coordinates between +/-180
degrees longitude and +/- 90 degrees latitude. Surfer
does not wrap around +/-180 degrees longitude. The
example map is using world-proj.gsb as the base map.
If you are using world-scale maps, the central longitude
generally cannot be set far from 0 degrees since there
is no wrap around in Surfer.

460
Chapter 15 – Coordinate Systems

The following table provides the parameters of the projection:


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.

Golden Software Reference Files


If you have looked in a folder that contains data, boundary files, or grid files created
by Surfer 10, you may have noticed files with a .GSR2 extension in the folder. These
Golden Software Reference files are created when you save a projected file from
Surfer. For example, if you create a data file and use the Data | Assign Coordinate
System command, when you save the data file, you will see both the filename.dat
and filename.dat.gsr2 in the directory.

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 Coordinates


In Surfer, worksheet data can be projected using a projection. The projected data can
then be used to create a grid file and a grid based map.

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.

Surfer only plots latitude and longitude coordinates in decimal degrees.

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.

Latitude and Longitude in Decimal Degrees


Latitude and Longitude coordinates are often presented in degrees, minutes, and
second, such as 39°25'30" (39 degrees, 25 minutes, 30 seconds). However, Surfer
can only plot values in decimal degrees. So, for example, 39°25'30" is referred to as
39.425 in Surfer.

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 Digitized Coordinates Window


Click the Map | Digitize command, or click the button to enter into digitize mode.
Left-click on a map, and the Digitized Coordinates window is displayed.

The digitized X, Y values are written to


the Digitized Coordinates window.

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.

Digitizing Information from a Map


To digitize information from a map:
1. Create a map in the plot window and select the map. You can select an overlay,
although the overlay cannot contain a wireframe or surface, or be tilted at an
angle other than 90 degrees.

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.

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

Coordinate System Information


If the map that you are digitizing from is referenced with a coordinate system on the
Coordinate System page, the digitized .BLN or data file automatically creates a
.GSR2 file. The points digitized and the .GSR2 file contains the map's target coordinate
system information. This is the map's coordinate system, not the map layer's
coordinate system.

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.

Creating a Blanking File with the Digitize Command


One of the uses of the Digitize command is to create a Golden Software Blanking
.BLN file. When creating a blanking file in this manner the header information is added
to the file automatically. The file automatically blanks inside (1) the polygon. If you
wish to blank outside the polygon, edit the file in an ASCII editor to change the
blanking value in cell B1 from 1 (blank inside) to 0 (blank outside).

To create a blanking file with the Digitize command:


1. Create a map in the plot window, and then click once on the map to select it. This
can be a map layer in an overlay, although the map cannot contain a 3D surface
or 3D wireframe, or be tilted at any angle other than 90 degrees.

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.

This 3D surface map contains a Z axis in


This is a contour map with the four addition to the X and Y axes.
axes labeled with their default names. 3D wireframe maps also contain a Z axis.

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.

The selected map axis is


For example, if you select the bottom axis of a highlighted in the Object
contour map, the text in the status bar appears as Manager. The axes checked
are displayed on the map.
"Map: Bottom Axis." The axis is also highlighted in
the Object Manager. The properties for the axis are
shown in the Property Manager.

Other Axis Features


Other axis features are axis titles and
grid lines. Axis titles can be placed on
any of the axes and are drawn in relation
to the associated axis. Grid lines are
drawn at the same position as the axis
tick marks.

Adding Additional Axes to


Map
Use the Map | Add | X Axis, Map |
Add | Y Axis, or Map | Add | Z Axis
command to add any number of When an axis is selected, blue circle handles appear
additional X, Y, or Z Axes to your current at the ends of the axis (shown on the bottom axis
map. Alternatively, right-click on an on this map) and green square handles appear
existing map and select Add to add a around the entire map.
map layer, axis, or scale 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.

Axis properties consist of four pages:


General, Tick, Scaling and Grid
Lines.

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.

Offset along Axis


The Offset along axis box controls the placement of the title along the axis. Positive
offset values move the axis title in the positive direction along the axis. The offset
values are set in page units.

Offset from Axis


The Offset from axis box controls the placement of the title towards or away from the
axis. Positive offset values move the axis title away from the axis. The offset values
are set in page units.

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.

Offset From Axis


The Offset from axis box controls how far away the tick labels are drawn from the tick
marks. Positive offset values move the axis title away from the axis. The offset values
are set in page units.

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.

Specify the axis tick properties in the


The Ticks page controls the Property Manager on the Ticks page.
display of major and minor
ticks, the position, and length of 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.

Minor Ticks Per Major


To specify the number of minor ticks to draw between adjacent major ticks, enter the
number into the Minor ticks per major box. This should be one less than the number of
minor divisions you want to appear between adjacent major ticks. Specify a value
between 0 and 100.

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.

Axis scaling is different from setting


the map scale. When axis scaling is
set, the axis limits are defined but
does not rescale the map. Axes that
use different limits than the map are
still drawn at the same scale as the
map. Because of this, it is possible In this example, the Bottom Axis and Left Axis are
to have axes shorter or longer than offset from the map, and the limits of the axes are
set differently than the map limits.
the map. To change the map scale,
open the map properties and choose
the Scale page.

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.

Specify the axis scaling in the


Axis Maximum Property Manager on the Scaling page.
The Axis maximum box specifies the
maximum 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.

First Major Tick


The First major tick box contains the major tick mark minimum value. This value is
expressed in data units. The First major tick does not need to be the same as the Axis
minimum but it cannot be less than the Axis minimum.

477
Surfer

Last Major Tick


The Last major tick box contains the maximum allowed major tick mark value. This
value is expressed in data units. The Last major tick does not need to be the same as
the Axis maximum but it cannot be greater than the Axis maximum.

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

Setting the Axis Scale


Axis limits are specified in map coordinates or variogram units. Axis limits do not need
to coincide with the map limits. Use these steps to change the axis scale:
1. Click on an axis to select it. The Property Manager automatically shows the
properties for the axis. Click on the Scaling tab.
2. You can set any of the parameters listed below.
3. The Automatic 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 in
the axis properties, the Automatic box is automatically unchecked. After making
any changes, you can return to the automatic settings by checking the Automatic
box.
4. The Axis minimum box specifies the minimum axis limit.
5. The Axis maximum box specifies the maximum axis limit.
6. The axis is automatically updated with the new axis scale settings as the values
are changed.

Grid Lines Page


Grid lines are a mesh over the top of
the map. Along an axis, grid lines can
originate from the major ticks, minor
ticks, or both. The major and minor
grid lines can use different line
properties. When grid lines are added
to 3D wireframe or 3D surface maps,
the lines are drawn on the plane
defined by the base of the map.

Grid lines are drawn over the extent of


the map. For example, if you draw grid
lines for an X axis (the Bottom Axis),
the grid lines are drawn parallel to the
Y axis (Left Axis) over the entire map.
If your X axis is offset from the Y axis, Grid lines originate from the tick marks. Different
the grid lines are not drawn beginning line properties can be used for the major and
at the end of the X axis, but beginning minor grid lines. In this example, major grid lines
at the minimum Y value on the map. are solid and minor grid lines are dotted.

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.

Major Grid Lines


If you want grid lines to extend
from the major ticks, check the
Show box in the Major Grid Lines
section. Click the next to Line
Properties to open the line
properties section for the Major
Grid Lines. Change the Style,
Color, Opacity, and Width for the
major grid lines.

Minor Grid Lines


If you want grid lines to extend
Specify the axis grid line properties in the
from the minor ticks, check the Property Manager on the Grid Lines page.
Show box in the Minor Grid Lines
section. Click the next to Line Properties to open the line properties section for the
Minor Grid Lines. Change the Style, Color, Opacity, and Width for the minor grid lines.

Drawing a Grid Covering a Map


To draw a grid covering the map:
1. Click on an axis to select it. The axis properties are automatically displayed in the
Property Manager.
2. 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.
3. Click the Grid Lines tab.
4. If you want grid lines to extend from the major ticks, check the Show box in the
Major Grid Lines section.
5. Change the options under Line Properties for the Major Grid Lines. You can change
the Style, Color, Opacity, and Width for the major 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.

Colors are assigned through the Fill,


Fill Properties, or Colormap
properties, depending on the type of
object. Color spectrums can be saved
for future use as color spectrum files
.CLR or as level files .LVL.

Opening the Colormap


Dialog Color spectrums, such as the variation of
The Colormap dialog is opened slightly Rainbow.CLR used in the image map above,
differently for each map type. We will can be saved for future use in other maps.
discuss it individually for each map
type.

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

To set the contour map fill color:


1. Click on the contour map to select it.
2. In the Property Manager, click the General tab.
3. Check the Fill contours option. This fills the contours with the default color
scheme.
4. In the Property Manager, click the Levels tab.
5. If the Level method is set to Simple:
a. Click the color bar next to Fill colors and select a new color scale.
b. To open the Colormap dialog, click the Custom button at the bottom of
the color list.
6. If the Level method is set to Advanced:
a. Click the Edit Levels button next to Contour levels.
b. Click the Fill button.
c. In the Fill dialog, click the Foreground Color button.
7. The Colormap dialog opens.

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.

Image and Shaded Relief Maps


To open the Colormap dialog for an image or shaded relief map,
1. Click on the image or shaded relief map to select it.
2. In the Property Manager, click on the General tab.
3. Open the General section and click the Colors button.
4. Click the Custom button at the bottom of the drop-down list of colormaps to open
the Colormap dialog.

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.

The Colormap Dialog


The Colormap dialog is used to assign either preset or custom color spectrums to a
map. Contour maps, image maps, shaded relief maps, vector maps, and surface maps
all use the Colormap dialog to
assign colors to the map.

The colormap has specific


colors assigned to nodes
along the spectrum.

Surfer automatically blends


colors between the nodes to
produce a smooth color
gradation over your map.
After you create a colormap,
you can save the spectrum as
a .CLR file for later use with Use the Colormap dialog to assign colors to a map.

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.

Loading a Preset Colormap


The Load button opens an existing colormap .CLR file. When you click the Load button,
the Open dialog is displayed with a list of colormap files. Click the file you want to use
and click Open. The colormap is updated to show the colormap file settings.

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.

Use the scroll control to zoom the colormap in or out.


Color
Click the Color box to specify the color of the currently selected anchor node. The color
palette opens.

Changing the Opacity


Change the Opacity of a node by selecting the node and 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. Note that
3D surface maps cannot be made transparent.

485
Surfer

Changing the Opacity of All Nodes


Click the Apply opacity to ALL nodes option to change the opacity for all nodes.
Uncheck the Apply opacity to ALL nodes to change individual node opacity.

Colormap Data Range


The Data to Color Mapping group contains options for setting the minimum and
maximum data values to use in the colormap.

Use Data Limits


Check the Use data limits check box to use the data minimum and maximum values.

Colormap Data Minimum and Maximum


If you would prefer to set the colormap minimum and maximum values to other
values, enter the new numbers into the Minimum and Maximum boxes. This is useful
when you are mapping different data sets in a similar range and would like to have the
same data values represented by the same colors each time. If a data value within the
map falls outside this range, it is assigned the minimum or maximum color, whichever
is closest.

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.

Anchor Node Value


The data value for the node is displayed in the Value box. Except for the first and last
nodes, any node can be assigned to a specific value by typing a new number into the
Value box.

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

Add Anchor Node


You can add additional anchor nodes at any position along the color spectrum. To
create a new anchor node, left-click below or on the color spectrum 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 color
spectrum.

Delete Anchor 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.

Positioning an Anchor Node


To position an anchor node:
1. Move the mouse cursor over the slider button.
2. Click and hold the left mouse button.
3. Drag the slider button to the desired position and release the left mouse button.
As you move the slider button, the data value is indicated in the Value box.
Alternatively, you can set the anchor to a specific data value by entering a number
into the Value box. Note that the beginning and ending anchors cannot be moved
or deleted.
4. Reset the Minimum and Maximum to change the range, and therefore, the position
of the starting and ending nodes.

Selecting a Color for an Anchor


To select a color to associate with the anchor node:
1. Click on the anchor you wish to modify.
2. Click on the desired color in the color palette. The color spectrum is updated to
indicate the change.
Alternatively, use a preset .CLR color file by selecting one of the options from the
Presets drop-down list or click the Load button to load a custom .CLR file.

487
Surfer

Using Color Spectrums in Map Series


Sometimes it is necessary to use the same range of colors on different maps. By
default, color spectrums are assigned to the minimum and maximum data values for a
given data set. If the maps have different data ranges, the colors will not map to the
same data values and it will be difficult to compare the maps. In this case, you may
want to override the default data limits and assign custom values in the Data to Color
Mapping group.

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.

Know Your Data


The first step in producing maps with the same color series is to know your data. Find
the minimum and maximum data values for all of your data sets before you begin.
This will help you to decide the minimum and maximum values to use in the color
spectrum for the series of maps. In this example, the maximum Z value is +251 in
one of the grids, and the minimum Z value is -261 in another grid. The largest and
smallest Z values do not appear in the same grid.

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.

Creating a Color Spectrum File


After you know the series minimum and maximum and have decided on a spectrum
minimum and maximum, you can create a color spectrum .CLR file to use with all the
data. In this example, -275 is the minimum and +275 is the maximum.

To create a color spectrum .CLR file:


1. Create a map using the Map | New commands. Select one of the .GRD files. An
image map is used throughout this example, though you can use contour maps,
image maps, shaded relief maps, vector maps, or 3D surfaces in this procedure.
2. Click once on the map to select it.
3. In the Property Manager, click on the General tab.
4. In the General section, click the color bar next to Colors. In the drop down color
list, click the Custom button.
5. In the Data to Color Mapping section, change the Minimum to -275 and the
Maximum to +275.
6. In the color spectrum bar, left-click in the middle of the color spectrum to add an
anchor node. While the node is still selected, change the Value to -200 or slide the
node to the -200 position (watch the numbers in the Value box). The minimum
color (at -275) is black. Select black for the -200 node as well.
7. Repeat step 6 to add nodes at zero (gray) and +200 (white).
8. Click the Save button to save the color spectrum .CLR file.
9. In the Save As dialog, type a File name and click Save.
10. Click OK to make the color change to existing map.

489
Surfer

Using the Color Spectrum File in Other Maps


After you have created the color spectrum file as above, you can use it in the
remainder of the maps in a series. To use a color spectrum file in another map:
1. Create the map. In this example, a new image map is created with the next grid
file.
2. Click once the map to select it.
3. In the Property Manager, click on the General tab.
4. In the General section, click the color bar next to Colors. In the drop down color
list, click the Custom button.
5. Click the Load button in the Colormap dialog and open the color spectrum .CLR
file you just created.
6. In the Data to Color Mapping group, set the Minimum and Maximum to the pre-
determined values. In this example, the minimum is set to -275 and the maximum
to +275.
7. Click OK to make the color change to this map.
8. Repeat this process for the rest of the maps in the series.

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.

Level Files for Contour Maps


For contour maps, .LVL level files contain information about contour levels, including
the line properties, color fill, label frequency, and hachure information. The level file
contains all the information contained on the Levels page in the advanced contour
map level Properties dialog. After defining custom contour levels and colors on a
map, you can save the level and color information in a level file. A level file can be
recalled for any other contour map or 3D wireframe. Not all of the information in a
level file can be used in a 3D wireframe. If you use a level file created in the contour
map properties dialog in a wireframe, the color fill, contour label, and hachure
information are ignored.

490
Chapter 17 – Adding Color to Maps

Creating Level Files from Contour Map Properties


The easiest way to create a level file is from the advanced contour map properties or
3D wireframe properties dialogs. You can also create a level file in the worksheet or in
an ASCII editor, using the .LVL file format.

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.

Using Level Files with a Contour Map


To use an existing .LVL file with any contour map:
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. Click Load.
5. Select the .LVL file and click Open.
6. Click OK and the contour map updates.

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.

Level Files for Wireframes


For 3D wireframes, .LVL level files contain information for the Z level line properties
and for the color zone line properties. After defining custom level and line properties
on the Z Levels page or the Color Zones page, save the level and color information

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.

Creating Level Files from Wireframe Properties


To create a .LVL level file containing level and line property information from the
wireframe properties:
1. Click once on a wireframe map to select it. The wireframe map properties will be
shown in the Property Manager.
2. Click on the Z Levels tab or the Color Zones tab.
3. Click the Edit Levels button. The Properties dialog opens.
4. Change any of the parameters, including the contour levels or line properties.
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. The wireframe map updates.

Using Level Files with a Wireframe Map


To use an existing .LVL file with any wireframe map:
1. Click once on a wireframe map to select it. The wireframe map properties will be
shown in the Property Manager.
2. Click on the Z Levels tab or the Color Zones tab.
3. Click the Edit Levels button. The Properties dialog opens.
4. Click Load.
5. Select the .LVL file and click Open.
6. Click OK to close the dialog. The wireframe map updates.
Note, all wireframe maps using the level file must have comparable Z data ranges,
otherwise lines will not appear on the map.

492
Chapter 17 – Adding Color to Maps

Creating Level Files in the Worksheet


You can create simple level files in the Surfer worksheet or an ASCII editor. The
minimum amount of information a level file contains is the elevation data telling
Surfer which contour lines to place on a contour map.

To create level files from the worksheet:


1. Enter level values into column A.
2. Add any other information you wish to include for the levels (i.e. line color)
according to the level file format.
3. After entering the level information, click File | Save As.
4. In the File name field, enter the level file name and .LVL extension enclosed in
quotes ( "colors.lvl" ).
5. Choose DAT Data (*. dat) from the Save as type field and click Save.
6. In the Data Export Options dialog, choose Space as the Delimiter and Double
Quote as the Text Qualifier. Choosing any other delimiter in the Data Export
Options dialog results in an invalid level file since the file must be space
delimited.
7. Click OK to create the level file.

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.

There are multiple ways to overlay map layers


in Surfer. If you only have two maps with one
map layer each, you can drag a map layer from
one map object to another map object in the
Object Manager. If you only have a single
map created and need to add map layers to it,
you can select the map and use the Map | Add
command to add a map layer to the existing
map. If you have many separate map layers
already created, you can select all of the maps
and use the Map | Overlay Maps command.
This moves all of the map layers to a single
map object.

It is possible to combine several maps created


from related data to create one map object This one map object contains six
with multiple map layers. You can add any map layers. There is a vector map,
combination of contour, base, post, image, a base map, a post map, a contour
map, an image map, and a shaded
shaded relief, vector, or 3D surface maps. Maps
relief map.
can contain only one 3D wireframe layer,
however.

495
Surfer

Using Map Layers


When you use map layers, the layers use a single set of X, Y, and Z axes and the
maps are positioned according to the map object coordinate system. If two or more
maps use the same limits, they will overlay on top of one another. If maps cover
adjacent areas, adding a map layer places them in the correct position relative to one
another and creates a single set of axes that span the entire range. Layered 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 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.78 39.78 39.78

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

-105.18 -105.17 -105.16 -105.15 -105.14 -105.13

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.

Map Layer Limits


If a map layer is added to a map frame and the map layer exceeds the current map
limits, a Surfer warning message will be displayed allowing you to adjust the map
limits to include all layers. Select Yes to adjust the map to include all layers. Select No
to leave the current map limits.

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

Adding Map Layers


The Map | Add command allows you to add map layers, additional X axis, Y axis, or Z
axis, and a scale bar to the existing map. Alternatively, you can right-click on an
existing map and select Add to add a map layer, axis, or scale bar.

Editing a Map Layer


To edit individual layers in a multi-layer map, select the map layer (i.e. Contours) in
the plot window or Object Manager and use the Property Manager to edit the
properties. Make the desired changes in the map layer properties, and the map layer
is redrawn with the specified changes.

Hiding a Map Layer


After adding map layers, it is possible to hide one or more of the layers. To
temporarily hide a map layer, uncheck the visibility box next to the map layer name
(i.e. Contours) in the Object Manager. The map is redrawn without the selected
overlay. To make the overlay visible again, recheck the visibility box. Note that if a
surface is made invisible, the overlays are also made invisible.

Removing a Map Layer


Select the map layer and use the Map | Break Apart Layer command to remove a
map layer from a map object. Alternatively, right-click on the map layer and select
Break Apart Layer.

Deleting a Map Layer


To delete a map layer from a map frame, select the map layer in the Object Manager
and press the DELETE key on the keyboard. Alternatively, you can select the map
layer and use the Edit | Delete command, or right-click the map layer and select
Delete.

Deleting Empty Map Frames


When the last map layer has been removed from a map, there is an option to
automatically delete the existing map frame and axes. Click Tools | Options and click
on the General page. Check the Delete empty maps option. Click OK. When the last
map layer is removed from a map frame, the map frame and axes are automatically
deleted. When this option is not checked, empty map frames and axes remain after
the last map layer is moved. By default, this option is checked so that empty map
objects are automatically deleted.

498
Chapter 18 – Positioning and Overlaying Maps

Layers and 3D Wireframes


When you layer a contour, post, or base map on a 3D wireframe, the maps are draped
over the wireframe. The wireframe is drawn in the usual fashion but the base, vector,
or contour maps are "molded" over the top of the wireframe lines. Hidden lines are not
removed from maps layered on wireframes. For example, contour lines are not hidden
when the contour map lies over a wireframe.

Layers and 3D Surfaces


When you layer maps on top of 3D surface maps, hidden lines are removed and the
maps are "molded" on the surface. Surface maps and images, vector files, and even
other surface maps can be overlaid onto a single map object. The Overlays page in
the surface properties dialog contains options for handling color in these cases.

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.

Adding a Map Layer to an Existing Map Frame


To add a map layer to an existing map frame:
1. Create a new map with the Map | New command. For example, you can choose
Map | New | Contour Map to create a contour map.
2. Select the map and use the Map | Add command to add a map layer. Select the
map layer type to add to your existing map. For example, select the contour map
and use the Map | Add | Post Layer command to add a post map layer to the
contour map.
3. The maps are combined in the correct position based on their coordinates and
limits. For example, in the Object Manager, you will see one map object with a
contour map layer and a post map layer.

499
Surfer

Overlaying Two Existing Map Layers


To overlay two existing map layers:
1. Create a map with the Map | New command. For example, you can click Map |
New | Contour Map to create a contour map.
2. Create a second map with the Map | New command. You could create a post map
with the Map | New | Post Map command.
3. Note that each map has an independent set of axes.
4. Click Edit | Select All to select both the contour and post maps.
5. Click Map | Overlay Maps. The two maps are combined onto a single map object
with a single set of axes. The empty map object is automatically deleted.

This method works well when you have multiple map layers that you want to combine.

Combining Two Existing Map Layers in the Object Manager


To combine two existing map layers:
1. If two maps already exist, you can move (or overlay) a map layer from one map
frame into the other map frame by dragging and dropping in the Object
Manager.
2. Create a map with the Map | New command. For example, you can choose Map |
New | Contour Map to create a contour map.
3. Create a second map with the Map | New command. You could create a post map
with the Map | New | Post Map command.

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

4. Note that each map has an independent set of axes.


5. Select the post map layer in the Object Manager and drag it to the contour map
object. To do this, left-click and hold the left mouse button while you drag the map
layer to a new map frame. When the cursor changes to a horizontal arrow, release
the left mouse button and the map layer is added to the contour map's map
frame. The post map will now be overlaid on the contour map.

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.

Stacking a Contour Map over a 3D Surface Map


You can produce a plot of a contour map over a 3D surface map using Map | Stack
Maps. Usually a contour map is stacked over a 3D surface of the same grid file, but
you can also stack different grid files one over another. If different grid files are used
for stacking, the X and Y coordinates for both the grid files should be similar.

To stack a contour map over a 3D surface map:


1. Create a 3D surface and a contour map with the Map | New command.
2. Select both maps with the Edit | Select All command.
3. With both maps selected, the map properties appears in the Property Manager.
4. Click the View tab.
5. Set Projection to Orthographic.
6. Set the Rotation (degrees) and Tilt (degrees) to the desired values by dragging

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

Creating Several Maps in the Same Plot Window


When you create several maps in one plot window, the default map size often results
in overlapping maps even after they are carefully placed on the page.

To create several maps in the same plot window:


1. In an empty plot window, create a map using the commands available in the Map
menu.
2. If the default scaling is not satisfactory, use the map properties Scale page to
adjust the map size.
3. Select each map and drag it to the position on the page where you want it to
appear, or enter a specific X and Y location in the Position/Size toolbar.
4. Repeat the previous steps as many times as needed.

Placing Several Completed Maps in the Same Plot Window


If you have already created and saved the maps as Surfer .SRF files, these maps are
stored in separate plot windows. These maps can be displayed in the same window via
copy and paste.

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

Aligning Several Maps on the Same Page


Surfer provides several ways to align maps on the same page.
• Use the mouse to manually drag the maps on the page. Use the arrow keys on the
keyboard to nudge the map. This method is rather imprecise, but provides
complete control over the map position.
• Use Map | Stack Maps to align maps placed one above the other on the page.
Maps are moved horizontally on the page so their coordinate systems and origins
are aligned. Both maps must be selected to activate the Stack Maps command.
• Use Arrange | Align Objects to align selected objects relative to the bounding
box surrounding the objects. The objects may be aligned both vertically and
horizontally. Map alignment done in this way is based on the map’s bounding box
and not on the coordinate system for the maps. The bounding box for a map is
indicated by the selection handles.
• Use the Rulers and Grid page in the Tools | Options command to select the
Snap to Ruler option. When the Snap to Ruler option is on, the upper left corner of
the object’s bounding box is snapped to the nearest ruler division when the object
is moved.
• Use the X and Y fields in the Position/Size toolbar to enter the same X and/or Y
locations for multiple maps as needed to create the desired alignment.

505
Surfer

506
Chapter 19
Grid Operations

Introduction to Grid Operations


The Grid menu provides many tools for modifying grid files. There are many ways to
manipulate grid files in Surfer. The Grid menu contains several utilities used to
convert, combine, mirror, limit, slice, rotate, and extract grids. In addition, volume
calculations, smoothing, blanking, cross section creation, and residual calculations can
all be performed in Surfer using these utilities.

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.

Grid Node Editor


The Grid | Grid Node Editor allows you to modify the Z values of individual grid
nodes, providing a way to "fine tune" a grid file.

508
Chapter 19 – Grid Operations

Assign Coordinate System


The Grid | Assign Coordinate System command links a grid file to a specific
coordinate system.

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.

Filtering Grid Files


Surfer contains filtering commands which operate on grid files, or on contours in a
contour map. These commands round out angular contours, eliminate noise in a map,
or change the density of a grid.

These are the smoothing methods available in Surfer:


• Grid | Filter contains predefined filtering options and also allows you to define
your own filtering schemes.
• Spline Smooth is best for eliminating angular contours or surfaces; this operation
fills in a sparse grid. For example, a 10 x 10 grid might result in very angular
contours on a contour map produced from the grid. By increasing the grid density
using the Grid | Spline Smooth command, the 10 x 10 grid can be expanded to a
50 x 50 grid. The 50 x 50 grid produces a much smoother appearing contour map
than the 10 x 10 grid.
• Contour Smoothing operates on the contour lines of a contour map rather than the
grid file.

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)

If the height of the neighborhood is represented by S and the width of the


neighborhood is represented by T, then the number of nodes in the neighborhood

 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:

where Α  is the largest integer less than or equal to A.

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.

The Digital Filtering Dialog


Click the Grid | Filter command, or click the button. In the Open Grid dialog,
select the grid file and click Open. The Digital Filtering dialog opens.

The Digital Filtering dialog provides the following options:

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.

Specify filtering options in the Digital Filtering dialog.

Input Grid File


The Input Grid File lists the current grid file used in filtering. The grid must contain at

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

Output Grid File


Digital filtering computes each node of the output grid as a function of the
corresponding node, and its neighbors, of the input grid. Choose a path and file name
for the grid in the Output Grid File section. You can type a path and file name or click

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.

Linear Convolution Filters


All linear convolution filters compute weighted averages of the neighboring input grid
nodes. The only differences between the various linear convolution filters are the size
and shape of the neighborhood, and the specific weights used. Consider the
computation of the output grid value at row r and column c using a linear convolution
filter with a neighborhood height S and width T.
S T
2 2
 if Z (r + i, c + j ) is blank
∑ ∑
0
Numerator = 
S  T  W (i, j )Z (r + i, c + j ) otherwise
i =−   j =−  
2 2

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.

General User-Defined Filter


The General User-defined (mxn) linear filter allows you to specify the height and width
of the filter neighborhood and any combination of weights. 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. Click in a cell in
the box to change the node's weight.

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.

Order Statistics Filters

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.

Moment Statistics Filters

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

Second calculate the local average, Z ,

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

Third, compute the local variance as

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

Other Nonlinear Filters

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

The effect of this filter is to emphasize outliers in the grid.


Threshold Averaging For each output grid node, (r, c), identify the set of non-blank,
(mxn) neighboring input grid node values. Compute the average of
these neighboring values, excluding the value of the
corresponding input grid node. Let A represent this average
value. Then the output grid node value is set equal to

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

where Threshold is the specified value. The effect of this filter is


to eliminate outliers in the grid.

Compass Gradient Filters


Compass gradient filters find edges in the eight different compass orientations (east,
northeast, north, northwest, west, southwest, south, and southeast). First, eight
different linear convolution filters designed to detect edges in each of the eight
directions is applied. The output grid node value is the maximum absolute value
resulting from these eight convolutions. The Prewitt (3X3), Kirsch (3X3), Robinson 3-
level (3X3), and Robinson 5-level (3X3) are four of the more common edge detection
convolution filters in the literature. For details, see Crane (1997, p.88-90).

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.

Grid Filter References


Crane, R. (1997) A Simplified Approach to Image Processing: Classical and Modern
Techniques in C, Prentice Hall PTR, Upper Saddle River, NJ, 317 pp. ISBN: 0-
13-226416-1.
Pitas, I. (2000) Digital Image Processing Algorithms and Applications, John Wiley and
Sons, New York, 419 pp. ISBN: 0-471-37739-2.
Wiggin, Ender (2001) Elementary Digital Filtering,
http://www.gamedev.net/reference/articles/article1068.asp, (09/20/2001) .

519
Surfer

Grid Spline Smooth


The Grid | Spline Smooth command uses cubic spline interpolation to compute new
grid nodes. The interpolation simulates a drafting technique where a flexible strip (a
spline) is used to draw a smooth curve between data points. Spline smoothing does
not extrapolate beyond the edge of the original grid file. The original grid limits are
used to define the grid limits for the smoothed grid. Spline smoothing does not retain
faulting information.

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

Increasing the grid density using spline smoothing


increases the roundness or smoothness of the contours
and the surface appearance.

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

The following diagram explains the concept.

The Original Grid:

After smoothing, the grid changes to a seven by thirteen grid:

To expand a grid:

1. Click the Grid | Spline Smooth command, or click the button.


2. In the Open Grid dialog, select the grid file to be smoothed and click Open.
3. In the Spline Smooth dialog, choose the Insert Nodes option in the Method
section.
4. In the Number Nodes to Insert section, enter the number of nodes to insert. Or,
use the up and down arrows to change the values. As you make the changes, the
number of rows and columns to be produced in the smoothed grid is indicated in
the Final Grid Size section.
a. The Between Rows box specifies the number of rows to insert between the
existing rows in the grid file. Rows correspond to grid nodes of constant Y.
b. The Between Cols box specifies the number of columns to insert between
the existing columns in the grid file. Columns correspond to grid nodes of
constant X.

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:

1. Click the Grid | Spline Smooth command, or click the button.


2. In the Open Grid dialog, specify the grid file to be smoothed and click Open.
3. In the Spline Smooth dialog, choose the Recalc Grid option in the Method
section.
4. In the Final Grid Size section, specify 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. Enter the desired value, or use the up and down arrows on
your keyboard to change the values for the number of rows and columns to be
produced in the smoothed grid.
5. The # Rows box specifies the number of rows for the smoothed grid file.
6. The # Cols box specifies the number of columns for the smoothed grid file.

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

The Spline Smooth Dialog


Use the Grid | Spline Smooth command, or click the button to open the Open
Grid dialog. Select a grid file and click the Open button, and the Spline Smooth
dialog appears.

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.

The Spline Smooth dialog provides the following options:

Insert Nodes
Choose the Insert Nodes option in the Method section to activate the Number Nodes to
Insert section.

Number of Nodes to Insert


Choose the Insert Nodes option in the Method section to activate the Number Nodes to
Insert section. Enter the number of nodes to insert, or use the up and down arrows to
change the values. As you make the changes, the number of rows and columns to be
produced in the smoothed grid is indicated in the Final Grid Size section.

Insert Nodes Between Rows


The Between Rows box specifies the number of rows to insert between the existing
rows in the grid file. Rows correspond to grid nodes of constant Y.

524
Chapter 19 – Grid Operations

Insert Nodes Between Columns


The Between Cols box specifies the number of columns to insert between the existing
columns in the grid file. Columns correspond to grid nodes of constant X.

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.

Final Grid Size


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. Enter the # Rows and/or # Cols, or use the up and down arrows to change
the values.

# 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.

Grid File Information

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.

Change Grid File

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.

Grid Mosaic Dialog

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

The Grid Mosaic Dialog provides the following options:

Input Grid Files


The Input Grid Files group initially contains all the grid files selected in the Open
Grid(s) dialog. You can Add or Remove grids to the Input Grid Files group. When a
grid is selected in the Input Grid Files group, the grid is highlighted in the Grid
Extents section.

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.

Header Button Size and Sorting


The header buttons can be dragged side to side to make the columns wider or
narrower. Also, the grids can be sorted by clicking on the Grid Filename, xMin, xMax,
yMin, and yMax headers. Double-clicking the header buttons reverses the direction.

Up and Down Buttons


Alternatively, the grids can be moved around the list by highlighting a grid name (click
on it) and then clicking the Up and Down buttons.

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.

Output Grid File


Choose a path and file name for the grid in the Output Grid File section. You can 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 Line Geometry


Output Grid Geometry defines the grid limits and grid density. Grid limits are the
minimum and maximum X and Y coordinates of all grid files. The default grid Spacing
is set to the minimum spacing of the input grids. The # of Nodes in the X direction is
the number of grid columns, and the # of Nodes in the Y direction is the number of
grid rows. Increasing the grid extents will not increase the grid as the resampling
methods do not extrapolate beyond the extents of the original grid.

Calculate From Input Extents


Check the Calculate From Input Extents box to return the grid to its original size based
on the input grids' minimum and maximum.

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

Combining (Mosaic) Grids


To combine (mosaic) grids:

1. Click the Grid | Mosaic command, or click the button.


2. Select the files you would like to combine in the Open Grid(s) dialog. If the grid
files are in the same folder, use the CTRL and SHIFT keys while clicking on the file
names to make multiple selections. If the files are not in the same folder, you will
have the opportunity to select more files later. Click Open
3. In the Grid Mosaic dialog, choose the desired Resample method and Overlap
method. You can also set the Output Grid Geometry.
4. Name the new grid in the Output Grid File box by typing a path and file name or

using the button to browse to a new path.


5. Click OK and the new grid is created.

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 a Grid File


The Grid | Blank command is used to remove grid node data from a grid in areas not
supported by original data or in areas where you do not want to display contours on a
map. Blanking assigns a blanking value (1.70141e+038) to specified groups of grid
nodes in a blanked grid file. Blanked grids contain the same number of grid nodes and
the same grid limits as the original grid file. The grid nodes in the blanked grid are
identical to the values in the original grid except in those locations where the blanking
values are assigned.

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.

To blank a grid file:


1. Click the File | Open command to open the DEMORECT.BLN. The blanking file
opens in the worksheet.
2. The first row displays the blanking header information. Cell A1 displays the total
number of vertices (in this example, 5). Cell B1 displays the blanking flag. The
blanking flag can be either a "0" to indicate "blank outside" or a "1" to indicate
"blank inside". A blanking flag of zero is used by default. We are not going to
make any changes in this example, and the worksheet can be closed by clicking
File | Close.
3. In the plot window, click the Grid | Blank command.
4. In the Open Grid dialog, specify the DEMOGRID.GRD file (i.e. the original grid
file), and click Open.
5. In the Open dialog, specify the DEMORECT.BLN file (i.e. the blanking file), and
click Open.
6. In the Save Grid As dialog, specify a name and location to save the blanked grid
file that is being created. In this example, we will save the file as
DEMOGRID_BLANKED.GRD. Adjust the Save as type if you need to create a
different grid file type. Click Save.
7. A Surfer dialog confirms the location and name of the blanked grid file created.
Click OK.
8. Use the Map | New | Contour Map command. In the Open Grid dialog, select
the DEMOGRID_BLANKED.GRD file (from the location where you saved it), and
click Open. The blanked contour map is created.
9. A base map of the blanking file can be added to the contour map to display the
outline of the blanked region using the Map | Add | Base Map command and
selecting the DEMORECT.BLN file.
10. If the edges of the blanked region are jagged, the original grid file can be
recreated with a higher grid density (i.e. more rows and columns). Use the more
dense grid file and follow the steps to blank a grid file again.

The following diagrams explain the concept.

531
Surfer

Before blanking:

The blanking file is displayed as a


base map layer on the contour map.

After blanking:

This is a contour map created


from the blanked grid file.

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.

Blanked regions appear as low flat regions on a


3D wireframe. This wireframe is produced from
the same grid file used to produce the
contour maps in the above example.

Blanking Areas within a Grid


There are several ways to blank areas within a grid.

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.

Starting with a grid file, nodes are blanked if:


• the Grid | Blank command is used to blank the area inside or outside a boundary
defined by a blanking file.
• the Grid | Grid Node Editor is used to blank individual grid nodes.
• the Grid | Filter is used to blank filtered grid nodes.

Blanking Outside Multiple Polygons


Blanking the area outside multiple polygons can present a problem. If the area outside
polygon A includes the area inside polygon B, and the area outside polygon B includes
the area inside polygon A, then the entire grid is blanked.

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).

The following examples will explain the concept.

534
Chapter 19 – Grid Operations

Example 1: Two Polygons

The blanking file on the left contains two separate polygons.


The entire grid is blanked because polygon A and B are
separate. The blanking file on the right contains a combined
polygon that can be used to blank outside of two areas.

535
Surfer

Example 2: Three Polygons

This example used the blanking file


listed below. One composite BLN was
created to display three polygons.

One composite .BLN file with three polygons:

17 0 Composite Polygon consisting of Polygon A, B, and C


1 1 Start of Polygon A - Original X1 Y1
1 2
2 2
2 1 End of Polygon A
1 1 Repeat of X1 Y1 and closure of Polygon A
3 3 Start of Polygon B
3 4
4 4
4 3
3 3 End Polygon B
1 1 Repeat of X1 Y1
7 5 Start of Polyon C
7 6
8 6
8 5
7 5 End of Polygon C
1 1 Repeat of X1 Y1

536
Chapter 19 – Grid Operations

The Grid Node Editor


The Grid | Grid Node Editor command opens the grid node editor as a new
document.

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 Options Menu


The grid editor Options menu contains commands that control the display of the grid
nodes and the contour map in the grid node editor window.

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.

Using the Grid Node Editor


To edit grid nodes:
1. Click Grid | Grid Node Editor in the plot window.
2. In the Open Grid dialog, select a grid file and click Open.
3. The grid file is represented by a contour map, and the location of each grid node in
the file is marked with a "+". Blanked nodes are marked with a blue "x".
4. 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.
5. The active node X and Y map coordinates and grid coordinates are displayed at the
top of the window. The Z value is given in the Z box. You can enter a new Z value
for the selected grid node by typing the value into the box. Press ENTER or click
another node with the mouse 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.
6. To blank a node, select Options | Blank Node or press CTRL+B.
7. To unblank a node, select Options | Unblank Node or press CTRL+U.
8. To return to the original value, press the ESC key while the cursor is in the Z value
box.
9. When you are done editing the grid, choose the File | Save command to save the
file to the same name, or the File | Save As command to specify a new file name.
10. To close the grid editor window, choose the File | Close command. To move to an
existing window and leave the grid editor window open, click the Window menu
and select a different window. Alternatively, click on another tab to move to an
existing window.

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


Click the Grid | Extract command to open the Open Grid dialog. Select a grid file
and click Open to open the Extract Grid dialog.

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.

The Extract Grid dialog provides the following options:

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

First and Last


The First and Last boxes show the first and last rows and columns from the input grid
file. The number of nodes and the map coordinates are displayed to the right. As you
change the First and Last values, the number of nodes and map coordinates change
accordingly.

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.

Extracting a Subset of an Existing Grid File


To extract a subset of an existing grid file:
1. Click the Grid | Extract command.
2. In the Open Grid dialog, select the grid file from which you want to extract a
subset and click Open.
3. In the Extract Grid dialog, specify the First, Last, and Read Every values in the
Rows (Y) and Cols (X) boxes.

4. Click the button to display the Save Grid As dialog.


5. In the Save as type drop-down list, select the format for the output file. Specify
the path and file name for the file to be created, and click Save .
6. In the Extract Grid dialog, click OK and the grid is created with the subset of grid
information from the original grid file.

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.

The Grid Transform Dialog


Click the Grid | Transform command, specify the grid file to transform in the Open
Grid dialog, and click Open to display the Grid Transform dialog.

542
Chapter 19 – Grid Operations

Specify grid transform options in the Grid Transform dialog.

The Grid Transform dialog provides the following options:

Input Grid File


The Input Grid File lists the grid file to be transformed. The grid must contain at least
one non-blanked node.

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.

Output Grid File

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.

The Mirror X option creates a Rotate 270 degrees


new grid file with the order of the
grid nodes reversed in the X
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 Y order remains unchanged. The Rotate option rotates the grid in
multiples of 90 degrees without changing
the XY origin.
The Mirror Y option creates a new
grid file with the order of the grid

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.

Transforming a Grid File


To transform a grid file:
1. Click the Grid | Transform command.
2. In the Open Grid dialog, select a grid file to transform and click Open.
3. In the Grid Transform dialog, choose an Operation and any associated options.

4. Click the button to display the Save Grid As dialog.


5. In the Save as type list, select the format for the output file. nter the path and File
name for the transformed grid. Click Save to return to the Grid Transform dialog.
6. Click OK to create the transformed file.

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.

The Grid Math Dialog


Click the Grid | Math command, or click the button to open the Grid Math
dialog.

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.

Enter a Function of the Form f(A,B, ...)


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 which represents the output grid file. The Variable
names are used in the equation. By default, variable names are A, B, C, D, etc. These
refer to the input grid files. To perform a calculation on grid file A only, you can leave
any reference to additional grid files out of the specified function.

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.

Output Grid File

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

button to see statistics for the output grid file.

Using the Grid | Math command

1. Click the Grid | Math command, or click the button.


2. In the Grid Math dialog, click the Add Grids button. Select any number of grid
files and click Open. All grids must contain the same number of grid rows and
columns, and the same X and Y ranges.

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

Using the Grid Math Command to Generate an Isopach Map


The Grid | Math command can be used to generate an isopach map.

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.

To create an isopach map:


1. Create grid files of the upper and lower surfaces. In the example here, the grid
files would define the elevation of the top and bottom of the coal seam. Both grids
must use the same XY ranges, and same number of rows and columns.
2. Select the Grid | Math command.
3. In the Grid Math dialog, click the Add Grids button. Select the grid file for the
upper and lower surface and click Open. The grid files are listed in the Input Grid
column.

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.

Using the Grid Math Command to Eliminate Negative Values from a


Grid File
Some gridding methods (i.e. Kriging, Radial Basis Function, Minimum Curvature, and
Modified Shepard's Method) extrapolate beyond the Z range of the data, which can
create inappropriate negative values for parameters like concentration, thickness, and
magnitude. The Grid | Math command can set negative values equal to zero with the
formula max(A,0).

To set negative values equal to zero:

549
Surfer

1. Create a grid file, preferably with a small grid spacing.


2. Click the Grid | Math command.
3. In the Grid Math dialog, click the Add Grids button. Select the grid file containing
the unwanted negative values and click Open. This grid file appears in Input Grid
column.
4. Select an output grid file name in the Output Grid File section by clicking on the

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

Surfer uses a compass-based grid notation to indicate the


location of the neighboring grid nodes for many of the calculus
operations. Node Z in the center of this diagram is the grid
node being calculated.

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

d2z Z − Z NW − ZSE + ZSW


≈ NE
dx dy 4 ∆x ∆y

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

d4z Z − 2 Z N + Z NE − 2Z W + 4Z - 2Z E + ZSW − 2ZS + ZSE


≈ NW
2
dx dy 2
4 ∆x ∆y

The Grid Calculus


Dialog
Click the Grid | Calculus
command to open the
Open Grid dialog. Select
a grid file and click Open
to open the Grid Calculus
dialog.

The Grid Calculus dialog


is divided into four
sections: Directional
Derivatives, Terrain
Modeling, Differential and
Integral Operations, and
Fourier and Spectral
Analysis. The result of the The Grid Calculus dialog provides four sections of
Grid Calculus command commands to interpret your grid file.

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.

Using Grid Calculus


To create a grid using Grid | Calculus:
1. Click the Grid | Calculus command.
2. Select a grid file in the Open Grid dialog and click Open.
3. In the Grid Calculus dialog, expand the calculus type you wish to use by clicking
on the + next to the type name.
4. Select a calculus operation (e.g. terrain slope).
5. If available, set the options for the operation.

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.

Let Z be defined as a function of X and Y in a domain that includes point P. At what


rate does Z change if we move from point P in a specified direction? In the X axis

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 .

Directional Derivative Definition


Let f(x,y) be defined for domain D. Let P be a point of D, let L be a line through P, let
Q be a point of L at a distance ∆s from P, ∆s ≠ 0 , such that the line segment PQ lies
∆f = f(x Q , y Q ) − f ( x P , y P )
in D, and let . Then
∆f df
lim =
∆s→0 ∆s ds

is the directional derivative of f(x,y) at P in the direction of L, that is from P to Q


(Schwartz, 1974).

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.

At a particular grid node


location, if the slope is uphill,
the slope is positive; and if
downhill, the slope is
negative. Slope is reported
as rise over run and can
approach negative or positive
infinity as the slope
approaches vertical in the
down or up direction.

554
Chapter 19 – Grid Operations

The directional first derivative is exactly as in the definition in the Directional


Derivatives section of this chapter. Instead of a known function Z(X,Y) for which we
can compute the necessary limits, Surfer uses a grid file so directional derivative is
approximated using difference equations.

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.

The directional second derivative is


the directional derivative of the first
directional derivative:

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.

The mathematical formula for the directional curvature of a surface f(x,y) in a


direction defined by s is:

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

A Graphical Example of Directional Derivatives


The example shown here is based on the DEMOGRID.GRD file included with Surfer,
although the limits of the grid have been extended to 10 units in both the X and Y
dimensions. The map shows the contours and the direction chosen for the Grid |
Calculus directional derivative operations. A profile line is also included on the map.
The graphs included are based on Grid | Slice command data collected along the
profile lines. Each operation was performed, and the Slice command was applied to
the resultant grid files. The results are shown in the graphs that were produced in
Golden Software, Inc.'s GrapherTM. A comparison of the map and the graphs gives a
good visual analysis of the results of the directional derivative operations.

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

3.0 Profile Line 4.00


First Derivative
2.0
0.00
1.0

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

These are cross sectional views of


Curvature, Second and First
Derivatives, and the original grid
surface.

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.

There are five terrain modeling operations: Terrain Slope,Terrain Aspect,Profile


Curvature, Plan Curvature, and Tangential Curvature.

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).

This means that across the


surface, the gradient direction can
change. Grid files of the Terrain
Slope can produce contour maps
that show isolines of constant
steepest slope.

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 

Using the compass-based grid notation difference equation yields:


2
 Z − ZW   Z − ZS 
2

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

The compass-based grid notation version of this equation is:

A contour map of the original DEM is layered with


a terrain aspect map. South facing slopes (between
SE or 135° and SW or 215° ) are indicated with
gray fills. Gray lines on north facing slopes are
contour fills drawn where the aspect varies
between 0 degrees (north) and 359
degrees (1 degree west of north).

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.

Profile Curvature measures the curvature of the surface in the direction


of gradient. Negative curvature, shown with a gray fill, indicates a convex
upward surface and accelerated water flow.

The profile curvature KP is given by:

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.

Plan Curvature calculates the curvature of the


surface in the horizontal plane, or the curvature
of the contour. Negative curvature, shown with
a gray fill, indicates areas of divergent flow.

The plan curvature KH is given by:


2
 ∂ 2 z  ∂z   2     2 
2
   − 2 ∂ z  ∂z  ∂z  +  ∂ z  ∂z 
 ∂x 2  ∂y   ∂x∂y  ∂x  ∂y   ∂y 2  ∂x 
        
KH = 3/2
p

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:

Tangential Curvature measures the curvature of the surface in the


vertical plane perpendicular to the gradient direction. Negative curvature,
displayed with gray fill, indicates divergent flow conditions.

Tangential Curvature KT is given by the equation:


2
 ∂ 2 z  ∂z   2     2 
2
   − 2 ∂ z  ∂z  ∂z  +  ∂ z  ∂z 
 ∂x 2  ∂y   ∂x∂y  ∂x  ∂y   ∂y 2  ∂x 
KT =         
1/2
pq

where
2 2
 ∂z   ∂z 
p =   +  
 ∂x   ∂y 

q = 1+ p

564
Chapter 19 – Grid Operations

Terrain Modeling References


The mathematical definitions used in this implementation were taken from Mitasova
and Hofierka (1993). For a general review of the methods and applications of
topographic analysis, see Moore et al. (1991).

Mitasova, Helena and Jarosalav Hofierka, (1993), Interpolation by Regularized Spline


with Tension: II. Application to Terrain Modeling and Surface Geometry
Analysis, Mathematical Geology, v. 25, no. 6, p. 657-669.
Moore, I. D., A. Lewis, and J. C. Gallant, (1993), Terrain properties: Estimation
Methods and Scale Effects, Modeling Change in Environmental Systems, A.J.
Jakeman et al. editors, John Wiley and Sons, New York.

Differential and Integral Operators


The Grid | Calculus Differential and Integral Operators include the Gradient Operator,
the Laplacian Operator, the Biharmonic Operator, and Integrated Volume.

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.

The definition of the gradient yields the following equation:


2 2
  ∂z   ∂z 
g =   +  
 ∂x   ∂y 

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

0, or areas of recharge) or out of (Laplacian < 0, areas of discharge) a local control


volume in such physical situations. The Laplacian operator is defined in multivariable
calculus by

∂ 2Z ∂ 2Z
∇2Z = +
∂ x 2 ∂ y2

The Surfer implementation of the Laplacian Operator generates a grid using a


standard five-point central difference formula.

 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

This is comparable to applying the Laplacian Operator twice.

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.

Mathematically, the integrated volume is defined by


x y

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:

V(x,y) is then the volume between the


plane Z=0 and the surface under the Y max
shaded area. Thus, V(xMin,yMin) = 0, and
V(xMax,yMax) equals the volume under the
entire rectangular region, which is
(x,y)
comparable to the value returned by the
Grid | Volume command in Surfer. If the
grid node at (xMin,yMin) is blanked, then
the Integrated Volume cannot be
calculated.

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

Z(x i , y i ) + Z(x i-1 , y i ) + Z(x i , y i-1 ) + Z(x i-1 , y i-1 )


V(x i , y i ) = +
4

V(x i-1 , y i ) + V(x i , y i-1 ) - V(x i-1 , y i-1 )

568
Chapter 19 – Grid Operations

Fourier and Spectral Analysis


The correlogram and periodogram are used in a variety of fields, including hydrology,
agriculture, forestry, meteorology, ecology, and sociology.

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.

A contour map of a DEM is shown on the left and the grid


correlogram is shown on the right. The heavy
line illustrates the approximate directions
of anistropy on both maps.

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

where the summation is over u and v such that

569
Surfer

0 ≤ u ≤ NX − 1 0 ≤ u + r ≤ NX − 1
0 ≤ v ≤ NX − 1 0 ≤ v + s ≤ NX − 1

and z is the arithmetic average of the grid values:


1
z= ∑ ∑ z(u, v)
NX ⋅ NY u v

Note that the grid auto-covariance function is itself a grid.

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 grid correlogram, corr(r,s), is a scaled version of the grid auto-covariance


function:
C(r, s)
corr(r, s) =
C(0,0)

C(0,0) is the variance of the data in the 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).

In the current implementation of the grid periodogram there is no smoothing, no


tapering, and no filtering. Such post-processing can be accomplished using the Grid |
Math capabilities.

A contour map of the function Z = sin ((x/5)-(y/7)) +


cos((y/2)-(x/3)) is on the left, and the periodogram
contour map is on the right. Due to symmetry, the
four apparent peaks represent two peaks, one for
each of the two fundamental sinusoids.

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.

A two-dimensional frequency is a Fourier frequency if λ is an integer multiple of


2π NX , and µ is an integer multiple of 2π NY . In Surfer, we consider the specific
frequencies:
2π j
λ= j = −  NX
2 
, ,− 1,0,1, , NX
2 
NX

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.

Grid Operations References


Akai, Terrence J., (1994), Applied Numerical Methods for Engineers, John Wiley and
Sons, Inc., New York, 410 pp.
Bras, R. L., and I. Rodriguez-Iturbe, (1985), Random Functions and Hydrology,
Addison-Wesley, Reading, Massachusetts, 559 pp.
Mitasova, Helena and Jaroslav Hofierka, (1993), Interpolation by Regularized Spline
with Tension: II. Application to Terrain Modeling and Surface Geometry
Analysis, Mathematical Geology, v. 25, no. 6, p. 657-669.
Moore, I. D., R. B. Grayson, and A. R. Ladson, (1991), Digital Terrain Modeling: A
Review of Hydrological, Geomorphological and Biological Applications, Hydro.
Proc., v. 5, no. 1, p. 3-30.
Moore, I. D., A. Lewis, and J. C. Gallant, (1993), Terrain properties: Estimation
Methods and Scale Effects, Modeling Change in Environmental Systems, A.J.
Jakeman et al. editors, John Wiley and Sons, New York.
Press, William H., Saul A. Teukolsky, William T. Vetterling, and Brian P. Flannery,
(1992), Numerical Recipes in C: The Art of Scientific Computing, Second
Edition, Cambridge University Press, New York, 994 pp.
Ripley, B. D., (1981), Spatial Statistics, John Wiley and Sons, New York, 252 pp.
Schwartz, Abraham, (1974), Calculus and Analytic Geometry, 3rd edition, Holt,
Rinehart, and Winston, New York, 1140 pp.
Tuma, Jan J., (1979), Engineering Mathematics Handbook, 2nd edition, McGraw-Hill
Book Company, New York, 394 pp.

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.

Volumes and Areas


The Grid | Volume command is used to compute net volumes, cut and fill volumes,
planar areas, and surface areas. The computation results are displayed in the grid
volume report. The results can be saved as an ASCII text file, in Rich Text Format, or
they can be copied to the clipboard.

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

Calculating Volumes and Areas


Use the Grid | Volume command to calculate net volumes, cut and fill volumes,
planar areas, and surface areas.
1. Click the Grid | Volume command.
2. In the Open Grid dialog, specify the name of the grid file to use in the volume
and area calculations. This can be the grid file for either the upper or the lower
surface.
3. Click OK and the Grid Volume dialog is displayed. The specified grid file is shown
for both the upper and lower surface.
4. Specify the Upper Surface and Lower Surface parameters.

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

option and click the button to select another grid file.


c. 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.
5. If the X, Y, and Z units are different, the resulting volume calculations are
meaningless. If, for example, your XY 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. You will need to know the conversion factor to use this field.
6. Click OK in the Grid Volume dialog and the results are displayed in a report.
7. Click File | Save As to save the report, or you can copy the information to the
clipboard and paste it into another application.

Use the Grid | Volume command to calculate net volumes, cut and fill volumes,
planar areas, and surface areas.

577
Surfer

Grid Volume Dialog


Click the Grid | Volume
command to open the Open
Grid dialog. Select a grid
file and click Open to open
the Grid Volume dialog.

Upper Surface and Lower


Surface Grid Information

The button displays


information about the grid
file used in the volume
calculations. 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 message box that appears to create a
detailed grid report or click Cancel to create a shorter, less detailed grid report.

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.

Grid Volume Report


When Grid | Volume computations are performed, the results are displayed in the
grid volume report.

The volume computations in the Grid Volume Report dialog include the following:

Upper Surface and Lower Surface


These sections display the parameters that define the upper and lower surfaces.

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.

Mathematically, the volume under a function is defined by a double integral:

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.

Net Volume = (feet * feet * feet)

Example 2
A grid with X, Y, and Z units in meters, the units for the results are (meter)3.

Net Volume = (meter * meter * meter)

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.

Cut and Fill Volumes


The Cut & Fill Volumes section of the Grid Volume Report displays the Positive
Volume (Cut) and the Negative Volume (Fill). The cut portion is the volume between
the upper and lower surface when the upper surface is above the lower surface. The
fill portion is the volume between the upper and lower surfaces when the upper
surface is below the lower surface.

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.

Cross-section showing the relation between the upper and


lower surfaces, and the cut and fill volumes.
The lower surface is defined by Z=75.

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.

Extended Trapezoidal Rule


The pattern of the coefficients is {1,2,2,2,...,2,2,1}:

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

Extended Simpson's Rule


The pattern of the coefficients is {1,4,2,4,2,4,2,...,4,2,1}:

where:

is the grid column spacing, is the grid row spacing, is the grid node
value in row i and column j.

Extended Simpson's 3/8 Rule


The pattern of the coefficients is {1,3,3,2,3,3,2,...,3,3,2,1}:

where:

is the grid column spacing, is the grid row spacing, is the grid node
value in row i and column j.

Planar Area Calculations


Planar area is computed by projecting the cut and fill portions of the surface onto a
plane and calculating the area of the projection.

Positive Planar Area


Positive Planar Area represents the projection of the cut (map areas where the upper
surface is above the lower surface) onto a horizontal plane.

Negative Planar Area


Negative Planar Area represents the projection of the fill (map areas where the upper
surface is below the lower surface) onto a horizontal plane.

583
Surfer

This is a contour map showing the relation


between positive and negative planar area
on a map. The lower surface is defined
by a plane where Z = 75.

Surface Area Calculations


The surface area is the actual area of the surface. Positive Surface Area corresponds to
the area of the surface where the upper surface is above the lower surface. Negative
Surface Area corresponds to the area of the surface where the upper surface is below
the lower surface.

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.

Calculating the Volume of a Lake


To illustrate the capability of using the Grid | Volume command, consider the
application of calculating the volume of water within a lake. This application requires
that a grid file be created which defines the lake bottom. The other surface is defined
as a horizontal planar surface that defines the water surface of the lake.
To calculate the volume of a lake:
1. Create the grid file for the lake. If the lake bottom is defined as the depth of the
water, use negative Z values so that the lake appears as a basin rather than a hill.
It is also recommended that data points be added beyond the limits of the lake
shore so that the surface is above the level of the lake in those areas.
2. Select the Grid | Volume command.
3. Specify the grid file for the lake in the Open Grid dialog and click Open.
4. In the Grid Volume dialog, click the Grid File option in the Lower Surface group.
5. In the Upper Surface group, click the Constant option. Enter the value for the lake
surface into the Z = box. For example, if you are using depth in your grid file as a
negative value, the Z = value for your horizontal (lake) surface should be zero.
6. Click OK and the volume and area calculations are reported. The volume of the
lake is reported as the Positive Volume.

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.

Calculating the Volume of a Blanked Grid


Surfer can be used to calculate the volume between two grid surfaces or between a
grid surface and a horizontal plane. The accuracy of the volume calculation increases
as the number of grid lines in the grid file increases. When one of the grid surfaces
contains blanked cells, or the area of interest is a subset of the entire grid, additional
error is introduced. This error can be minimized by specifying more grid lines during
the gridding operation.

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.

Calculating the Volume between Two Surfaces


A common problem solved with a volume calculation is determining the volume of
material between two grid files. For example, you might have drill hole data that
provides the elevation of the top and bottom of a coal seam, and you want to
determine the volume of coal present in the seam. The elevation of the top and
bottom of the coal seam defines the upper and lower surfaces, respectively. In this
case, the lower surface would be entirely below the upper surface.

586
Chapter 20 – Volumes, Areas, Cross Sections, and Residuals

To find the volume between two surfaces:


1. Create grid files of the upper and lower surfaces. In the example here, the grid
files would define the elevation of the top and bottom of the coal seam. Both grids
must use the same dimensions and the same number of rows and columns.
2. Choose the Grid | Volume command and select the upper surface grid file in the
Open Grid dialog and then click the Open button.
3. In the Grid Volume dialog, the Grid File option button should be selected in the
Upper Surface group.

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.

The surface is based on a grid file and the


boundary line is based on the information in a .BLN
blanking file. Blanking files can be created in an
ASCII editor or they can be created with the Map |
Digitize command.
At each point where the boundary
line crosses a grid line, a cross
section data point is generated.

587
Surfer

The Grid Slice Dialog


Click the Grid | Slice command, or click the button. In the Open Grid dialog,
select a grid file and click Open. In the Open dialog, select a .BLN file and click Open.
The Grid Slice dialog opens.

The Grid Slice dialog allows you to specify the resulting


.BLN and/or .DAT file name and location.

The grid slice dialog provides the following options:

Output BLN File


A blanking file may be produced with the slicing operation. If desired, enter a name for

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

Output DAT File


Cross section data are written to an ASCII data file .DAT during the Slice operation.

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.

Set Values Outside Grid To


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:

Set Values in Blanked Grids To


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.

589
Surfer

The OK Button
Click OK and a data file (and a blanking file, if specified) is created.

To Create a Data File Containing Cross Section Data


1. Click the Grid | Slice command, or click the button.
2. In the Open Grid dialog, select a grid file and click Open.
3. In the Open dialog, select the blanking file to use when producing the profile data
and then click Open.
4. If desired, enter a name for the Output BLN File in the Grid Slice dialog by

clicking the button to open the Save As dialog.

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

You can display the profile line


across the contour map. This is the profile
line used to produce the following
cross section.

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.

The formula used to compute a residual value is:


Zres = Zdat - Zgrd
where:
Zres = the residual value
Zdat = the Z value in the data file
Zgrd = the Z value of the surface at the XY coordinate from the grid file

A worksheet window is automatically


opened when the Residuals
command is used. The worksheet
includes the data file used for the
calculation and the newly generated
residual information. Use the
worksheet's Data | Statistics
command to obtain statistical
information on the calculated
residuals.

After clicking OK in the Grid Residuals dialog,


the worksheet window opens with the original data
and the new residuals column.

592
Chapter 20 – Volumes, Areas, Cross Sections, and Residuals

The Grid Residuals Dialog


Click the Grid | Residuals command to open the Open Grid dialog. Select a grid file
and click Open. In the Open dialog, select a data file and click Open. The Grid
Residuals dialog is displayed.

Specify the locations for the X, Y, and Z data and


the location for the calculated residuals
in the Grid Residuals dialog.

Data Columns
Specify the location for the X, Y, and Z coordinates from the data file in the Data
Columns section.

Store Residuals in Column


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.

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.

Calculating the Z Value of the Surface at a Point


The Grid | Residuals command allows you to obtain the Z value of a grid at any
point. To perform the operation, an XYZ data file must be created that contains the XY
coordinates for point you want to calculate. When creating the file, specify a value of
"0" for the Z coordinate.

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.

Importing Plot Documents


You can import graphic files in Surfer with the File | Import command. The File |
Import command is similar to the Map | New | Base Map command except that the
file is imported as a composite graphic object rather than as a map.

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.

The Import Dialog


The File | Import command in the plot opens the Import dialog.

The Import dialog has the following options:

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.

Creating New Folders and Changing the View


The buttons to the right of the Look in field allow you to create new folders and
change the view of the file list.

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.

Specify files to import using the Import dialog.

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.

Import Format Types


The File | Import command in the plot document opens the Import dialog. In the
Import dialog, select one of the following formats to import data into the worksheet.

• AN? ACR-NEMA Medical Image • GSB Golden Software Boundary


(*.an1, *.an2) (*.gsb)
• BLN Golden Software Blanking • JPG Compressed BItmap (*.jpg,
(*.bln) *.jpeg)
• BMP Windows Bitmap (*.bmp) • MIF MapInfo Interchange Format
• BNA Atlas Boundary (*.bna) (*.mif)

• DICOm3 Medical Image (*.dic, • PCX (ZSoft Paintbrush) (*.pcx)


*.dcm) • PLT Golden Software PlotCall
• DDF SDTS TVP (*.ddf) (*.plt)

• DLG USGS Digital Line Graph • PLY Stanford PLY (*.ply)


(*.dlg, *.lgo, *.lgs) • PNG Portable Network Graphics
• DXF AutoCAD Drawing (*.dxf) (*.png)

• E00 ESRI ArcInfo Export Format • PNM/PPM/PGM/PBM Image (*.pnm,


(*.e00) *.ppm, *.pgn, *.pbm)

• ECW ERMapper (*.ecw) • RGB SGI-RGB Image (*.rgb,


*.rgba, *.bw)
• EMF Windows Enhanced Metafile
(*.emf) • SHP ESRI Shapefile (*.shp)

• GIF Image (*.gif) • SID LizardTech MrSID Image


(*.sid)

599
Surfer

• SUN Sun Raster Image (*.ras, • VTK Visualization Toolkit (*.vtk)


*.sun) • WMF Windows Metafile (*.wmf)
• TGA Targa (TrueVision) (*.tga) • X AVS X-Image (*.x, *.ximg)
• TIF Tagged Image (*.tif, *.tiff)

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.

Importing Worksheet Documents


Clicking the File | Import command, or the button, in the worksheet loads the
contents of a data file into the existing worksheet. Select a file to import into the
existing file in the Merge dialog. The contents of the new file are merged into the
worksheet at the active cell so be sure to position the cell at the edge of the existing
data. Any cells in the existing worksheet that lie to the right of and below the active
cell are overwritten with the contents of the merging file.

The Merge Dialog


The File | Import command in the worksheet opens the Merge dialog.

The Merge dialog provides the following options:

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.

Creating New Folders and Changing the View


The buttons to the right of the Look in field allow you to create new folders and
change the view of the file list.

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.

Specify a 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.

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:

• BLN Golden Software Blanking • SLK Sylk Spreadsheet .SLK


.BLN • TXT Text Data .TXT
• BNA Atlas Boundary .BNA • WKS Lotus Worksheet .WK?
• CSV Comma Separated Variables • WRK Lotus Symphony Worksheet
.CSV .WRK, .WR1
• DAT Data .DAT • XLS Excel Spreadsheet .XLS
• DBF Database .DBF • XLSX Excel 2007 Spreadsheet
• MDB Microsoft Access .MDB .XLSX

Load Database
Click the Load Database button in the Merge dialog to open the Data Link
Properties dialog and import a database.

Show Options If They Are Available


If Show options if they are available is checked, then opening .TXT files or ASCII text
files with unsupported file extensions will bring up the Data Import Options dialog
where you can specify the import options.

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.

The Data Link Properties Dialog


The Data Link Properties dialog
appears when you use the File |
Import Database command.
Data linking is used to define links
to many types of databases. The
Data Link Properties dialog can
also be accessed by clicking the
Database or Load Database button
in the Open Data or Merge
dialogs.

The Help Button


Click the Help button in the Data
Link Properties dialog to access
Microsoft's help file for this dialog.
If you need additional information
on specific connection information,
contact your network
administrator.

Use the Data Link Properties dialog to


define links to a database.

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.

The Export Dialog


Click the File | Export command to open the Export dialog.

Specify the save location, file name, and file type in the Export dialog.

604
Chapter 21 – Importing and Exporting Maps and Graphics

The Export dialog provides the following options:

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.

Selected Objects Only


Check the Selected objects only box to export selected objects rather than the entire
plot.

Show Options Dialog


Check the Show options dialog option to display the Export Options dialog for the
selected Save as type. If the Show options dialog option is selected when the Save
button is clicked, the Export Options dialog appears. The Scaling page and Size
and Color page of the Export Options dialog is uniform. Additional pages in the
Export Options dialog may be available dependent on the export format type.

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

Export Format Types


The file specific page in the Export Options dialog is specific to the export type you
selected.

Surfer supports the following export format types:

• BLN Golden Software Blanking • KMZ Google Earth KMZ (*.kmz)


(*.bln) • MIF MapInfo Interchange Format
• BMP Windows Bitmap Image (*.mif)
(*.bmp) • PCX (ZSoft Paintbrush) (*.pcx)
• BNA Atlas Boundary (*.bna) • PDF (Vector) (*.pdf)
• CGM Computer Graphics Metafile • PDF (Raster) (*.pdf)
(*.cgm)
• PNG Portable Network Graphics
• DXF AutoCAD Drawing (*.dxf) (*.png)
• EMF Windows Enhanced Metafile • PNM Image (*.pnm)
(*.emf)
• RGB SGI-RGB Image (*.rgb,
• EPS Encapsulated Postscript *.rgba, *.bw)
(*.eps)
• SHP ESRI Shapefile (*.shp)
• GIF Image (*.gif)
• SUN Sun Raster Image (*.ras,
• GSB Golden Software Boundary *.sun)
(*.gsb)
• TGA Targa (TrueVision) (*.tga)
• GSI Golden Software Interchange
(*.gsi) • TIF Tagged Image (*.tif, *.tiff)
• JPG Compressed Bitmap Image • WMF Windows Metafile (*.wmf)
(*.jpg, *.jpeg) • X AVS X-Image (*.x, *.ximg)
• KML Google Earth KML (*.kml)

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.

To export 3D contour lines:


1. Create a contour map by clicking the Map | New | Contour Map command.
Select the .GRD file and click Open.
2. Select the contour map by clicking on Contours in the Object Manager. It does
not matter if the contour map is overlaid with other maps as long as only the
contour map is selected.
3. Click Map | Export Contours to display the Save As dialog. Enter the File name,
specify the Save as type, and click Save. The file is exported with the specified
extension.

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:

1. Click the Draw | Text command, or click the button.


2. The cursor changes to a cross hair. Left-click in the plot window where you want
text to appear.
3. Enter text into the Text Properties dialog.
4. Set the text properties in the Text Properties dialog.
5. Click OK to return to the plot window.
6. Press the ESC key or click another toolbar button to end draw mode.

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

Multiline Text Dialog


The Multiline Text dialog allows
multiple lines of text to be
created.

To access the dialog, click the

button in the Property


Manager next to the text. The
dialog opens. To add a new line
of text, press the ENTER key on
the keyboard. When finished Type the text into the Multiline Text dialog. To add a
new line, press the ENTER key on the keyboard. When
creating the text block, click OK.
finished, click OK.

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:

1. Click the Draw | Polygon command or the button to begin drawing a


polygon.
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 polygon 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 the final point. Then press the ENTER key.

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 |

Polyline command, or click the button to draw a polyline.

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:

1. Click the Draw | Symbol command or click the button.


2. The cursor changes to a cross hair cursor to indicate drawing mode.
3. Click on a location in the plot window to create a symbol.
4. Press the ESC key or click another tool button to end drawing mode.

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:

1. Click the Draw | Rectangle command or the button.


2. The cursor changes into a cross hair to indicate drawing mode.
3. Press and hold the left mouse button at one corner of the rectangle.
4. Drag the mouse to the opposite corner of the rectangle. The size of the rectangle
appears in the status bar as it is drawn. You can draw a rectangle out from the
center rather than corner to corner by holding down the SHIFT key.
5. Release the left mouse button when the rectangle is the preferred size and shape.
6. Press the ESC key or click another tool button to end draw mode.

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 Rounded Rectangle


To draw a rounded rectangle:

1. Click the Draw | Rounded Rectangle command or the button.


2. The cursor changes to a cross hair to indicate drawing mode.
3. Press and hold the left mouse button at one corner of the rounded rectangle.
4. Drag the mouse to the opposite corner of the rounded rectangle. The size of the
rounded rectangle appears in the status bar as it is drawn. You can draw a
rounded rectangle out from the center rather than corner to corner by holding
down the SHIFT key.
5. Release the left mouse button when the rounded rectangle is the preferred size
and shape.
6. Press the ESC key or click another tool button to end draw mode.

Drawing Rounded Square


To draw a rounded square:
1. Hold down the CTRL key while dragging the mouse to draw a rounded square
rather than a rounded rectangle.
2. Hold down the SHIFT and CTRL keys while dragging the mouse to draw the
rounded square from a center point rather than from end to end.

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:

1. Click the Draw | Ellipse command or the button.


2. The cursor changes to a cross hair to indicate drawing mode.
3. Press and hold the left mouse button at one corner of the bounding box of the
ellipse.
4. Drag the mouse to the opposite corner of the ellipse. The size of the ellipse’s
bounding box appears in the status bar as it is drawn. You can draw an ellipse out
from the center rather than corner to corner by holding down the SHIFT key.
5. Release the left mouse button when the ellipse is the preferred size and shape.
6. Press the ESC key to end draw mode.

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.

Drawing Spline Polylines


To draw a Spline Polyline:

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.

Entering the Reshape Mode


Use the Draw | Reshape command to enter the reshape mode. Alternatively, you can

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.

Exiting the Reshape Mode


To exit reshape mode, press the ESC or ENTER key on the keyboard. Alternatively,
select another command or toolbar button.

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).

Editing a Polyline or Polygon


To edit a polyline or polygon:
1. Select the object.
2. Click the Edit | Reshape command.
3. The arrow pointer turns into an arrowhead pointer and all the vertices appear as
small hollow squares.
4. To move a vertex, left-click on the vertex with the mouse and drag it to a new
location. To add a vertex, hold down the CTRL key and click the area on the
polygon or polyline. To delete a vertex, select it and then press the DELETE key.
5. After reshaping the object, press the ENTER or ESC key to exit edit mode.

Editing a Spline Polyline


To edit a Spline Polyline:
1. Select the spline polyline in the Object Manager or the plot window by clicking on
it.
2. Click the Draw | Reshape command or the

button to enter editing mode.


3. Anchor points appear as white boxes on the
spline polyline. Click on an anchor point to
select it.
4. For anchor points that are the first or last
point on the spline polyline, two control
points will be active. The control point that

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.

Procedures for Selecting Objects


Several procedures are available to select objects in a plot window:
• Objects may be selected using the Object Manager. To display the Object
Manager, use the View | Managers | Object Manager command, or click the

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.

To select an object with block select:


1. Click the Edit | Block Select command.
2. Left-click outside one corner of the object.
3. Hold the left mouse button down.
4. Drag the mouse to the opposite corner of the object and release the mouse
button.

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.

Text and Font Properties


Use the Draw | Text command to create
new text. Set default text properties
through Tools | Options. On the Default
Attributes page, click the Font button to
specify default 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.

The Text Properties dialog is used to


create text. Most text is edited in the
Property Manager in the Font Properties
section. Some options may not be available
for all text, depending on the type of object Edit text in the Property Manager.
selected. For example, when editing an
axis, the Text and Alignment options are
not available.

Text Properties Dialog


Text is created in the Text Properties
dialog. When editing text for most object
types, the text will appear in the Property
Manager.

The Text Properties dialog provides the


following options:

Create text in the Text Properties dialog.

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.

Foreground and Background Color


Change the Foreground Color and Background Color of the text by selecting a new
color from the color palette. The Foreground Color controls the color of the text. The
Background Color controls the area behind the text. Create new colors by clicking the
Custom button at the bottom of the color palette.

Foreground and Background Opacity


Change the Foreground and Background Opacity of the text by entering a value from
0% (completely transparent) to 100% (completely opaque), using the arrow buttons
to the right of the box (in the dialog only), or dragging the slider to change
the opacity percentage.

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.

• Bold will increase the thickness of the text (i.e. example).


• Italic will create oblique text (i.e. example).
• Strikeout will add a horizontal line through the center of the text (i.e. example).
• Underline will add a horizontal line under the text (i.e. example).

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

Additional Customization with Math Text Instructions


To include different font styles or symbols to your text string, use math text
instruction. For example, math text instruction can be used to add subscript and
superscript to text.

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.

Most fill properties are edited in the


Property Manager in a Fill Properties
section. When changing fill properties
for a selected object, the Fill Properties
section will appear in a different
location in the Property Manager,
depending on the type of object
selected.

Occasionally, objects will open a Fill


Properties dialog to access the fill
properties.

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.

Edit the Fill Properties for a selected object


Load a Fill Pattern File in the Property Manager.
To load a fill pattern from a raster
image file, click the File or Clipboard
button. The Clipboard button is only active when there is an image on the clipboard
suitable to use for a fill pattern. If you select File, an Import dialog will appear. Click
on the image file and click Open to load the image as the fill pattern.

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.

Select a fill pattern from the


fill pattern palette.

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.

Most line properties are edited in the


Property Manager in a Line Properties
section. When changing line properties
for a selected object, the Line
Properties section will appear in a
different location in the Property
Manager, depending on the type of Specify individual line properties in the Property
Manager in a Line Properties section.
object selected.

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.
Specify individual line properties in the
Line Properties dialog.
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.

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.

The Symbol Properties


Most symbol properties are edited
in the Property Manager in a
Symbol Properties or Marker
Properties section. When changing
symbol properties for a selected
object, the Symbol Properties or
Marker Properties section will
appear in a different location in the
Property Manager, depending on
the type of object selected.

Occasionally, objects will open a Specify symbol properties in the


Symbol Properties dialog to Property Manager window.
access the symbol properties.

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.

This number is useful when


automating the application with Specify symbol properties in the
Scripter or when using a Symbol Symbol Properties dialog.
column with a post map. Add 32 if
you are using font sets or TrueType symbols, such as GSI Default Symbols.

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

dragging the slider to change the opacity percentage.

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.

Contour maps with Advanced label options


display in the Label Format dialog.

The Label Format section for a post map


allows customizing the format for post
map labels.

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.

Trim Exponent Zeros


Check the Trim exponent zeros box to remove leading zeros in exponential numbers.
For example, 1.9E+003 becomes 1.9E+3 if the Trim exponent zeros box is checked.

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.

Reload Map Data


You can reload external map data for all maps in the currently loaded Surfer file with
the File | Reload Map Data command.

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.

Updating a Single Map Layer


Map data can also be reloaded for individual map layers directly from the properties

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.

Tilt and Rotation


In trackball mode, left-click in map's bounding box. While holding down the left mouse
button, drag the mouse up and down to change tilt, and drag the mouse left or right
to change rotation. The rotation and tilt values are shown in the status bar when the
left mouse button is held down.

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.

Exit Trackball Mode


Press the ESC key on your keyboard to exit trackball mode. Alternatively, select the
Map | Trackball command again or select another menu command.

Modifying the Map Orientation


To modify the map orientation with Map | Trackball
1. Select one map.

2. Click the Map | Trackball command or click the button.


3. Left-click in map's bounding box. While holding down the left mouse button, drag
the mouse up and down to change tilt, and drag the mouse left or right to change
rotation. The rotation and tilt values are shown in status bar.
4. Right-click in the map's bounding box. While holding down the right mouse button,
drag the mouse up to increase the field of view and changes the Projection to
Perspective. Drag the mouse down while right-clicking to decrease the field of
view, and change the Projection to Orthographic if the field of view is decreased to
1°. The field of view value is shown in status bar.

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 | Move Forward, or click the button.

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 | Move Backward, 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 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

Grouping and Ungrouping Objects


The Arrange | Group command is used to group several independent objects into
one composite object. Alternatively, select multiple objects, right-click and select

Group, or click the button. Composite objects can be a combination of several


types of objects and they can be moved or resized as a single object.

Editing Composite Objects


After objects are grouped together, the composite is displayed in the Object Manager
as a composite object and sub-objects. Sub-objects can be edited, re-arranged, or
deleted in the Object Manager. Click on any of the composite objects in the Object
Manager to display and change the properties for that object in the Property
Manager. A sub-object may also be deleted.

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.

A composite object can be transformed with the Arrange | Transform command.

Ungrouping
The Arrange | Ungroup command is used to separate objects that have been
previously combined into a composite object using the Arrange | Group command.

A composite object can also be ungrouped in the Object Manager by right-clicking on

the composite object and selecting Ungroup, or clicking the button.

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.

Exit Rotate Mode


Press the ESC on your keyboard to exit rotate mode.

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.

The Transform Dialog


The Arrange | Transform command
opens the Transform dialog. This
dialog allows you to read, set, and
reset the six page transformation
parameters associated with the
selected object. These six parameters
allow for four distinct transformations:
scale, shear, rotation, and offset. The
coordinate origin for these
transformations is the center of the
page. Thus, in the untransformed
state, the center of an object coincides
with the center of the printed page.

Use the Transform dialog to change the


X Offset transform parameters for the selected object.
The X Offset specifies the horizontal
translation (in page units). A positive X Offset shifts the object to the right, a negative
X Offset shifts the object to the left.

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.

Identity (Clear Transform)


When you check the Identity (Clear Transform) box, the transformation is reset back
to the identity; that is, the selected object is untransformed.

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

Pan Scrolls the window by "grabbing" the contents and dragging


them
Redraw Refreshes the image on screen
Auto Redraw Turns the automatic display of redraw on or off
Toolbars Shows, hides, or customizes toolbars
Managers Shows or hides object manager and property manager
Status Bar Shows or hides the status bar
Rulers Shows or hide the rulers
Drawing Grid Shows or hide the drawing grid
Reset Resets window display to the default layout
Windows
Track Cursor Shows the same XY cursor location between multiple map
frames

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.

Enter Zoom In Mode


To enter zoom in mode, select the View | Zoom | In command in the plot window.

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

Exit Zoom In Mode


Click on another tool button or press the ESC key to end zoom in mode.

Zoom with A Wheel Mouse


You can use a wheel mouse to zoom realtime and pan in the plot window or grid node
editor. Rotate the wheel forward to zoom in, or rotate the wheel backward to zoom
out. 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.

Zoom with the Keyboard


You can use keyboard commands to zoom in and out of the plot window. The default
commands are CTRL + = to zoom in, and CTRL + - to zoom out.

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.

Enter Zoom Out Mode


To enter zoom out mode, select the View | Zoom | Out command in the plot window.

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.

Exit Zoom Out Mode


Click on another tool button or press the ESC key to end zoom out mode.

Zoom Rectangle
The Zoom Rectangle command allows magnification by drawing a rectangle around
the area of interest in the plot window.

Enter Zoom Rectangle Mode

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.

Exit Zoom Mode


Click another tool button or press the ESC key to end zoom mode.

Zoom with the Keyboard


You can use keyboard commands to zoom to a rectangle in plot window. The default
keyboard command for the Zoom Rectangle command is CTRL + R.

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 |

Selected command. Alternatively, click the button to magnify the selected


object.

Zoom with the Keyboard


You can use keyboard commands to zoom to the selected object in plot window. The
default keyboard command for the Zoom Selected command is CTRL + L.

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.

Enter Zoom Realtime Mode

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

Exit Zoom Mode


Click another tool or press the ESC key to end zoom mode.

Zoom Realtime with a Wheel Mouse


You can use a wheel mouse to zoom realtime and pan in the plot window or grid node
editor. Rotate the wheel forward to zoom in, or rotate the wheel backward to zoom
out. 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.

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.

Exit Full Screen Mode


Press the ESC key to return to the Surfer window. Alternatively, left-click anywhere
on the 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.

Enter Pan Mode

Use the View | Pan command, or click the button to pan the current view in the
plot window or grid node editor.

To pan the current view:

1. Click View | Pan, or the button.

650
Chapter 22 – Creating, Selecting, and Editing Objects

2. Click on a portion of the current view.


3. Hold the left mouse button down while dragging the view to a new position.

Exit Pan Mode


Click on another toolbar button or press the ESC key to end pan mode.

Pan With A Wheel Mouse


You can use a wheel mouse to zoom realtime and pan in the plot window or grid node
editor. Rotate the wheel forward to zoom in, or rotate the wheel backward to zoom
out.

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.

Redraw and Auto Redraw

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.

Rulers and Drawing Grid

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.

Show or Hide Toolbars


Use the View | Toolbars command to show or hide the Standard, View, Drawing,
Grid, Position/Size, and Map toolbars. A check mark is displayed next to visible
toolbars.

Tool Tip Display of Button Function


Hold the cursor over any tool button on the toolbar to display the function of the
button. Tool tips cannot be customized. Hold the cursor over the toolbar images to see
tool tip examples.

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.

Status Bar Sections


The status bar is divided into five sections. Click on each section in the graphic to
display more information about each pane. In the worksheet, the status bar displays
tool tips.

The status bar has five sections of information. Click on


each section to display detailed information.

Adjust Section Width


The status bar section widths can be adjusted to display additional text. If "..." is
displayed at the end of the text, additional text can be displayed. To change the width,
place the cursor over a section division. When the cursor changes to a , left-click
and drag the divider left or right to a new location.

A portion of the status bar. The "..." in the left section


indicates there is additional text.

A portion of the status bar after making the left section


larger. The "..." indicates there is additional text.

Progress
The status bar indicates the progress of a procedure, such as gridding. The percent of
completion and time remaining will be displayed.

The progress of a Surfer procedure is shown in the status bar.

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.

The status bar displays 0% when it is indeterminate mode


and does not have a time estimate for the task.

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.

Opening and Closing the Object Manager


The Object Manager is opened and closed from the
View | Object Manager command, or by clicking the

button. Alternatively, you can click on the button


in the title bar of the Object Manager to close the
window or use the View | Object Manager command to
turn the manager off. You can also right-click on the
Object Manager title bar and select Hide.
Click on the autohide button
to display the Object
Auto Hide the Object Manager Manager as a tab.

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.

Changing the Object Manager Location - Floating vs. Docking


The Object Manager can be docked on the edge of the Surfer window or floated as a
dialog. The Object Manager is displayed in a docked view by default. The manager can
also be detached to display as a floating window. Double-click on the Object Manager
title bar to toggle between floating and docked modes. Alternatively, right-click the
Object Manager title bar and select Floating, Docking, Auto Hide, or Hide.

To change the position of the docked Object Manager, left-


click the title bar of the manager and drag it to a new
location while holding the left mouse button. The docking
mechanism displays with arrow indicators as you move the
window. 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. The docking mechanism
displays with
docking indicators.
Object Manager Tree
If an object contains sub-objects, a + or - is located to the left of the object name.
Click on the + or - button to expand or collapse the list. For example, a Map object
contains a map layer (i.e. Contours) plus four axes. To expand the tree, click on the +
control, or select the item and press the plus button on the numeric keypad, or press
the right arrow key on your keyboard. To collapse a
branch of the tree, click on the - control, or select the
item and press the minus button on the numeric
keypad, or press the left arrow key.

The expansion state of sub-objects in the Object


Manager is retained in the Surfer file .SRF. Use the
Expand new Object Manager items option in the
Options dialog to control the expansion state of new
objects in Object Manager.

655
Surfer

Arranging Objects Using Object Manager


To change the display order of the objects with the mouse, select an object and drag it
to a new position in the list above or below an object at the same level in the tree. The
pointer changes to a black right arrow if the object can be moved to the pointer
location, or a black circle with a diagonal line if the object cannot be moved to the
indicated location. Alternatively, select an object and use the Arrange | Order
Objects command which includes the Move to Front, Move to Back, Move Forward,
and Move Backward options. These menu items are accessed through the plot
document Arrange menu or by right-clicking on an object in the Object Manager.

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.

Object Visibility in Object Manger


Each row in the list consists of a button indicating the
type of object and a text label for the object. All
objects also have a check box that indicates if the
object is visible. To change the visible status of an
object, click on the check box to the left of the object
button. A check in the box indicates it is visible; an
empty box indicates that the object is not visible.
Invisible objects do not appear in the plot window and
do not appear on printed output. Note that if a
surface is made invisible, the overlays also become
invisible. A check mark indicates the
object is visible. In this
example, the post map
Opening Object Properties is not visible.

To display the properties for an object, click once on


the object in the Object Manager or in the plot window. The properties are displayed in
the Property Manager. To display a context menu of available actions for an object,
right-click on that object.

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.

To select multiple objects at the same level in the tree,


hold down the CTRL key and click on each object. To
select multiple contiguous objects at the same level in
the tree, select the first object, and then hold down the
SHIFT key and click on the last object.

Use the SHIFT key to


Scroll in Object Manager select multiple
contiguous objects
If the list of objects in the Object Manager is long, you in the Object Manager.
can use the scroll bar on the side of the Object
Manager to scroll down to an object. Alternatively, you can use the mouse scroll
wheel to scroll down. To scroll down using the mouse, click once in the Object
Manager to select the window. Roll the mouse wheel backward to scroll lower in the
Object Manager. Roll the mouse wheel forward to scroll higher 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.

Expand and Collapse Features


Features with multiple options appear with a plus (+) or minus (-) to the left of the
name. To expand a group, click on the + icon. To collapse the group, click on the -
icon. For example, the expanded Filled Contours section contains two options, Fill
contours and Color scale.

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.

Applying Property Manager Changes


Object properties automatically update after you select an item from a palette, press
ENTER, or click somewhere else in the Property Manager.

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

Property Manager Information Area


If the Show info area in the Property Manager is checked on the Tools | Options |
User Interface page, a short help statement for each selected command in the
Property Manager.

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.

This command is especially handy if your windows or managers become hidden by


mistake.

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.

The Options dialog contains the following pages:

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

The Options Dialog


Use the Tools | Option command to open the Options dialog. Click on the General
option on the left side of the dialog to open the General page.

General Page
You can set defaults (i.e. open/save paths and undo levels) on the General page in
the Options dialog.

Customize General options in the Options dialog.

The General Page provides the following options:

Backup Files Before Saving


If Backup files before saving is checked, a backup copy of an existing file is created
before saving the document. The backup copy is saved with a .BAK extension. If an
identically named backup file already exists, it will be overwritten.

662
Chapter 23 – Options and Preferences

Expand New Object Manager Items


Check Expand new Object Manager items to force the Object Manager to expand all
new object hierarchies in the tree control. If this option is turned off, the objects
contain + button. The + button can be clicked to manually expand additional levels.

Retain Tool Mode


Check Retain tool mode to make the toolbar items persistent until another tool is
selected or ESC is pressed on your keyboard. If this box is not checked, after using a
tool once (for example, drawing a polygon with the polygon tool), the current tool
reverts to the selection tool. If this box is checked, after using the tool, you can
continue using the tool until finished drawing new objects. Press ESC on the keyboard
to return to selection mode. When Retain tool mode is not checked, you can hold the
SHIFT key when you select a tool from the toolbar or menu to use it multiple times.

Delete Empty Maps


Check the Delete empty maps option to delete empty map frames after combining the
map layers with other maps. When this option is not checked, the empty map object
and axes are still drawn after the map layers are moved. By default, Surfer checks
this box by default so that empty maps are automatically deleted.

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.

Significant Figures in Display


Set the number of significant figures to display in the Sig. figs. in display box. The
maximum number of significant digits to display is 10. This setting affects the number
of significant figures shown in the map coordinates section of the status bar. This
setting does not affect the Significant Digits option in numeric labels. For example,
when the Sig. figs in display value is set to ten, the status bar will display cursor map

663
Surfer

coordinates as X = 2.647520621, Y = 5.685001966, Z = 73.43656773. When the Sig.


figs. in display value is set to two, the status bar will display cursor map coordinates
as X = 2.6, Y = 5.7, Z = 73.

Image Threshold (MB)


The Image threshold (MB) option controls the image threshold in megabytes. This
option can be set to a value between 0 and 16384. If an imported image is larger than
the image threshold, it will be stored in a tiled bitmap format which uses minimal
internal memory but can result in some performance degradation. Increase this value
if your computer has a lot of internal RAM. Lower this value if you are experiencing
very sluggish performance, "Out of memory" errors, or crashes when using large
images. Any images already imported must be re-imported to change their internal
storage format.

Track Map Coordinates


The Track map coordinates of option controls which map is used when the View |
Track Cursor option is enabled. The options are Topmost map/layer or Selected
map/layer. When the Topmost map/layer is chosen, the coordinates being shown by
the View | Track Cursor command are those for the map at the top of the Object
Manager. When Selected map/layer is chosen, the coordinates being shown are those
for the selected map.

Default File Path


Enter a path into the Default path box to set the default path for opening and saving

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.

Temporary File Path


Enter a path into the Temporary path box to set the default path for temporary files.

Alternatively, click the button to browse for a path.

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.

Set gridding defaults on the Gridding page in the Options dialog.

The Options dialog Gridding page contains options to customize while gridding.

The Gridding page provides the following options:

Notifications for Creating a Grid File


There are three notification options you can choose from in the When grid is
completed drop-down list: Do Nothing, Play a Sound, or Display a Message Box. This
action is performed after most gridding operations to inform you that the operation
has completed.

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.

Customize the Updates options in the Options dialog.

The Updates page provides the following options:

Automatically Check for Updates


Check Automatically check for updates to allow Golden Software to check for program
updates (i.e. Surfer 10.0 to Surfer 10.1) according to the user defined time interval.

Update Interval (days)


Specify the update time interval in days by entering a number in the Update Interval
(days) box or using the arrows. This option can be set to a value between one and 90.
Surfer will automatically check for updates after the specified interval of time has
passed.

666
Chapter 23 – Options and Preferences

Check for Updates


Click the Check for updates button to check for program updates. Before using this
command, make sure your computer is connected to the Internet. Follow the
directions in the Internet Update dialog to complete the update if an update is
available.

Automatically Check for Announcements


Check the Automatically check for announcements to allow Golden Software to
automatically check for program and company announcements. This could include
information about a new product release, tips for use of Golden Software programs,
special offers, or an update to the program.

User Interface Page


Use the Tools | Option command to open the Options dialog. Set the user interface
environment on the User Interface page in the Options dialog.

Customize the User Interface options in the Options dialog.

667
Surfer

The User Interface page provides the following options:

Show Splash Screen at Startup


Check Show splash screen at startup to allow Surfer to display the Surfer splash
screen when the program starts.

Show Property Manager Information Area


Check the Show info area in the Property Manager to display a short help statement
for each selected command in the Property Manager.

User Interface Style


Specify the interface style in the User interface style drop-down list. The options are
Office 2000, Office 2003, Office XP, Visual Studio 2005, Visual Studio 2008, and
Windows XP.

MDI Tab Style


Specify the tabbed document view style in the MDI tab style drop-down list. The
options are None, 3D, One Note, and Visual Studio 2005. The plot window, worksheet
window, and grid node editor window have a tab appearance when multiple windows
are open.

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.

The Drawing page provides the following options:

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 Page Rectangle


Use the Show page rectangle option to turn on or off the outline of the page in the plot
window. The page size is set through File | Page Setup.

Show Margins
Use the Show margins option to turn on or off the dashed line margin. Margins are set
through File | Page Setup.

Set the Drawing options in the Options dialog.

Selection Group
Use the options in the Selection group to control how objects are selected in the plot
window.

669
Surfer

Rectangle Must Fully Surround


The Rectangle must fully surround option controls how the block select feature
functions. If the box is checked, the block select rectangle must be drawn completely
around the object to select it. If any portion of the object extends beyond the block
select rectangle, the object is not selected. If this option is unchecked, the block select
rectangle only needs to partially intersect an object to select it.

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.

Default Attributes Page


Use the Tools | Option command to open the Options dialog. Click on the Default
Attributes option on the left side of the dialog to open the Default Attributes page.

Use the Default Attributes to specify the default line, fill, symbol, and font attributes
used when creating new objects.

The Default Attributes page provides the following options:

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.

Customize the Default Attributes options in the Options dialog.

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.

Rulers and Grid Page


Click the Tools | Option command to open the Options dialog. Click on the Rulers
and Grid option on the left side of the dialog to open the Rulers and Grid page.

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.

The Rulers and Grid page provides the following options:

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

Ruler Divisions Per In/Cm


Use Ruler divisions per in or Ruler divisions per cm to set the number of divisions per
page unit on the ruler. Select a value between 1and 99. If the page units are in
centimeters, the option is Ruler divisions per cm. If the page units are in inches, the
option is Ruler divisions per in.

Specify Rulers and Grid options in the Options dialog.

Grid Divisions Per In/Cm


Use Grid divisions per in or Grid divisions per cm to set the number of divisions per
page unit on the grid. Select a value between 1 and 99. If the page units are in
centimeters, the option is Grid divisions per cm. If the page units are in inches, the
option is Grid divisions per in.

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.

Minimal error checking is performed, and it is possible to specify values completely


inappropriate for some data sets. Some inappropriate values may cause maps to
appear incorrectly.

Customize the Advanced options in the Options dialog.

The Advanced page provides the following options:

Current Setting File


The Current Setting File is the file Surfer is currently using to extract the defaults.
Any changes made to the defaults in the various dialogs are saved in the current
setting file when Surfer is shut down. By default, Surfer uses a file named

674
Chapter 23 – Options and Preferences

SURFER.SET. It is also possible to specify a different setting file by clicking the


button.

Settings (organized by dialog)


The Settings (organized by dialog) list displays the default settings organized
hierarchically by dialog. To change a setting, click the + button next to the dialog you
wish to modify. Individual settings can be highlighted by clicking on them or by using
the up and down arrow keys on your keyboard. As each individual setting is
highlighted, a brief description appears in the text box at the bottom of the dialog.

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.

The OK and Cancel Buttons


You must click the OK button in the dialog that uses the setting for the setting to be
updated. If you Cancel the dialog, the changes are not recorded in the setting file.

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.

The Commands page provides


the following options:
Use the Commands page in the Customize dialog to
add buttons to toolbars and commands to menus.

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.

Adding Buttons and Commands to Toolbars and Menus


To add a button or command to a toolbar or menu:
1. Select Tools | Customize, View | Toolbars | Customize, or right-click on the
toolbars and select Customize.
2. Click on the Commands tab.
3. Select a category from the Categories list.
4. Select a command from the Commands list.
5. If you are adding a toolbar button, drag the command to a toolbar.
6. If you are adding a menu command, open the menu by clicking on the menu name
and then drag the command to the menu.

Removing Buttons and Commands


To remove a button or command, right-click on the button or command and select
Delete while the Customize dialog is open.

Resetting Toolbars and Menus to the Defaults


To reset all toolbars and menus to the defaults, click the Toolbars tab and then click
the Reset All button.

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.

The Toolbars page provides


the following options:

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.

Resetting All Toolbars and Menus


If you would like to reset changes to all toolbars and menus, click the Reset All button.

Creating New Toolbars


You can create a new toolbar by clicking the New button. Enter a name for the new
toolbar into the Toolbar Name dialog. The new toolbar is created without any
buttons. Open the Commands page and drag commands into the new toolbar to add
buttons. There is a limit of 10 custom toolbars.

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.

Show Text Labels


To add text labels to toolbars, select a toolbar and then check the Show text labels
box.

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.

The Keyboards page provides the


following options:

Category, Commands, and


Descriptions
Menu titles (File, Edit, etc.) are
listed in the Category list. You
can also show all commands in
Use the Keyboard page in the Customize dialog to
the programs by selecting All
customize keyboard shortcuts.
Commands at the bottom of the
Category list. When a category is
selected, the Commands list is updated to display the commands within the category.
When a command is selected, an explanation of the command appears in the
Description box.

679
Surfer

Accelerator Menu Application


You can choose to assign the accelerator (keyboard shortcut) to the Plot Document,
Grid Document, Worksheet, or Default menus in the Set Accelerator for list.

Current Shortcut Keys


When a command is selected in the Commands list, the accelerator keys are listed in
the Current Keys list. The Current Keys list only displays accelerators for the current
group of menus selected in the Set Accelerator for list.

Press New Shortcut Key


To create a shortcut, select a command, place the cursor in the Press New Shortcut
Key box, press the keys on your keyboard, and then click the Assign button. If a
shortcut is already assigned to a command a description below the Press New Shortcut
Key appears and the Assign button is disabled.

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.

The Menu page provides the following options:

Show Menus For


You can choose to display the Plot Document, Grid Document, Worksheet, or Default
Menu menus. Click the Reset button to reset the menu to the original menu.

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.

To add commands to a context menu:


1. Click on a context menu name in the Select context menu list.
2. While the context menu is open, click on the Commands tab in the Customize
dialog.
3. On the Commands page, select a command in the Commands list and drag it into
the open context menu.

To remove commands from a context menu:


1. Click on a context menu name in the Select context menu list.
2. In the context menu, right-click on the name of the command you wish to remove
and select Delete.

681
Surfer

Resetting Toolbars and Menus to the Defaults


To reset all toolbars and menus to the defaults, open the Customize dialog, click the
Toolbars tab, and click the Reset All button.

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.

The Options page provides


the following options:

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.

Customize - Button Appearance


You can customize Surfer
button images in the
Button Appearance dialog.

Use the Tools |


Customize command to
open the Customize dialog.
Once the Customize dialog
is open, right-click on the
menu command or toolbar
button you want to change
the appearance of, and
select Button Appearance
to open the Button
Appearance dialog.

Customize buttons for commands in


The Button Appearance
the Button Appearance dialog.
dialog allows you to use a
predefined image or create a
new image. The Button Appearance dialog provides the following options:

683
Surfer

Text Only
Select Text only if you would like the button appearance to only display a text
description.

Image and Text


Select Image and text if you would like the button appearance to have an image and
text description.

Button Text
Specify the text description in the Button Text area.

Select User-defined Image


The Select User-defined Image area displays current button images available for use
or editing.

Edit
Click the Edit button to open the Edit
Button Image dialog.

The Edit Button Image Dialog


The Edit Button Image dialog allows you
to create a new image or edit a current
image. It provides the following options:

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.

Formats for Attribute Values


Several settings use specially formatted values to specify all the required information
when using Advanced Options. When specifying the values for these settings, you
must include all the parameters as discussed below.

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

Alternatively, a color is specified using the special syntax:


"Rxxx Gyyy Bzzz"

or

"Rxxx Gyyy Bzzz Aaaa"

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%.

Line Property Syntax


In advanced options, line properties are specified using the syntax:

"Color" "Style" Width

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

Fill Property Syntax


In advanced options, fill properties are specified using the syntax:

"version "fgColor" "bgColor" "Pattern" offset scale angle coverage"

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.

Note that all items are enclosed in quote marks.

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

Font Property Syntax


In advanced options, font properties are specified using the syntax:

"FaceName" "Color" Style Size

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

Symbol Property Syntax


In advanced options, symbol properties are specified using the syntax:

""SymSet" "FillColor" "LineColor" BitFlags Index Size"

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

compatibility. In older versions of Surfer, the Bit Flags was used


to indicate whether the symbol Line Color was used. In Surfer 10,
the value should be set to 0.
Index Index is the 0-based index of the symbol to use as it appears in
the Symbol Properties dialog. This is entered as a number, and
does not use double quotes.
Size Size is the size of the symbol page units (inches or centimeters).
This is entered as a number.

Note that all items are enclosed in quote marks.

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)

""GSI Default Symbols" "R255 G0 B0 A50" "R0 G0 B255 A255" 0 10 0.5"

Numeric Label Property Syntax


In advanced options, numeric label properties are specified using the syntax:

Type Digits Style "Prefix" "Suffix"

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"

Using Custom Setting Files


To create a custom setting file:
1. Make a backup of the default SURFER.SET file. The SURFER.SET file is located in
the User's AppData directory.
2. On Windows XP, this is C:\Documents and Settings\<User Name>\Application
Data\Golden Software\Surfer 10.
3. On Windows Vista and 7, this is C:\Users\<User Name>\AppData\Roaming\Golden
Software\Surfer 10.
4. Rename the new copy, keeping the .SET extension.
5. Click the Tools | Options command. Click on the Advanced link on the left side of
the dialog.

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

Use the Custom .SET File


After the preferences are set, you can rename the set file, keeping the .SET extension.
Multiple .SET files can exist on the same computer. Each setting file can use a different
set of defaults.
You can manually change the setting file Surfer uses by clicking Tools | Options and

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:

"Path to Surfer.exe" /SET "Path to new .SET file"

An example may look like:

"c:\Program Files\Golden Software\Surfer 10\Surfer.exe" /SET "C:\Documents and


Settings\<User Name>\Application Data\Golden Software\Surfer 10\custom.set"

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.

Using Old .SET Files


You can also use old Surfer setting files. When using older Surfer setting files, the
hierarchy displayed in the Tools | Options dialog is only a single level due to lack of
nesting information in the old format.

Be sure you copy the [.SET] file in the correct place for it to be used:

691
Surfer

• Windows XP: C:\Documents and Settings\(username)\Application Data\Golden


Software\Surfer 10
• Windows Vista and 7: C:\Users\(username)\AppData\Roaming\Golden Software\Surfer
10

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

Starting the Scripter Program


To start the Scripter program, select it from the Windows Start menu. Scripter is
installed in the same program group as Surfer. If Scripter is not present in the
Windows Start menu, installation of Scripter may have been skipped when Surfer
was installed. You can install Scripter from the Surfer CD-ROM or download
instructions. For new download instructions, contact technical support.

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.

This Scripter application window is shown


while execution of a script is paused.

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.

Working with Scripts


New Scripts
To create a new script, select the File | New command. A blank script sheet is
created. You can start typing script instructions into this sheet. If you edit more than
one sheet at a time, click the sheet tabs to switch between them or select the Sheet |
1, Sheet | 2, etc. menu commands. You can edit up to nine code sheets at the same
time.

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).

Existing Scripts and Modules


To open an existing script, select the File | Open command. To open a script you
opened recently, click its name at the bottom of the File menu. To open other
modules used by your script, select the Sheet | Open Uses command. Golden
Software provides examples to help get you started.

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

Visual BASIC Compatibility


The Scripter BASIC programming language is compatible with the Visual BASIC for
Applications language ( VBA). Scripts that run in Scripter will work in a VBA
environment with few or no modifications. Scripter programs will also work under
Microsoft Visual BASIC. Unlike most Visual BASIC programs, however, Scripter
programs are not event-driven. Scripter programs are procedural. They start with the
first statement of the Main procedure, and end when the Main procedure ends.

Some statements available in VBA are not supported in Scripter BASIC:

 The VBA Collection object  Erl


 The VBA Clipboard object  Option Compare
 GoSub  Conditional compilation
 On...GoSub  With Events
 On...Goto  LinkExecute
 GoSub…Return  LinkPoke
 Multiple statements on one line  LinkRequest
(separated by ":")  LinkSend
 All Financial functions  Line numbers
 Resume at current line  LoadPicture

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:

 Clipboard function  MacroRun


 CallersLine  DDEExecute
 User dialogs  DDEPoke
 PortInt  DDERequest
 MacroRunThis  DDEInitiate
 MacroDir  DDETerminateAll
 Wait instruction  DDETerminate

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.

Example Script Files


To run a sample script file:
1. Open Scripter by navigating to the installation folder, C:\Program Files\Golden
Software\Surfer 10\Scripter. If you are running a 32-bit version of Surfer on a
64-bit version of Windows, navigate to C:\Program Files (x86)\Golden
Software\Surfer 10\Scripter. Double-click on the Scripter.EXE application file.
2. Choose the File | Open command and select a sample script .BAS file. These are
located in the C:\Program Files\Golden Software\Surfer 10\Samples\SCRIPTS
folder or the C:\Program Files (x86)\Golden Software\Surfer 10\Samples\SCRIPTS
folder, if you are running a 32-bit version of Surfer on a 64-bit version of
Windows.
3. Click the Script | Run command and the script is executed.

Using Scripter Help


For more information on Scripter program menu commands, select the Help |
Contents command in Scripter. Press the F1 key for more information about the
Scripter windows or the active dialog. The Help | Surfer Automation Help
command shows all Surfer-specific methods and properties.

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

name Lower-case words with a dotted underline are placeholders for


information you supply.
[param] Items inside square brackets are optional. These may be
omitted from the statement.
{Until | While} Items between curly braces, and separated by a vertical bar
are lists of options. You must use one of the items in the list.
[Private | Public] Items between square braces, and separated by a vertical bar
are lists of optional choices. You may use one of the items in
the list, or none of them.
... An ellipsis mark indicates that the preceding item in the syntax
example is repeated. Repeated items are usually optional and
separated by commas.
;,.() Other symbols must be typed as shown in the syntax example,
with the exception of the underscore "_" character.
_ The underscore is used to show that a sample line has been
split.

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")

' Make the Surfer window visible


SurferApp.Visible = True

' Add a new plot document


Set plot = SurferApp.Documents.Add

699
Surfer

' Prompt for name of the data file


DataFile$ = GetFilePath$()

' Invoke the Surfer Grid Data command.


SurferApp.GridData DataFile := DataFile$, OutGrid := "out.grd",
ShowReport := False

' Invoke the AddContour map method.


' The AddContourMap method is a member of the Shapes collection object.
' The Shapes collection object, in turn, is one of the
' properties of the plot document object.
plot.Shapes.AddContourMap "out.grd"
End Sub

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.

Suggested Reading - Scripter


For additional help in learning how to program or for more information about the
Visual BASIC for Applications (VBA) language (which is nearly identical to the Scripter
BASIC language) we recommend the following books:

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

Scripter BASIC Language


The online help describes the major elements of the Scripter BASIC programming
language, but it does not explain the concepts of writing computer programs. Many
good books on the subject of programming with BASIC (Beginner’s All-purpose
Symbolic Instruction Code) have been written. If you are not moderately familiar with
writing computer programs, we suggest that you refer to one of the books listed in the
Suggested Reading section.

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:

SurferApp.GridData "demogrid.dat" ' This creates a grid file from


demogrid.dat

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.

Double Quotes and Text


In Scripter, text strings must be enclosed in double quotes. File names, for example,
must be surrounded by double quotes. If quotes are missing, the text may be
mistaken for a variable name.

Debug.Print "This text string is printed in Scripter's immediate window"

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.

SELECT CASE...END SELECT


SELECT CASE...END SELECT branches to one of several statements. This compares the
value of an expression to several test values and executes the statements associated
with the test value that matches the expression value.

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

Optional Arguments and Named Arguments


Many procedures, especially the methods provided by Surfer Automation objects,
accept a large number of arguments. Some of the arguments are required. Every
required argument must be supplied or the script will fail to run. Some arguments are
optional. Optional arguments may be omitted and the procedure will assume a default
value for the missing arguments.

For example, the PlotDocument object’s "PrintOut" method accepts up to seven


arguments, all of which are optional:

plot.PrintOut(Method, SelectionOnly, NumCopies, Collate, _


xOverlap, yOverlap, Scale )

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:

Set SurferApp = CreateObject("Surfer.Application")


Set plot = SurferApp.Documents.Add
plot.PrintOut , , 3, , , , 50

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:

Set SurferApp = CreateObject("Surfer.Application")


Set plot = SurferApp.Documents.Add
plot.PrintOut Scale := 50, NumCopies := 3

Named arguments may be listed in any order without regard to the order they appear
in the procedure's definition.

Subroutines and Functions


Writing a long or complicated script may be easier to manage if you divide the script
into smaller pieces called procedures. A procedure is a separate sequence of
instructions that you can call from multiple places within your script. The BASIC
language provides many predefined procedures for performing frequently needed
tasks, and, in fact, the methods provided by the Surfer automation objects are
themselves procedures.

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:

x = Cos (0) 'Returns the cosine of the argument (returns 1)


a$ = Left("AgAuPb",2) 'Returns the lef-most characters (returns "Ag")
Wait 5 ' Waits for 5 seconds

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

The arguments passed to a function must be enclosed in parentheses if the function's


return value is used. If the function's return value is not used, the arguments may be
listed without enclosing them in parentheses. Arguments passed to a subroutine are
never enclosed in parentheses.

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:

Sub name ( arguments )


statements
End Sub

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

Sub MultipleBeep (count As Integer)


For i = 1 To count
Beep
Wait 0.5 ' Wait one-half second between beeps
Next
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

list must be enclosed in parentheses, and argument definitions are separated by


commas if there is more than one. When a subroutine is called, the variables listed in
the argument list are automatically assigned the values passed in from the calling
procedure.

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:

Function name ( arguments ) As type


statments
End Function

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:

Function hypotenuse (a As Double, b As Double) As Double


c = a * a + b + b ' The built-in Sqr function computes the square root
hypotenuse = Sqr (c) ' Set the function's return value
End Function

You define the list of arguments accepted by a function the same way as you define
the arguments accepted by subroutines.

Built-in Functions and Procedures


Numerous useful functions and subroutines are built into the Scripter BASIC
language. These routines can help you perform some of the most commonly required
programming tasks. Functions for processing strings, performing mathematical
calculations, error handling, working with disk files, and many others are available.

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

Using Surfer Objects


To access Surfer commands from your script you must create a Surfer Application
object. To create an Application object, call the CreateObject function with
Surfer.Application as the argument. The Application object is the root of an object
hierarchy. Access all other Surfer Automation objects though the properties and
methods of the Application object.

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:

' Assume "SurferApp" is a variable holding a reference to the Application


' object
SurferApp.Documents.Item(1). DefaultFont.Bold = True

Alternatively, you can store each intermediate object in variables as you traverse the
object hierarchy:

' Assume "SurferApp" is a variable holding a reference to the Application


object
Set docs = SurferApp.Documents
Set plot = docs.Item(1)
Set font = plot.DefaultFont
font.Bold = True

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

' Assume "SurferApp" is a variable holding a reference to the Application


' object
With SurferApp.Documents.Item(1).DefaultFont
.Bold = True
.Size = 12
.Color = SurferAppColorBananaYellow
End With

Code, Class, and Object Modules


If you create very large scripts, or frequently reuse the same subroutines in several
different scripts, you may want to split your script code into more than one file. Each
script file is called a module.

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

The '#Uses Line


Before using the procedures and objects defined in another module, a script must
indicate the name of the file containing the procedure or object definitions. You must
place a '#Uses statement at the beginning of a script, before any procedure
definitions, to instruct Scripter to load all modules used by the script. For example:

'#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.

Private and Public Definitions


By default, all subroutines, functions, and user-defined types (including enumeration
definitions) may be accessed from other modules. To prevent other modules from
accessing procedures or user-defined types precede the definition with the Private
keyword:

Private Sub MyBeep


Beep : Beep
End Sub

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:

Public universal_data As String

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.

Defining Object Properties and Methods


Class and object modules define the properties and methods of objects. To define the
methods for an object, simply define public subroutines and functions. All the public
procedures in a class or object module are methods that users of the object can call.

The properties of an object typically correspond to private global variables defined in


the module. To allow users of the object to access the variable values, you provide
"property get" and "property set" procedures. Use the Property Get statement to
define a function that returns the value of a property. Use the Property Let statement
(or the Property Set statement if the property is an object reference) to define a
subroutine that changes the value of a property.

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

Example: Defining an Object in a Class Module


The following class module demonstrates how to define an object. The sample defines
a property named Radius and a method named Draw.

' Declare a private global variable for storing the property called
"Radius"
Dim cirRadius As Double

' Define the initialization subroutine


Private Sub Class_Initialize
cirRadius = 99
End Sub

' Define the termination subroutine


Private Sub Class_Terminate
End Sub

' 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

Type Library References


Many application programs expose their services with objects. These objects may be
used in your scripts, just as the Surfer automation objects are used. Before you can
use another application's objects, you must add a reference the application's type
library. A type library is a file that describes the objects, properties, and methods
provided by an application. The Surfer type library is automatically referenced.

To add a type library reference to the current script module:


1. Select the Edit | References command to open the
References dialog.
2. Click on the check box next to the type library whose
objects you want to use in your script.
3. Click on the up and down arrows to adjust the relative
priority of the checked references. If two libraries describe items with the
same name, the item described in the higher-listed library is used by your
script.
4. Click the OK button when finished
adding type library references to your script.

The Object Browser


The ActiveX Automation Members dialog shows the methods and properties of the
objects available to your script. This dialog provides a quick way to check the names
of objects or to determine the argument list for a method.

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.

Browser Path Edit Box


The text box along the top of the dialog demonstrates the usage of the selected
method or property. Click the Paste button to insert this sample into the code window.

Use the Debug | Browse command in Scripter to


open the ActiveX Automation Members dialog.

Browser Info Area


Information about the item selected in the Methods/Properties list is shown along the
right half of the dialog. The top line shows the selected item's type (function, property,
or property get) and its name. The second line, labeled Result, shows the type of
value returned by the method or property. The third line, labeled Dispatch ID, shows a
value that uniquely identifies a property of method (this value is not used in scripts).

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.

Browser Parameter List


If the item selected in the Methods/Properties list is a method that accepts
parameters, a Parameters list shows the names and types of all parameters used by
the method.

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:

Dim varname As type

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.

Type Type-Definition Description of Type


Character
Integer % A 16-bit integer value
PortInt ? (Portable Integer) A 16- or 32-bit integer
value
Long & A 32-bit integer value
Single ! A 32-bit floating-point value
Double # A 64-bit floating-point value
Currency @ A 64-bit fixed-point value
String $ A text string of any length
Byte (none) An 8-bit unsigned integer value
Boolean (none) A true or false value
Date (none) A 64-bit floating-point value
Object (none) A reference to an ActiveX object
Variant (none) Capable of holding any type of value

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:

Dim SurferApp As Object

716
Chapter 24 – Automating Surfer

Set SurferApp = CreateObject("Surfer.Application")

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.

Dim month (11) As String


month (0) = "January"
month (1) = "February"
...
month (11) = "December"

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:

1. Singly dimensioned array:

718
Chapter 24 – Automating Surfer

Dim coordinates(1 to 6) As Double


coordinates(1)=x1
coordinates(2)=y1
coordinates(3)=x2
coordinates(4)=y2
coordinates(5)=x3
coordinates(6)=y3

2. Doubly dimensioned array:

Dim Points(1 To 2,1 To NumPoints) As Double


Points(1,1) = x1: Points(2,1) = y1
Points(1,2) = x2: Points(2,2) = y2
Points(1,3) = x3: Points(2,3) = y3

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)

dim Points(1 to 6) As Double


For i=1 to 6
Points(i) = coordinates(i)
Next

Getting User Input


The Scripter language provides several predefined functions for prompting the script
user for information. The GetFilePath function displays a standard Windows file open
dialog. This allows the script user to select a file. The name of the selected file is
returned by the function. The InputBox function allows the user to enter an arbitrary
line of text. This function returns the line of text entered.

UserText$ = InputBox("Enter something here:") 'show prompt


Debug.Print UserText$ 'show line in Immediate window

719
Surfer

This is a simple example of the InputBox function.


The text entered in the box is returned to the script.

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

Button Item Description Properties


GroupBox A rectangle used to group related Field, Caption
controls.
Text A text label, requires no response from Field, Caption
the user
TextBox An edit box used to enter and edit text Field, Type (single line,
multiple line,
password)
CheckBox A box which is checked and unchecked as Field, Caption, Type (2
the user clicks on it, a three-state check state, 3 state, 3 state

721
Surfer

box has a disabled (grayed) state auto check)


OptionButton A round button for choosing from a set of Field, Caption, Option
options, only one of a group of option Group
buttons may be checked
ListBox A window that contains a list of items Field, Array of Items,
that can be selected by the user Type (list, sorted list)
DropListBox A list that is visible when opened by the Field, Array of Items,
user, the text may be editable or not and Type (list, text, sorted
the list may be sorted or not list, sorted text)
ComboBox A text box with an attached list box, the Field, Array of Items,
list may be sorted or not Type (text, sorted)
Picture Displays a bitmap (image) in the dialog Field, Caption, Type
(from file, from
clipboard)
PushButton A push button Field, Caption

OKButton Push button with the OK caption Field

CancelButton Push button with Cancel caption Field

n/a Dialog Definition of dialog Dialog Function,


Caption, Centered

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

• Comment: A comment is the text to insert in the dialog definition block.

UserDialog Example
The following function demonstrates how to define, display, and extract the values
entered in a user dialog.

Function MyInputBox As String


' Define the dialog template. This definition
' is inserted by the UserDialog editor.
Begin Dialog UserDialog 250,112,"Caption"
TextBox 10,14,230,28,.Text1
CheckBox 20,49,160,14,"Check Box",.Check1
OKButton 20,77,90,21
CancelButton 130,77,90,21
End Dialog

' Declare a dialog variable


Dim dlgvar As UserDialog

' Initialize the dialog controls


dlgvar.Text1 = "This is the initial text to display"
dlgvar.Check1 = True ' start with check box checked

' Display the dialog and wait for the OK or Cancel button to be pressed
result = Dialog(dlgvar)

' Extract the information entered into the dialog


If result = -1 Then ' check to see if OK button was pressed
MyInputBox = dlgvar.Text1
If dlgvar.Check1 Then Debug.Print "The Check Box was Checked!!"
End If
End Function

723
Surfer

This script creates the dialog


displayed above

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.

Running Scripts in Scripter


Scripts are placed in the code window either by typing a new script from scratch or by
loading the script with the File | Open command.

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.

Running Scripts from the Command Line


You can run scripts from a command prompt without having to manually load and
execute the script in Scripter. The same commands that you would type at a
command prompt may also be entered as the "target" for a shortcut in order to link a
shortcut button to a script. Enter the following to run a script from the command line
or to link a shortcut to particular script file:

<Scripter path> -x filename.bas

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:

<Scripter path> filename.bas

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:

Sub OpenFile(srf As Object, filename As String)


On Error Goto ErrLabel
srf.Documents.Open filename
Exit Sub

ErrLabel:
MsgBox "Unable to open file " & filename
Exit ' Must use RESUME or EXIT at end of error handling code
End Sub

Script Runs Incorrectly


Most difficult to correct are scripts which run, but do not work as expected. Fixing
these scripts is hard because you do not know which line or statement is causing the
problem. Scripter provides a number of debugging features to help you locate the
source of problems.

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:

Debug.Print "The value of variable X is "; X

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

click the button.

Viewing Variable Values


While a script is paused, there are several ways to view the value of a variable:
• In the immediate window, type a question mark, followed by the variable name
and press ENTER. The current value of the variable is displayed.
• In the code window, place the cursor on the variable name you want to examine
(that is, click on the variable name in the code window). Press SHIFT+F9, select

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

Changing Variable Values


To change the value of a variable, type an assignment expression in the immediate
window and press ENTER. For example, type "A=5" (without quotes) and press ENTER
to assign a new value to the variable named "A."

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.

A quick alternative to setting a breakpoint is the Debug | Step To Cursor command.


This command has the same effect as setting a breakpoint on the current line, running
the script, and then clearing the breakpoint after script execution has paused on the
current line.

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

Surfer Object Model


Surfer provides ActiveX Automation objects which allow scripts to control practically
every feature of Surfer. These objects can be accessed from Scripter or from any
Automation-enabled environment, such as Visual BASIC, Windows Scripting Host, or
Excel.

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

Object Hierarchy - MapFrame


This is the continuation of the Surfer automation object model chart. A MapFrame
object is a type of Shape object under which all the Surfer map types are grouped.
The "common objects" are contained by one or more automation objects. Most of the
common objects are used to access a set of related properties in their parent object.
Not every Surfer automation object is listed in these charts.

731
Surfer

Methods and Properties


Objects have attributes associated with them. The Grid object, for example, has an
attribute called "xMin" which represents the minimum X coordinate of the grid. An
object’s properties, also known as its properties, may be examined and changed by
scripts. Some properties may be examined, but may not be changed. These are called
read-only properties.

732
Chapter 24 – Automating Surfer

In addition to having properties, many Automation objects perform services. A Grid


object, for example, will perform the "SaveFile" service when a script instructs it to do
so. The services that an object performs are called its methods. Methods often
require parameters to control how their services are performed. The Grid object’s
"SaveFile" method, for example, accepts two parameters: a file name and a file format
code.

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

Object Model Chart


The object model chart shows you which objects provide access to other objects in the
hierarchy. Although the Application object is at the top of the hierarchy, not all objects
are directly accessible from the Application object. To access many objects you must
traverse from the Application object through one or more layers of sub-objects. People
often refer to "drilling" or "boring" through the object hierarchy to describe this
traversal through several objects to obtain an object you want to use.

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.

A Brief Introduction to the Major Surfer Objects


The following will introduce some of the most important Surfer automation objects.
This is by no means comprehensive. Please see online help for a complete list of all
Surfer Objects, Properties, and Methods.

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.

The Application Object


The Application object represents the Surfer program.
All navigation through the Surfer object model begins
with the Application object. The Application object is a
single instance of Surfer and it is the root of all objects in
Surfer.

External programs will typically create an instance of the


Application object during initialization. In VB this is done
using the CreateObject function as in:

Set SurferApp =
CreateObject("Surfer.Application")

The CreateObject function activates a new instance of


Surfer, and returns a reference to the Application object to your script. If Surfer is
already running, and you do not want to start a new instance of Surfer, use the VB
GetObject function instead of CreateObject:

Dim SurferApp As Object


Set SurferApp = GetObject(,"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:

Set SurferApp = GetObject(,"Surfer.Application")


SurferApp.Visible = True

Most of the gridding-related operations are methods of the Application object. Use the
GridData, GridFunction, GridMath, GridFilter, GridSplineSmooth, GridBlank,

735
Surfer

GridConvert, GridVolume, GridSlice, GridTransform, GridExtract, and GridCalculus


methods to create new grids and perform computations with grids.

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 Documents Collection


The Documents collection contains all open
documents. The Documents collection provides the
means to access plot and worksheet documents. Use
the Add method to create new plot or worksheet
documents. Surfer provides the pre-defined values
srfDocPlot and srfDocWks for specifying the type of
document to create:

Set srf = CreateObject("Surfer.Application")


srf.Documents.Add srfDocPlot ' Create a new, blank plot document
srf.Documents.Add srfDocWks ' Create a new, blank worksheet document

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 Windows Collection


The Windows collection provides access to all windows within Surfer. The Windows
collection returned by the Application object contains all the windows in the
application, including the plot window, the worksheet window, and the grid editor
views. To create new Window objects, call a Document object’s NewWindow method.

The PlotDocument Object


A PlotDocument object corresponds to an SRF file. PlotDocument objects are
created by the Documents.Add or Documents.Open methods of the Application
object. All drawing objects within the document are stored in the Shapes collection.
All selected objects are part of the Selection 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.

The WksDocument Object


The WksDocument object represents a
worksheet document. WksDocument objects
are created by the Documents.Add or
Documents.Open methods. Cells within a
worksheet are accessed through the Cells,
Rows, and Columns methods. The active cell
and current selection are accessed through a
WksWindow object. You can perform a
mathematical transformation on worksheet
cells and merge files together with the
WksDocument object. The WksRange object
can be accessed using the Cells, Rows,
Columns, and UsedRange properties.

737
Surfer

The PlotWindow, WksWindow, and GridWindow Objects


It is important to distinguish between windows and documents. Document objects
represent a file on disk containing the actual data to be represented. Windows are
used to view that data. There can be multiple windows viewing the same document at
once.

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.

The Shapes Collection


Within Automation, graphic drawing and map objects are called Shapes. The Shapes
collection contains all of the drawing and map objects in a document. This object is
also used to create new shapes and add them to the collection. Methods exist to
enumerate all the shapes in the collection, add objects to the Selection collection,
and create new drawing and map shapes.

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

Set SurferApp = CreateObject("Surfer.Application")


SurferApp.Visible = True

'Create a new, empty plot document


Set Doc = SurferApp.Documents.Add SurferAppDocPlot

'Get the Shapes collection


Set Shapes = Doc.Shapes

'Create the contour map


Set MapFrame = Shapes.AddContourMap("Demogrid.grd")

End Sub

738
Chapter 24 – Automating Surfer

The Selection Collection


The Selection collection contains all the properties and methods associated with the
collection of selected shapes. The Selection collection defines methods that operate on
one or more selected shapes. Most commands within Surfer that require selected
objects are part of the Selection collection.

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.

The MapFrame Object


You create new maps using the Add<map
type> methods of the Shapes collection
(AddBasemap, AddReliefMap,
AddContourMap, and so forth). These
methods return a reference to a MapFrame
object - not, as you might expect, a
reference to the object of the specific map
type that was created. The MapFrame object
contains the coordinate system, axes, and all
properties common to the maps contained
within it. The MapFrame defines the
coordinate system and axes for one or more
overlays.

When a new map object is created, usually


the MapFrame object is returned rather than
the contained overlay. For example,
Shapes.AddContourMap returns the
containing MapFrame object rather than the
contour map overlay. To access the overlay
within the MapFrame, use the Overlays
collection as in:

Set MapFrame = Shapes.AddContourMap("demogrid.grd")


Set ContourMap = MapFrame.Overlays(1)

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

Set SurferApp = CreateObject("Surfer.Application")


SurferApp.Visible = True

'Create a blank plot


Set plot = SurferApp.Documents.Add SurferAppDocPlot

'Add a new contour map. This will return a MapFrame object


Set mapframe = plot.Shapes.AddContourMap "demogrid.grd"

'Get a ContourMap object from the MapFrame


Set contourmap = mapframe.Overlays(1)

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

Derived objects and their predecessor objects include:


• Document Object: The Document object is a predecessor of the PlotDocument
and WksDocument objects.
• Window Object : The Window object is a predecessor of the PlotWindow,
WksWindow, and GridWindow objects.
• Shape Object: The Shape object is a predecessor of all objects which can be
moved and resized. These include the MapFrame, Variogram, Composite, all of
the basic drawing objects (Rectangle, Ellipse, Symbol, Text, Polyline, and
Polygon), all of the map objects (BaseMap, ImageMap, ReliefMap, ImageMap,
ContourMap, PostMap, ClassedPostMap, VectorMap, and Wireframe), and various
map component objects (Axis, ScaleBar, DiscreteColorScale,
ContinuousColorScale, Legend, VectorLegend and PostLegend).
• Legend Object: The Legend object is a predecessor of the VectorLegend and
PostLegend objects.

Using Collection Objects


Surfer groups most objects in collections. Although these collections contain different
types of data, they can be processed using similar techniques.

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:

' Assume "docs" is a variable holding a reference to the Documents


collection
docs.Item(1) ' retrieves the first object in the collection
docs(1) ' shorthand, retrieves the first object in the collection

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

Close and Delete Methods


The objects contained by collections are automatically removed when the contained
object is deleted or closed. For example, call a Document object’s Close method to
close a document or call the Shape object’s Delete method to remove any Shape-
derived object.

Parent and Application Properties


Every Automation object provides a Parent and an Application property. The
Application property returns a reference to the top-level Application object. This is a
convenient way to access the Application object, particularly when passing Automation
objects as arguments to subroutine and function calls.

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.

PlotWindow, WksWindow, and GridWindow Objects


It is important to distinguish between windows and documents. Document objects
represent a file on disk containing the actual data to be represented. Windows are
used to view that data. There can be multiple windows viewing the same document at
once.

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.

Using Surfer Objects


To access Surfer commands from your script you must create a Surfer Application
object. To create an Application object, call the CreateObject function with
Surfer.Application as the argument. The Application object is the root of an object
hierarchy. Access all other Surfer Automation objects though the properties and
methods of the Application object.

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

' Assume "SurferApp" is a variable holding a reference to the Application


' object
SurferApp.Documents.Item(1). DefaultFont.Bold = True

Alternatively, you can store each intermediate object in variables as you traverse the
object hierarchy:

' Assume "SurferApp" is a variable holding a reference to the Application


' object
Set docs = SurferApp.Documents
Set plot = docs.Item(1)
Set font = plot.DefaultFont
font.Bold = True

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:

' Assume "SurferApp" is a variable holding a reference to the Application


' object
With SurferApp.Documents.Item(1).DefaultFont
.Bold = True
.Size = 12
.Color = SurferAppColorBananaYellow
End With

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

• The online Support Forum on www.GoldenSoftware.com is a location to search


previous script discussions for examples. You may also post specific script
questions on the forum.

Creating and Printing a Contour Map


This example automates the process of creating a contour map to visualize changes in
groundwater levels. The script prompts the user for a data file, creates a grid from the
file, creates a contour map, prints the map, and saves the map in a Surfer file .SRF.

Sub Main
'Declare object and string variables used in the script
Dim SurferApp, Plot, ContourMapFrame, ContourMap As Object
Dim InFile, GridFile, BaseName As String

'Create the Surfer Application object and assign it to the "SurferApp"


'variable
Set SurferApp = CreateObject("Surfer.Application")
SurferApp.Visible = True 'Make Surfer visible

'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

'Get file name without the extension


' (for example, "week5.txt" becomes "week5")
BaseName = InFile
ExtStart = InStrRev(InFile,".")
If ExtStart > 1 Then BaseName = Left(InFile,ExtStart-1)

'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

'Create a plot document in Surfer and assign it to the

745
Surfer

'variable named "Plot"


Set Plot = SurferApp.Documents.Add(srfDocPlot)

'Create a contour map. Assign the map frame to the " ContourMapFrame"
variable
Set ContourMapFrame = Plot.Shapes.AddContourMap(GridFile)

'Assign the contour map properties to the variable named "ContourMap"


Set ContourMap = ContourMapFrame.Overlays(1)

ContourMap.FillContours = True 'Fill the contour map levels


Plot.PrintOut 'Print the page on the default printer
Plot.SaveAs(BaseName + ".srf") 'Save the map
End Sub

Opening, Saving, and Closing Documents


The Documents collection provides access to the Surfer file commands. Use the
Document object’s "Open" method to open an existing plot, worksheet, or grid file.
Use the Add method to create a blank plot or worksheet. The SaveAll method saves all
open documents, and the CloseAll method closes all open documents. To save or close
an individual document, use the Document object’s Save, SaveAs, and Close methods.
Sub Main
Set SurferApp = CreateObject("Surfer.Application")
SurferApp.Visible = True

' Create a blank plot


SurferApp.Documents.Add SurferAppDocPlot
' Create a blank worksheet
SurferApp.Documents.Add SurferAppDocWks

' Open an existing plot


filename$ = GetFilePath(,"SRF")
if filename$ <> "" Then
SurferApp.Documents.Open filename$
End If

746
Chapter 24 – Automating Surfer

' Open the sheet named "Sheet1" from an Excel file


filename$ = GetFilePath(,"XLS")
If filename$ <> "" Then
SurferApp.Documents.Open filename$, "Sheet=Sheet1"
End If

' Close the active document


SurferApp.ActiveDocument.Close

' Save the active document using its current name


If Not SurferApp.ActiveDocument.Saved Then
SurferApp.ActiveDocument.Save
End If

' Save the document whose window caption is "Plot1"


SurferApp.Documents("Plot1").SaveAs " MyDocument"

' Close all documents


SurferApp.Documents.CloseAll
End Sub

Creating a Variogram with Scripter


The Variogram object represents a variogram. A Variogram object is a type of Shape
object. Create a new Variogram using the Shapes collection’s AddVariogram method.
The AddVariogram method returns a reference to a Variogram object. Use the
properties and methods of the Variogram object to access information about the
computed variogram and to modify the options.

A VarioComponent object represents one component of a variogram model. When you


use the Kriging algorithm to create a grid file, you can specify the variogram model to
use by passing an array of VarioComponent objects to the Application object’s
GridData method. Create a VarioComponent by calling the Application object’s
NewVarioComponent method. Use the Variogram object’s Model property to obtain the
array of VarioComponent objects used by a variogram.

747
Surfer

The following subroutine creates a Variogram object, and then creates a grid file using
the computed variogram components.

Sub GridWithComputedVariogram(plot As Object, datafile As String, grid As


String)
' Create a variogram.
Set v = plot.Shapes.AddVariogram ( datafile, ShowReport:= False)

' Create a grid using the computed variogram


plot.Application.GridData DataFile:=datafile, Algorithm :=
SurferAppKriging, _
KrigVariogram := v.Model, _
ShowReport := False, OutGrid := grid

' Delete the variogram


v.Delete
End Sub

The next subroutine creates two VarioComponent objects and creates a grid based on
these variogram components.

Sub GridWithStaticVariogram(plot As Object, datafile As String, grid As


String)
' Get the Application object
Set SurferApp = plot.Application
'Create two VarioComponent objects and store them in an array
Dim components(1 To 2) As Object
Set components(1) =
SurferApp.NewVarioComponent(SurferAppVarNugget,1.0,2.0,3.0)
Set components(2) =
SurferApp.NewVarioComponent(SurferAppVarLinear,1.0,2.7,1.5)

'Create a grid using the two variogram components


SurferApp.GridData DataFile:=datafile, Algorithm :=
SurferAppKriging, _
KrigVariogram := components, _
ShowReport := False, OutGrid := grid

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)

' Create a grid using a pre-determined variogram model


GridWithStaticVariogram plot, " demogrid.dat", "VarioDemo1"

' Create a grid using a computed variogram model


GridWithComputedVariogram plot, " demogrid.dat", "VarioDemo2"
' Create contour maps to compare the two grids
plot.Shapes.AddContourMap "VarioDemo1"
plot.Shapes.AddContourMap "VarioDemo2"
End Sub

Overlaying Maps with Automation


To overlay maps in a script, you must first select the select the map or MapFrame
objects to be overlain, and then call the Selection collection’s OverlayMaps method.
The following subroutine demonstrates how to overlay maps:

Sub OverlayMapsExample(mapframe1 As Object, mapframe2 As Object)


' Retrieve the parent PlotDocument object
Set plot = mapframe1.Parent
' Clear all selections and then select the two MapFrame objects
plot.Selection.DeselectAll
mapframe1.Selected = True
mapframe2.Selected = True

749
Surfer

' Overlay the selected maps


plot.Selection.OverlayMaps
End Sub

The subroutine would be used like this:

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

' Turn off screen redrawing to speed up this procedure


old_update_setting = mapframe.Application.ScreenUpdating
mapframe.Application.ScreenUpdating = False

' Adjust the left and bottom axes


For Each axis In mapframe.Axes
If axis.AxisType = SurferAppATLeft Or axis.AxisType = SurferAppATBottom
Then
With axis
.MajorTickType = SurferAppTickCross
.MinorTickType = SurferAppTickIn
.MinorTickLength = 0.1
.MinorTicksPerMajor = 9
.ShowMajorGridLines = True
. AxisLine.Width = 0.03
End With
End If
Next

' Restore the previous screen setting


mapframe.Application.ScreenUpdating = old_update_setting
End Sub

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.

Formulas are specified using standard precedence rules. Operators, in order of


decreasing precedence, are:
( ) Parentheses
- minus (or negative sign)
*/ multiplication and division
+- addition and subtraction

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.

The expression evaluator treats operators with the following precedence:


1. !, NOT, ~
2. *, /, %
3. +, -
4. <<, >>
5. <, >, <=, >=
6. ==,!=,<>
7. &
8. ^, XOR

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

fabs(x) absolute value of x


fmod(x,y) floating point remainder of x/y, if y is zero, fmod returns zero
d2r(x) convert angle x from degrees to radians
r2d(x) convert angle x from radians to degrees. Example: sin(d2r(30))
computes the sine of 30 degrees. Sin(30) computes the sine of 30
radians

Statistical Functions of Intervals


sum(a..z) calculates the sum of a range of columns in a row
sum(_1.._5) calculates the sum of a range of rows in a column
avg(a..z) calculates the average of a range of columns in a row
avg(_1.._5) calculates the average of a range of rows in a column
std(a..z) calculates the (population) standard deviation of a range of
columns in a row
std(_1.._5) calculates the population standard deviation of a range of rows
in a column
rowmin(a..z) finds the minimum value of a range of columns in a row
rowmin(_1.._5) finds the minimum value of a range of rows in a column
rowmax(a..z) finds the maximum value of a range of columns in a row
rowmax(_1.._5) finds the maximum value of a range of rows in a column

• The Statistical Functions of Intervals functions operate row-wise on an interval of


columns or column-wise on an interval of rows.
• The Statistical Functions of Intervals do not operate on cells. The equation B1 =
avg(A1..A6) will result in only the average of row 1, not the average of the
specified cells.
• For example, SUM(A..Z) computes the sum of the twenty-six columns A, B, C, ...,
Z. It does this for each row separately.
• Replace 'a..z' by any valid interval of columns or rows, such as W..AC or _4.._612.
There must be exactly two periods between the column or row labels. The labels
may be given in reverse order, such as SUM(Z..A).

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.

The comparisons are based on the standard ASCII table:


1. numeric values (disregarded in string comparisons as mentioned above)
2. cells starting with a space character
3. common punctuation
4. numeric text (numbers entered as text)
5. less common punctuation
6. uppercase letters
7. even less common punctuation
8. lower case letters
9. uncommon punctuation
10. blank cells (disregarded in string comparisons)

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.

Example of a String Comparison


The following example shows a comparison of two strings in rows 1 and 2 with the
results displayed in row 4. STRCMP returns a 1 if row 1 is greater than row 2; -1 if row
1 is less than row 2, and 0 if row 1 is equal to row 2.

This table includes results of the string


comparisons based on the ASCII table. Cells
containing numbers and blanks are ignored.

This equation compares the strings in rows


1 and 2 and places the results in row 4.

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.

Logical Operators (and, or, xor, not)


SYMBOL NAME DESCRIPTION
AND AND The result is true if both operands are true.
&& AND The result is true if both operands are true.
! Logical NOT Inverts the boolean value. True becomes false,
false becomes true.
NOT Logical NOT Inverts the boolean value. True becomes false,
false becomes true.
& AND The result is true if both operands are true.
| OR The result is true is either of the two operands is
true
^ Exclusive-OR (XOR)
XOR Exclusive-OR (XOR) Same as ^
|| OR The result is true is either of the two operands is
true.
OR OR The result is true is either of the two operands is
true.

Comparison Operators (=, <>, <, >, <=, >=)


SYMBOL NAME DESCRIPTION
~ Bitwise NOT Inverts the bits in an integer
* Multiply Multiplies the two operands
/ Divide Divides the first operand by the second
% Remainder Integer remainder of the first operand divided by
the second.
+ Add Adds the two operands

759
Surfer

- Subtract Subtracts the second operand from the first


<< Shift Left Shifts the operand to the left
>> Shift Right Shifts the operand to the right
< Less Than In the example, A1 < B1, the result is true if A1 is
less than B1.
<= Less Than or Result is true if the ordinal value of p1 is less than
Equal To or equal to p2
> Greater Than Result is true if the ordinal value of p1 is greater
than p2
>= Greater Than or Result is true if the ordinal value of p1 is greater
Equal To than or equal to p2
== Equal To Result is true if the operands have identical values
!= Not Equal To Result is true if the operands do not have identical
values
<> Not Equal To Result is true if the operands do not have identical
values

IF Function - IF(condition, true_value, false_value)


SYMBOL NAME EXAMPLE DESCRIPTION
IF Conditional IF(p1,p2,p3) IF(condition,true_value,false_value)
Evaluation i.e. If p1 is true, the result will be
p2. If p1 is false, the result will be
p3.
IF Conditional p1?p2:p3 condition?true_value:false_value
Evaluation i.e. If p1 is true, the result will be
p2. If p1 is false, the result will be
p3.

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).

Equation Mathematical Function Syntax

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)

(x 2 + y 2 )(sin (8 × tan −1 xy )) ( pow(x,2)+ pow(y,2))*(sin(8*atan(x*y)))

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.

Math Text Instruction Syntax


Unless otherwise indicated, all math text instructions begin with a backslash ("\"), and
end with a single space. For example, the instruction "\up50 " shifts the baseline of
the text up 50 percent of the current text height. All characters from the beginning
backslash through the ending single space are interpreted as instructions by the math
text interpreter, and are not included in the resulting label.

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

Encapsulate Math Text Instruction


Math text instructions can also be encapsulated so they are not carried out over an
entire line. A left curly brace ("{") instructs the math text system to remember all of
the text properties in effect at that point. A right curly brace ("}") restores the
properties to what they were at the matching left curly brace. This allows the insertion
of special text in the middle of an otherwise uniform text block. The only instructions
this does not apply to are text baseline instructions (\dnX and \upX), and the position
instructions (\rpX and \spX). Curly braces can be nested.

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.

Instructions that Change Typefaces, Sizes, and Styles


Math Text Result
Instruction
\b All text after the \b command is bold.
\f"X" Change to the typeface named X. These are the names listed in
the Face drop-down list box in the Text dialog in the plot
window. Typeface names are case sensitive. Enclose the face
name in double quotes. If the typeface is not found, a generic
stick typeface is used in place of the unfound typeface.
\fsX Change font size to X% of current font size. For example, a
value of 200 for X increases the font size by two, and a value of
50 for X decreases the font size by one-half.
\i All text after the \i instruction is italicized.

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.

Instructions that Change Text Color


Math Text Result
Instruction
The following instructions are provided to make it easy to set basic text colors:
\black Sets the text color to black.
\blue Sets the text color to blue.
\green Sets the text color to green.
\cyan Sets the text color to cyan.
\red Sets the text color to red.
\magenta Sets the text color to magenta.
\yellow Sets the text color to yellow.
\white Sets the text color to white.
\gray Sets the text color to gray.
The following instructions allow the text color to be set to an arbitrary RGB
(Red,Green,Blue) value:
\rgbrX Sets the amount of red in an RGB text color (X=0 to 255).
\rgbgX Sets the amount of green in an RGB text color (X=0 to 255).
\rgbbX Sets the amount of blue in an RGB text color (X=0 to 255).

Instructions that Change Text Position


Math Text Result
Instruction
\dnX Moves text baseline down X% of current font size (subscript).
This instruction produces subscripts or returns the baseline to
the original position following a \upX instruction. If a font size
(\fsX) instruction follows the \dnX instruction, any subsequent
\dnX or \upX instructions are relative to the changed font size.
\rpX Restores the current position to position #X (X = 1 to 20). This

765
Surfer

instruction is used in conjunction with the \spX instruction.

Any text following this instruction begins at the position defined


with the \spX instruction. If the \rpX instruction is used without
first setting a position with the \spX instruction, the position for
the text is returned to the stating position for the text block.
\spX Saves the current position as position #X (X = 1 to 20). The
position is the up, down, left, and right areas within the text
block. When the \spX instruction is used, the current location
within the text block is assigned a position number. Return to
this position using the \rpX instruction. Specify the position
number assigned with the \spX instruction when using the \rpX
instruction. These instructions are most useful when placing
both superscript and subscripts after the same character.
\upX Moves the text baseline up X% of current font size
(superscript). This instruction is used to produce superscripts or
to return the baseline to the original position following a \dnX
instruction. If a font size (\fsX) instruction follows the \spX
instruction, any subsequent \upX or \dnX instructions are
relative to the changed font size.

Instructions Used to Insert Special Characters or Date and Time


Math Text Result
Instruction
\aX Insert an ANSI character with code given by X (0 to 255).
Generally, this instruction is needed for characters with ANSI
numbers beyond the normal limits of the keyboard. For
example, use the ANSI character code to include an integral
sign in a text string. By determining the character set, followed
by the \aX command to specify the correct character number.
For example, an integral sign is located at ANSI position 242 in
a symbol set called Symbol. Type \f"Symbol" \a242 for the
integral to appear in the text block.

The Character Map program is an accessory program in the


Windows installations. Use the Character Map to display each of
the available character sets with the ANSI code. The ANSI code
is displayed in the right half of the Character Map status bar
when a character is selected.
\date Inserts the current time. Be sure to follow this instruction with
a space, even if no other text follows the date. The date is

766
Appendix B – Math Text Instructions

updated every time the text is redrawn.


\time Inserts the current time. Be sure to follow this instruction with
a space, even if no other text follows the date. The date is
updated every time the text is redrawn.

Examples of Math Text Instructions


Due to page size limitations, some of these examples contain multiple lines of math
text instructions. These examples must be entered on one line for the text to be
displayed correctly.

Math Text Instruction Result


CO\dn50 2 CO2
x\up50 2 x2

∑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

{\fs50 2}\dn50 }(X) = 1

104\f"Symbol" \a176 \f"Arial" 37' 104 37'


\sp1 \up25 a\dn25 {\fs75 c}\rp1 ___\rp1
\dn100 b\dn25 {\fs75 c} ac
___
bc
{\f"Symbol" d}\up50 {\fs75 234}\dn50 U
δ234U

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.

File Format Chart


There are a number of important distinctions that can be made for different file types
because each file format uses a unique set of characteristics. The important file format
characteristics are outlined in the following table:

File File Name Import Export Coordinate Drawing Text Content


Format Type1 Properties2 Blocks3 Type4
?10G Globe DEM X13 G

ACCDB Microsoft X14 D


Access
ADF ESRI ArcInfo X13 X10 G
Binary Grid

AGR ArcInfo ASCII X13 X10 G


Grid

AIG ArcInfo ASCII X13 X10 G


Grid

AM Amira Mesh X13 X10 G


AN? ACR-NEMA X12, 13 P R
Medical
Image
ASC ArcInfo ASCII X13 X10 G
Grid
ASC CPS-3 Grid X13 G
Format

769
Surfer

ASC Z-Map Plus X13 G


Grid Format
ASCII ASCII Data X14 X9 R D
Data Files (CSV,
DAT, TXT)
ASI Amira X13 R and V
Stacked
Images

BIL Banded X13 X10 G


Interleave
Grid By Line

BIN Raw Binary X13 X10 G


Grid
BIP Banded X13 X10 G
Interleave
Grid By Pixel
BLN Golden X12, 14 X9, 11 R V
Software
Blanking
BMP Windows X12,13 X 11 P
Bitmap
BNA Atlas X12, 14 X9, 11 R V, D
Boundary
BSQ Banded X13 X10 G
Sequential
Grid
BW SGI-RGB X12,13 P G
Image
CGM Computer X11 O X X R and V
Graphics
Metafile
CLP Windows Paste Copy O X X R and V
Clipboard
COL Amira Mesh X13 X10 G
CPS CPS-3 Grid X13 G
CPS3 CPS-3 Grid X13 G
CSV Comma X 14 X9 V
Separated
Variable
DAT CPS-3 Grid X13 G
DAT ETOPO-5 X13 G
DAT Z-Map Plus X13 G
Grid
DAT Data X 14 X9, 10 D
DBF Database X14 D
DCM DICOM3 X12, 13 P
Medical
Image

770
Appendix C – File Formats

DDF SDTS X12 R V


Topological
Vector Profile

DDF SDTS Digital X13 G


Elevation
Model
DEM USGS Digital X13 X10 G
Elevation
Model
DIC DICOM3 X12, 13 P R and V
Medical
Image
DLG USGS Digital X12 R V
Line Graph
DOS ETOPO-5 X13 G
DTED Digital X13 G
Terrain
Elevation
Data
DXF AutoCAD DXF X12 X5, 11 RO some some V
E008 ESRI ArcInfo X12 R X V
Export
Format
ECW ER Mapper X12,13 R
EMF Windows X12 X11 O X X R and V
Enhanced
Metafile
EPS Encapsulated X11 P X R
Postscript
ERS ER Mapper X13 X10
Grid
FLD AVS Field X13 X10, 11 V
FLT ESRI Float X13 X10 G
Grid Format
GGF Geosoft X10 G
Binary Grid
GIF Image X12,13 X11 P
GRD ArcInfo ASCII X14 X11 D
Grid
GRD CPS-3 Grid X13 G
Format
GRD Surfer Grid X13 X10 G
GRD Geosoft X13 X10 G
Binary Grid
GRD Z-Map Plus X13 G
Grid Format
GSB Golden X12 X11 R V
Software

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

PNG Portable X12, 13 X11 P


Network
Graphics
PNM Image X12, 13 X11 P
PPM Image X12, 13 P
RAS Sun Raster X12, 13 X11 P R and V
Image
RAW Binary Grid X 13 X10
RGB SGI-RGB X12, 13 X11 P
Image
RGBA SGI-RGB X12, 13 X11 P
Image
RST Idrisi Raster X13 P R
Image
SHP ESRI X12 X6, 11 R V
Shapefile
SID LizardTech X12, 13 P,R
MrSID Image
SLK Sylk X14 X9 R D
Spreadsheet
STK Metamorph X13 R
SUN Sun Raster X12, 13 X11 P
Image
TGA Targa X12, 13 X11 P
(TrueVision)
TIF Tagged X12, 13 X11 P,R
Image
TXT Text Data X14 X7,9 D,G
VTK Visualization X12, 13 X10 P V
Toolkit
WK? Lotus 1-2-3 X14 D
and
Symphony
WMF Windows X12 X11 O X X R and V
Metafile
WRK, Lotus X14 D
WR1 Symphony
Worksheet
X, XIMG AVS X-Image X12, 13 X11 P R
XLS Excel X14 X9 D
Spreadsheet
XLSX Excel X14 R D
Spreadsheet
2007
XYZ Z-Map Plus X13 G
Grid Format
ZMAP Z-Map Plus X13 G
Grid Format
ZYC, Z-Map Plus X13 G
ZYCOR Grid Format

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.)

2 Contains properties such as line color, fill, etc.


3 Text blocks are editable. (When the All text as lines option is chosen in the export
options, the text is not editable.)
4 Files can contain raster (image) information, vector (lines) information, or both.
There is no raster to vector conversion in Surfer.
If you have an image on screen and try to export it as a vector format, such as a DXF,
the resulting file will be blank. If you have an image on the screen and have drawn
polylines or polygons and export as a vector format, only the drawing objects are
included in the file.
V = contains vector information only
R = contains raster information only
R and V = contains raster and vector information
D = contains data information
G = contains grid information
5 3D DXF files can be exported using the Map | Export Contours command.
6 2D and 3D SHP files can be exported using the Map | Export Contours command.
Each .SHP file is usually accompanied by files with the same name, but with the .SHX
and .DBF extensions. These files are not used in Surfer.
7 TXT files can be exported using the Map | Export Contours command. 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.
8 The .E00 file format is not publicly documented by ESRI. Although Golden Software
has tested this .E00 import filter software with a number of publicly available .E00
files, it may not be compatible with all .E00 files created by all versions of ESRI
application programs. Golden Software is not affiliated with ESRI, and this import filter
software is not a product of, nor endorsed by, ESRI.
9 The File | Save As command in the worksheet can be used to save this format.
10 The File | Save As command in the grid node editor or one of the grid menu
commands in the plot window can be used to save this format with the Save Grid As
dialog.
11 The File | Export command in the plot window can be used to save this format.

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.

Surfer 6 Text Grid Format


Surfer 6 text grid files (.GRD) contain five header lines that provide information about
the size and limits of the grid, followed by a list of Z values. The fields within ASCII
grid files must be space or tab delimited.

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.

The general format of an ASCII grid file is:


id The identification string DSAA that identifies the file as an ASCII
grid file.

nx ny nx is the integer number of grid lines along the X axis (columns)


ny is the integer number of grid lines along the Y axis (rows)

xlo xhi xlo is the minimum X value of the grid


xhi is the maximum X value of the grid

ylo yhi ylo is the minimum Y value of the grid


yhi is the maximum Y value of the grid

zlo zhi zlo is the minimum Z value of the grid


zhi is the maximum Z value of the grid

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

Level File Format


Level .LVL files are used to specify level and property data for various map types
within Surfer. Level files are ASCII files with one record per line. Fields within the line
are separated by commas or white space. Comments are delimited by a single quote
character, and may be placed at the beginning of a line or the end of a record.

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

The fields are space delimited and defined as follows:


Element Description
Level Level is the Z value of the level.
Flags Flags represents labels and hachures where 0=normal (no
labels, no hachures), 1=labeled, 2=hached, and 3=labeled
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.

777
Surfer

LWidth LWidth is the line width in mils (thousandths of an inch).


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.
FMode FMode is the background mode for patterns where
1=transparent and 2=opaque.

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

The fields are space delimited and defined as follows:


Element Description
Level Level is the Z value of the level.
Flags Flags represents labels and hachures where 0=normal (no
labels, no hachures), 1=labeled, 2=hached, and 3=labeled

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

Color Spectrum File Format


Color spectrum files .CLR are used to define a spectrum, or continuous gradation of
colors. This is specified by a series of anchor points with associated colors. The colors
between anchor points are interpolated from the nearest anchor points.

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.

The header consists of the following space-delimited fields:


Element Description
Id case-sensitive string "ColorMap" without the quotes
Version format version number, this should be set to 1 or 2
InterpMethod interpolation method between anchors, this should be set to 1

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.

Alpha is not included in Version 1 files.

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.

Invisible .4 in. Dash Dash Dash Dot


Solid .5 in. Dash Dash Dash Dot Dot
.1 in. Dash Dash Dot Dash Dash Dot Dot
.2 in. Dash Dash Dot Dot Dot
.3 in. Dash Dash Dot Dot Dot

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.

Select a pattern from the fill palette.

Stock Windows Patterns


None 20 Percent Light Downward
Solid 25 Percent Diagonal
Horizontal 30 Percent Light Upward
Diagonal
Vertical 40 Percent
Dark Downward
Forward Slash 50 Percent Diagonal
Backward Slash 60 Percent Dark Upward
Crosshatch 70 Percent Diagonal
Diagonal Cross 75 Percent Wide Downward
5 Percent 80 Percent Diagonal
10 Percent 90 Percent

783
Surfer

Wide Upward Dashed Horizontal Dotted Diamond


Diagonal Dashed Vertical Shingle
Light Verticle Small Confetti Trellis
Light Horizontal Large Confetti Spheres
Narrow Vertical ZigZag Small Grid
Narrow Wave Small
Hortizontal Checkerboard
Diagonal Brick
Dark Vertical Checkerboard
Horizontal Brick
Dark Horizontal Outlined Diamond
Weave
Dashed Downward Solid Diamond
Diagonal Plaid
Dashed Upward Divot
Diagonal Dotted Grid

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

White Marble Medium, poorly- Basalt


BIF graded sand 2 Basalt 3
Black Marble Loose, medium- Basalt 4
graded gravel
Gneiss 3 Greenschist
Medium graded
Granite 3 sand Greenschist 2
Granite 4 Coarse Diorite
Granite 5 crossbedded Granodiorite
Green Marble gravel Granodiorite 2
Orbicular Granite Medium, well- Granodiorite 3
sorted sand
Oxidized Zone Hornfels
Inorganic silt 1
Pahoehoe Hornfels 2
Inorganic silt 2
Pink Marble Carbonatite
Inorganic silt 3
Pumice Kimberlite
Inorganic silt 4
Ruby Zoisite Dendrites
USGS 207
Scoria Calc-silicate
USGS 214
Zebra Dolomite Oolite
USGS 215
Sand and Gravel Med
USGS 216 unconsolidated
Coarse sand
USGS 217 sediment
Well graded
coarse sand USGS 218 Fine
USGS 219 unconsolidated
Coarse, medium- sediment
graded sand USGS 226
Jointed/Fractured
Coarse, well- USGS 228 rock
graded sand USGS 229 Gneiss USGS 2
Coarse, well- USGS 230
graded sand 2 Gneiss USGS
USGS 231 Clastic dike
Fine, well-graded
sand Intrusive igneous Glacial-1
1
Fine, poorly- Glacial-2
graded sand Intrusive igneous
2 Rhyolite USGS
Medium, poorly- Rhyolite USGS 2
graded sand Intrusive igneous
3 Dacite
Coarse,
crossbedded sand Intrusive igneous Salt 1
4 Salt 2

785
Surfer

Volcanic A Argillaceous Cherty clastic


Volcanic B sandstone limestone
Bedded tilted Calcareous Oolitic limestone
sandstone sandstone Sandy limestone
Sandy gravel Dolomitic Silty limestone
sandstone
Volcanic tuff Argillaceous
Loess shaley limestone
Rhyolitic tuff
Silty shale Cherty limestone
Algal mats
Calcareous 1
Lignite siltstone Cherty limestone
Fine, poorly- Dolomitic 2
graded sand 2 siltstone Dolomitic
claystone Silty shale 2 limestone
Marsh Clay shale Dolomite USGS
Periglacial-1 Cherty shale Crossbedded
Periglacial-2 Dolomitic shale dolomite
Periglacial-3 Calcareous shale Oolitic dolomite
Periglacial-4 or marl Sandy dolomite
Periglacial-5 Carbonaceous Silty dolomite
Gravel or shale Argillaceous
conglomerate 1 Oil shale dolomite
Gravel or Chalk Cherty dolomite
conglomerate 2 Limestone USGS Bedded chert 1
Crosbedded gravel Clastic limestone Bedded chert 2
Till or diamicton Fossiliferous Fossiliferous
Breccia 1 limestone bedded chert
Breccia 2 Nodular bedded Fossiliferous
Massive sand limestone rock
Bedded sand Limestone w/ Diatomaceous rock
saccharoidal Subgraywacke
Crossbedded sand
Crossbedded Crosbedded
Crossbedded sand limestone
2 subgraywacke
Cherty Ripple-bedded
Ripple-bedded crossbedded
sand graywacke
limestone
Peat
Bony coal
786
Appendix D – Line Styles, Fill Patterns, and Colors

Underclay Interbedded Volcanic breccia


Flint clay limestone 1 Zeolitic rock
Bentonite Interbedded Basaltic flows
limestone 2
Glaconite Banded igneous
Interbedded rock
Limonite limestone 3
Siderite Granite 2 USGS
Interbedded
Phosphatic rock limestone 4 Igneous rock 1
Gypsum Metamorphism Igneous rock 2
Salt 3 Quartzite USGS Igneous rock 3
Interbedded Slate USGS Igneous rock 4
sandstone Schistonse Igneous rock 5
Interbedded Schist USGS Igneous rock 6
sandstone 2 Igneous rock 7
Contorted schist
Ripple-bedded Igneous rock 8
sandstone Schist and gneiss
Gneiss Pophyritic rock 1
Interbedded shale
Contorted gneiss Porphyritic rock
Interbedded shale 2
2 Soapstone
Vitrophyre
Interbedded shale Tuffaceous rock
3 Quartz
Crystal tuff
Interbedded Ore
Devitrified tuff
calcareous shale
Volcanic breccia
Interbedded silty and tuff
limestone

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

Select a color from the color palette.

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

polygons and polylines · 283 terrain aspect · 560


symbol properties · 283 terrain slope · 559
basis function · 187 Cartesian data · 354
biharmonic operator · 567 central weight · 514
bi-linear saddle · 185 changing drawing order · 639
blank edge of grid · 517 classed post map · 17
blank node classical variogram estimator · 218
grid node editor · 538 coefficient of kurtosis · 124
blank node if more than this many coefficient of skewness · 123
sectors are empty · 153 coefficient of variation · 123, 195
blanked nodes · 519 coefficient of variation filter · 516
blanked regions commands · 7
in volume calculations · 576 compass gradient filters · 517
blanking values confidence interval · 121
gridding search · 154 contact information · 23
block kriging · 175 contour levels · 250
bold text · 7 grid node editor · 538
boundary number · 589 contour lines
boundary tension · 180 "wrong" relative to data · 161
gradational · 258
contour map · 16
C
convergence · 179
calculus · 573
coordinate system · 14, 19
biharmonic operator · 567
creating grid files · 138
correlogram · 570
creating maps · 15
differential and integral
operators · 566, 568 critical value of the K-S
statistic · 125
directional derivatives · 558
cross section · 575
first derivative · 554
accumulated horizontal
Fourier and spectral analysis · distance · 589
573
boundary number · 589
integrated volume · 567
cross validate ·150
Laplacian operator · 566
references · 150
second derivative · 555
steps · 147
tangential curvature · 564

791
Surfer

cubic surface · 185 nugget effect · 235


cubic variogram model · 228 slope · 235
curvature default method
tangential · 564 variogram autofit · 226
customize · 13 default R2 · 188
cut and fill volume · 575 Delaunay triangulation · 182, 189
cyclic wrap edge of grid · 518 DEM · 137
derivatives · 58

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

median difference · 516 G


minimum · 515
Gaussian low-pass filter · 514
mirror edge · 518
Gaussian variogram model · 228
moving average · 513
general page
neighborhood · 510
new variogram · 213
nonlinear · 517
general recommendations
order 1 derivative · 515
gridding · 161
order 2 derivative · 515
general user-defined filter · 514
predefined · 514
get variogram · 174, 236
Prewitt · 517
gradational line properties · 258
range · 515
gradient directional filters · 515
references · 519
gradient operator · 566
replicate edge · 518
graphics
Robinson 3-level · 517
importing · 597
Robinson 5-level · 517
grid
shift and difference · 515
calculus · 573
standard deviation · 515
data · 169
threshold averaging · 516
defined · 137
upper quartile · 515
filter · 519
user-defined · 513
function · 202
variance · 515
math · 356
first derivative · 554
slice · 587
first input row · 119
standard deviation · 174
first quartile · 120
variogram · 236
fit criteria
volume · 568, 575
variogram autofit · 226
grid calculus · 573
forum · 7
grid density
Fourier and spectral analysis · 573
defining · 145
Fourier frequency · 572
grid file
function · 202
X component · 354
function type · 187
Y component · 354
grid files · 167
creating · 138
794
Index

formats · 137 default · 161


volume between · 575 exact interpolators · 167
grid filter · 519 inverse distance to a power ·
grid function · 202 72

grid info · 543 kriging · 176

grid node editor · 539 minimum curvature · 180

grid line geometry · 146 modified Shepard's method ·


182
example · 143
natural neighbor · 183
grid node · 137
polynomial regression 186
weighted average · 168
radial basis function · 189
grid node editor
recommendations · 161
blank node · 538
smoothing interpolators · 167
contour levels · 538
triangulation with linear
show contours · 538 interpolation · 190
show nodes · 538 gridding options · 150
unblank node · 539 GTopo30 · 137
grid spacing · 145
grid volume report · 575
H
gridding · 15
HDR · 137
cross validate · 150
help · 7, 23
faults · 160
helpcontents · 7, 21
functions · 202
helpfeedback · 23
large data sets · 166
helponline · 7, 15
minimum number of points ·
140 helpproblem report · 23
moderate-sized data sets · 166 help button · 782
overview · 137 high-pass filters · 514
regularly spaced data · 201 histogram
small data sets · 166 variogram · 233
gridding methods honoring data · 161, 167
choosing · 168 horizontal distance
comparing · 161 cross section · 589
comparison · 162 horizontal planar grid · 192
data metrics · 198

795
Surfer

I get variogram · 236


references · 176
ignore blanked region
standard deviations · 174
filter · 519
using variogram results in ·
ignore edge of grid · 517 236
image map · 17 variogram components · 206
import variograms · 172
maps and graphics · 597
index
symbol · 300
L
initial lag direction · 216

variogram autofit · 228 lag width · 219

input grid file · 543 smoothing variograms · 220

insert grid nodes · 521 Laplacian operator · 566

install · 4 last input row · 119

integrated volume · 567 layers · 18

internal tension · 180 least absolute value

interpolation · 167 variogram autofit · 226

weighted average · 168 least squares

interquartile range · 195 variogram autofit · 226

inverse distance filter · 513 leave blanked region

inverse distance to a power · 161, 167, filter · 519


168, 172 length
equations · 170 variogram · 211, 222
references · 172 variogram model · 222
inverse multiquadric · 187 length (A)
italic text · 7 variogram · 228
length grid · 357

K length scale · 206


levels · 250
Kirsch filter · 517
limits
knowledge base · 7
grid · 143
Kolmogorov-Smirnov goodness of fit ·
124 line properties
kriging · 161, 166, 167, 168, 176 base map · 283

796
Index

gradational · 258 mapcontour · 16


linear convolution filters · 515 mapcreating · 15
linear detrending · 214 mapimage · 17
linear drift · 175, 176 maplayers · 18
linear model · 223 mapnew · 15
slope · 223 mappost · 17
linear symbol scaling · 306 mapshaded relief · 17
linear variogram · 172 maptypes · 16
defined · 235 mapvector · 17
nugget effect · 235 map layer · 18
slope · 235 map object · 18
standard deviation grid · 174 map types · 16
linear variogram model · 228 math · 356
local polynomial · 162 max lag dist · 219, 220
equations · 198–200 max lag distance · 214
logarithmic variogram model · 228 variogram autofit · 227
lower quartile · 194 max total order · 186
lower quartile filter · 515 max X order · 186
lower surface · 575 max Y order · 186
low-pass filter · 514 maximum · 194
low-pass filters · 514 variogram autofit · 228
maximum distance

M variogram autofit · 227


maximum filter
M.A.D. · 196
maximum · 515
magnitude
maximum iteration · 179
2-grid vector map · 354
maximum iterations
mailing address · 23
variogram autofit · 227
managers · 13
maximum number of data to use from
map all sectors · 153
map3D surface · 18 maximum number of data to use from
map3D wireframe · 18 each sector · 153
mapbase · 16 maximum residual · 179
mapclassed post · 17 maximum value · 119

797
Surfer

mean · 120, 195 model line


median · 120, 194 variogram model · 234
median absolute deviation · 196 model page · 225
median difference filter · 516 autofit · 225–28
median distance · 197 modified Shepard's method · 161, 167,
median filter · 515 168, 182

menu bar · 9 quadratic neighbors · 181

menu commands · 7 references · 182

mesh · 18 weighting neighbors · 182

metrics · 198 moving average · 162

micro variance · 224 moving average filter · 513

middle value · 120 multilog · 187

midrange · 195 multiquadric · 186, 187

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

micro variance · 224 P


smoothing · 223
pair comparison files · 207
number of lags · 219, 220
pairs · 211
number of missing values · 119
variogram model · 233
number of sectors to search · 152
parameter fit limits · 228
number of values · 119
pentaspherical variogram model · 228
planar area · 575
O planar grid · 192
object manager · 9 plot page
observation variogram · 233
variograms · 217 point kriging · 175
offset distance · 197 polygon
offset transform · 544 base map · 283
online help · 7, 15 polynomial regression · 162, 166, 168,
opacity · 18 186

open references · 186

open Scripter · 16 post map · 17

operation data values for symbol size ·


306
transform · 543
linear symbol scaling · 306
options
square root symbol scaling ·
blank node · 538 307
contour levels · 538 symbol height · 306
grid info · 539 Powell's search method · 225
grid node editor · 538, 539 power · 513, 514
gridding · 150 power variogram model · 228
show contours · 538 predefined filters · 514
show nodes · 538 preserve data values · 161
unblank node · 539 Prewitt filter · 517
order 1 derivative filters · 515 prisms · 576
order 2 derivative filters · 515 problem report · 23
other Z statistics · 196 property manager · 9
output grid of kriging standard
deviations · 174

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

R minimum curvature · 180


modified Shepard's method ·
R.M.S. · 196
182
R2 · 168, 188
natural neighbor · 183
radial basis function · 162, 166, 167,
polynomial regression · 186
168, 189
radial basis function · 189
inverse multiquadric · 187
statistics · 125
multilog · 187
triangulation with linear
multiquadric · 187
interpolation · 190
natural cubic spline · 187 volume · 587
references · 189
regularly spaced data · 201
thin plate spline · 187 relative weighting · 155
radial divisions · 214
relaxation factor · 180
radius replicate edge of grid · 518
linear variogram model · 223
report · See online help
radius 1 variogram · 233
search ellipse · 154
residuals · 575
radius 2 Robinson 3-level filter · 517
search ellipse · 154
Robinson 5-level filter · 517
range · 119, 195, 206 root mean square · 196
variogram · 222
rotate transform · 544
range filter · 515
ratio
anisotropy · 156, 224
800
Index

S sill · 206, 210


simple planar surface · 185
sample files · 14
slice · 575, 587
scale · 210
slope · 559, 566
linear variogram model · 223
default linear variogram · 235
variogram models · 222
linear variogram model · 223
scale (C)
variogram · 211
variogram · 228
smoothing · 167
scale transform · 544
inverse distance to a power ·
Scripter · 15 169
SDTS · 137 smoothing factor · 181
search smoothing interpolators · 167, 168,
rules · 152 223
search ellipse · 153 source coordinate system · 19
angle · 154 spacing · 145, 146, 206
anisotropy · 155 spherical model · 222
radius 1 · 154 spherical variogram model · 228
radius 2 · 154 spline smooth
X axis · 154 expand grid · 521
search options square root symbol scaling · 307
defining · 154 SRF · 14
search rules standard deviation · 122, 195
blanking values · 154 standard deviation filter · 515
second derivative · 555 standard deviation of means · 120
separation angle · 209 standard error of the mean · 120
separation distance · 209, 222 standardized variogram · 174, 217
serial number · 22 standardized variogram estimator ·
shaded relief map · 17 218

Shepard's method · See modified starting Scripter · 16


Shepard's method statistics · See also statistic name
shift and difference filters · 515 references ·125
show contours · 538 worksheet ·125
show nodes statistics page
grid node editor · 538 variogram · 232

801
Surfer

status bar · 9 thin plate spline · 187


step amount · 217 third quartile · 120
step CCW · 217 threshold averaging filter · 516
step CW · 217 title bar · 9
sum · 119, 196 tolerance
support forum · 7 variogram · 216
surface area · 575 toolbars · 9
surface definition · 185 tour · 14, 15
surface map · 18 transform
symbol mirror X · 544
variogram model · 233 mirror Y · 544
symbol height offset · 544
post map · 306 rotate · 544
symbol index · 300 scale · 544
symbol properties transparency · 15, 18
base map · 283 triangulation · 182, 189
symbol set · 300 triangulation with linear interpolation ·
162, 166, 167, 190
references · 190
T
tabs · 9
tangential curvature · 564
U
target coordinate system · 20 unblank node

target precision grid node editor · 539

variogram autofit · 227 uninstall · 6

technical support · 22 update · 5

terrain aspect · 198, 560 upper quartile · 194

terrain model upper quartile filter · 515

tangential curvature · 564 upper surface · 575

terrain aspect · 560 user defined polynomial · 185

terrain slope · 559 user-defined filters · 513

terrain slope · 198 USGS DEM · 137

terrain statistics · 198 using Surfer · 15

Thiessen polygons · 182 using variogram results in kriging · 236

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

nesting · 228 Cartesian data · 354


nugget effect · 223, 228 X and Y component data · 354
pentaspherical · 228 version number · 22
power · 228 vertical scale · 220
quadratic · 222, 228 volume · 568, 575
rational quadratic · 228 increasing accuracy · 576
spherical · 222, 228 prisms · 576
symbols · 233, 234 reference · 587
variance line · 234
wave (hole effect) · 228 W
variogram modeling
wave (hole-effect) variogram model ·
overview · 205 228
variogram models wave number · 572
scale · 222 web · 23
variogram properties web address · 23
anisotropy · 224 weighted average interpolation · 168
autofit model · 225–28 weighted averaging · 167
estimators · 217 weighting
experimental page ·220 anisotropy · 155
lag direction · 216 inverse distance to a power ·
lag width · 219 169
max lag dist · 219, 220 weighting neighbors · 182
model page · 225 wireframe map · 18
number of lags · 219, 220 worksheet statistics · 125
plot page · 233
separation distance · 222 X
step amount · 217
X axis
step direction · 217
search ellipse · 154
tolerance · 216
X component data · 354
vertical scale · 220
X component grid · 354
variograms · 172
X coordinate · 589
vector example · 355
X grid lines · 137
vector map · 17
X offset · 544
804
Index

X scale · 544 Y offset · 544


X, Y, Z histogram Y scale · 544
variograms · 233
XYZ data · 15 Z
to grids · 137
Z moment statistics · 195
XYZ data files · 143
Z order statistics · 194
creating grids from · 138
Z value · 589
Z value array · 202
Y z values
Y component data · 354 z valuescontour · 16
Y component grid · 354 z valuesimage · 17
Y coordinate · 589 z valueswireframe · 18
Y grid lines · 137

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

Golden Software Contact Information


www.GoldenSoftware.com
[email protected]
phone: 303-279-1021
fax: 303-279-0909

You might also like