Gridding Data

Typically, data files contain randomly spaced points and the data must be converted to an evenly spaced grid, also known as a raster, to create a map. In Surfer, the process of converting randomly spaced data into an evenly spaced grid is called gridding. You might also hear it referred to as data interpolation. Surfer is well-known throughout the industry for its powerful and accurate gridding algorithms.

Once you have an evenly spaced grid, it can then be used to generate a contour map or any other grid-based map like color relief, peaks and depressions, watershed, or 3D surface.

In this lesson we will outline the process of creating a grid and contour map from the ground water elevation dataset.

Data for gridding can have X & Y coordinates in any coordinate system. The Z value can represent anything associated with those coordinates like chemical concentrations, electrical resistivity, or elevation. In this example we are using an XYZ dataset with lat/lon XY coordinates, and water-level elevation (Z) data in feet.

  1. Click the Plot1 tab just below the ribbon leaving the Worksheet tab open.

    Reminder: A Plot document is required to create a map because it houses all objects included in a project.

  2. Click the Home | Grid Data | Grid Data () command.

  1. In the Grid Data - Select Data dialog the data type, dataset, variable columns and gridding method are defined.

  2. Click Browse and select the Well_measurements.xlsx from the Samples directory (C:\Program Files\Golden Software\Surfer\Samples by default)

    For datasets previously opened in Surfer, click in the Dataset field to see a list of recent data files.

  3. Assign the corresponding columns to your X, Y, and Z variables. By default, Surfer assigns columns A, B, and C as the X, Y, and Z variables.

    In this example
    X = Column C: Longitude
    Y = Column B: Latitude
    Z = Column F: Water-level elevation, in feet

    If you completed the Data Best Practices lesson and still have the worksheet open, this step will not be necessary!

  4. Select Kriging in the Gridding Method section.

  5. Click Skip to End to continue the gridding process.

To further refine the gridding algorithm, click Next instead of Skip to End. This will bring up additional gridding settings. For most datasets, the default settings work well. See Grid Data - Options to learn more about the additional grid settings.

After you click Skip to End you will be taken to the final page of the Grid Data dialog, the Output section. Here you can alter the geometry of your final grid, set the location to save your grid file, and choose to add the grid as a specific map layer.

To finish the gridding process and generate a new contour map:

  1. Click in the # of Nodes field for the X Direction and enter 300.

  2. Click in the # of Nodes field for the Y Direction and enter 371.

    The # of Nodes for a grid file is similar to the number of pixels in an image. A resolution of 300-500 nodes in both directions is a good quality for most datasets. A resolution of 600 or more in both directions is high resolution and will result in much larger files.

  1. Click the folder icon next to Output Grid and set the location to save your grid file.

    Most Windows user accounts cannot save new files to the Samples directory. If you do not choose a new location, an error will be displayed after clicking Finish.

  2. Check the box next to Grid Report to generate a report with detailed statistics on the gridded dataset.

  3. Check the box next to Add grid as layer to and select [New Map] from the drop down menu.

  4. Select Contour in the New layer type field.

  5. Click Finish.

    In a matter of seconds, Surfer transforms the irregularly spaced dataset into an evenly spaced grid, adds a new contour layer, saves the GRD file, and compiles the grid report.

  1. Click OK in the Export Options dialog.

    By default, Surfer will create a GS Reference (Version 2) file with the coordinate system information for the new grid file. If you plan to use the file in another program additional reference file types may be needed.

  2. Click OK to close the Surfer dialog stating the grid file was created.

The Gridding Report is a powerful resource for to leverage. It records the exact gridding parameters used for a quick quality assurance check and future reproduction. Also included are grid statistics that provide important insights into spatial patterns and variability of the data so you can identify trends, anomalies, and areas of interest.

You should now have a contour layer of the site's groundwater elevation in the Plot Document window and a separate window containing the Gridding Report.

  1. Click File | Close in the GridDataReport window.

    We recommend saving this report for future reference in most cases but it is not needed today.

The grid file (.GRD) can be used to create additional grid based maps in the future. Click Home | New Map | Color Relief or your preferred map type, and select the grid file from your file directory.

Before we proceed, save let's save our work!

  1. Click File | Save or the Save icon () and save your file as a Surfer Plot (*.srf) file in your preferred file location.

A SRF file is Surfer's project file format. By saving as a SRF you can close and open your project at any point to resume editing as the SRF file includes all the associated data.

 

To prevent accidental loss of work in the future, we recommend turning on a few important settings. Your future self will thank you!

  1. Click File | Options.

  2. From the General section check these two boxes,

    1. Backup files before saving. Sometimes data gets corrupted and cannot be recovered. This safeguard creates backup files you can roll back to should this ever happen.

    2. Save auto recovery information. Surfer will save your work automatically and should Surfer ever closes unexpectedly, your project can be automatically restored.

It's time to elevate your contour map into a stunning visual that is guaranteed to leave an impression.

Let's customize these contours...

Back to Data Best Practices

Next to Changing Map Properties