Restrict grid results to a specific area in Surfer

You can constrain the gridded area (or contours) to the area inside the data area in Surfer. This article covers all the methods available to restrict the 2D or 3D grid results to the data limits during gridding in Surfer. If you are interested in the options available to do this after the grid has been created, see Create an irregular-shaped map in Surfer.

 

The following topics are covered in this article: 

  1. Assign NoData outside the convex hull of data
  2. Assign NoData outside an alpha shape
  3. Assign NoData to the grid outside a polygon
  4. Use a fault file to define your data limits
  5. Use a breakline to define a boundary
  6. Grid the data and specify a reduced search radius

 

Assign NoData outside the convex hull of data

  1. Click Home | Grid Data | Grid Data.
  2. In the Grid Data - Select Data dialog, click Browse in the Dataset 1 field, select the data file and click Open.
  3. Assign the X, Y, and Z data columns.
  4. Click Skip to End.
  5. On the Output page of the Grid Data dialog, check the box Assign NoData outside convex hull of data. This automatically assigns the NoData value to the area outside the convex hull of the data points.

grid_data_output_assign_nodata.png
Surfer Grid Data dialog with Assign NoData outside convex hull of data option enabled

 

If you wish to constrain the gridding inside an even tighter boundary around your data than the convex hull, use one of the following methods.

 

Assign NoData outside an alpha shape

Assign NoData to grid nodes outside of an alpha shape directly in the Assign NoData, Grid Data, and Grid from Contours dialogs! The Alpha Shape allows you to create a tight polygon boundary around your data points, much like the existing Convex hull option. The Alpha shape can create a concave or convex hull around data points, you control on how tight the polygon clings around the data limits. 
Grid data in Surfer and assign NoData values to areas outside the alpha shape

Create an alpha shape and use it to assign NoData values when gridding your data.

 

  1. Click Home | Grid Data | Grid Data. 
  2. Import the data file and fill out the Grid Data dialog as normal. Learn more in the knowledge base article Gridding Data in Surfer
  3. Click Skip to End >> or click Next> until the Grid Data - Output page is showing. 
  4. Change the Assign NoData outside of field to Alpha Shape. 
  5. Change the Alpha value field if desired. The larger the value the more convex the polygon will be, and the smaller the number the move concave the polygon will be. 
  6. Alternatively, if you created an alpha shape in a Base(vector) layer or vector file, import this file into the Assign NoData section. 

GridData.png

 

A Video Tutorial detailing Assigning NoData with an Alpha Shape can be found here.

 

Assign NoData to the grid outside a polygon

First, create a vector boundary file (BLN, SHP, DXF, etc.) defining the outline of your data points. After the boundary file is created, grid your data as normal by clicking Home |  Grid Data | Grid Data, select the data file and specify any gridding parameters you wish. On the Output page, select your polygon boundary, toggle NoData Outside, and click Finish. Create a BLN boundary file or other vector file defining the outline of your data points.

 

grid_data_output_nodata_polygon.png

Assign a NoData polygon boundary to your grid file during gridding in Surfer

 

Use a fault file to define your data limits

Create a BLN boundary file that defines the outline of your data points and use it as a fault file during gridding. Click Home |  Grid Data | Grid Data, select your data file and specify any gridding parameters you wish. On the Options page of the Grid Data dialog (Advanced Options in Surfer 16 and earlier versions), expand the Faults section, and specify the BLN as a fault file.

grid_data_options_faults.png

Apply a fault file in Surfer's Grid Data Options to limit interpolation to only the data area.

 

Only some gridding methods support faults. Kriging does not, but Minimum Curvature which is very similar to Kriging does.  See the article Available advanced options for each gridding method in Surfer for additional information.

 

Use a breakline to define a boundary

This is most useful when trying to create bathymetry contours for a lake or other closed area where the boundary must have a specific Z value.

Create a BLN boundary file defining the outline of your data limits (i.e. the lake edge), including a third column values in the BLN file defining the Z values for the breakline itself (for a lake, this could be an elevation of 0 for the lake edge).

      1. Click Home | Grid Data | Grid Data.
      2. In the Grid Data - Select Data dialog,
        1. Choose your data file from the Dataset 1 list on the right, or click Browse, select the data file, and click Open.
        2. Choose Kriging from the Gridding Method list on the left.
        3. Verify your X, Y, and Z columns are set appropriately.
        4. Click Next.
      3. In the Grid Data - <Gridding Method> - Options dialog,
        1. Expand the Breaklines section on the right.
        2. Click the open file icon in the File containing breaklines field.
        3. Select the BLN file defining your breakline, and click Open.
        4. Click Skip to End.
      4. In the Grid Data - <Gridding Method> - Output dialog,
        1. Enter a name to save the new grid file as.
        2. Uncheck Add grid as layer to.
        3. Click Finish
      5. Click Grids | Edit | Assign NoData.
      6. In the Input Grid section, click Browse, select the grid file you just created, and click Open.
      7. In the NoData Polygon Boundary section, select your base map layer from the list, or click Browse, select the vector file, and click Open
      8. Toggle NoData Outside.
      9. Enter a name to save the new grid file as.
      10. Choose what type of map layer to create from this grid, and what map to add it to.
      11. Click OK.

 

Grid the data and specify a reduced search radius

Click Home |  Grid Data | Grid Data, select your data file and specify any gridding parameters you wishOn the Options page of the Grid Data dialog (Advanced Options in Surfer 16 and earlier versions), Expand the Search Neighborhood section. Remove the check mark from the None (use all data) box if necessary, and specify the Radius 1 and Radius 2 values.

grid_data_options_search.png

Apply a limited search radius to your data interpolation in Surfer's Grid Data dialog

 

The default Kriging method offers the Search option. Other methods that offer it include Inverse Distance, Modified Shepard's Method, Nearest Neighbor, Radial Basis, Moving Average, Data Metrics, and Local Polynomial.

Some gridding methods do not have this option, including Minimum Curvature, Natural Neighbor, Polynomial Regression, and Triangulation with Linear Interpolation. See the article Available advanced options for each gridding method in Surfer for additional information.

 

Related articles: Create a irregular-shaped map in Surfer

 

Updated March 2024

Was this article helpful?
10 out of 11 found this helpful

Comments

0 comments

Please sign in to leave a comment.