Restrict grid results to a specific area in Surfer

In many cases, a rectilinear grid file will not align well with your map area. You can constrain the area where contours or other grid layer types are displayed by assigning a null or NoData value to your grid in Surfer. 

The process of assigning NoData in Surfer can be performed during gridding or after the grid has been created. It can be done based on the input data limits, a vector polyline or polygon, or a gridded surface. This article covers all the methods available to restrict 2D or 3D grids both during and after creation.

Restrict grid results during gridding: Restrict display of a finished grid file:

Assign NoData outside the convex hull of data

Assign NoData outside an alpha shape

Assign NoData inside or outside a polygon

Assign NoData above or below a surface

Use a breakline to define a boundary

Assign NoData inside or outside a polygon

Assign NoData above or below a surface

 

Your Image

Golden Nugget : All files must use the same coordinate system when assigning NoData.

Restrict grid results during gridding

If you are starting your map with point data, the most efficient way to create a map inside your data limits is to assign NoData while you are creating your grid files. This can be done using several different methods the most common of which are assigning NoData outside the convex hull, outside an alpha shape, outside a polygon, and below a surface (for 3D grids).

Assign NoData outside the convex hull of data

Restricting your grid file to the convex hull of data limits but does not eliminate all extrapolation beyond the input data area. If you imagine wrapping a rubber band around all of your data points, that is the shape of the convex hull and the area the output grid file will fill.

Two Surfer maps illustrating the convex hull of data and resulting grid file

Left: Surfer post map with blue line illustrating the convex hull of data
Right: Contour map of the resulting grid file created using Assign NoData outside convex hull

How to assign NoData outside the convex hull of data (step-by-step)

  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 Grid Data - Output page, click in the Assign NoData outside of field and select Convex hull
  6. If desired, enter a value in the Inflate convex hull by field.  This value should be in the same units as your input data and will expand the convex hull polygon by that number in all directions.
  7. Adjust all other options as desired and click Finish.


Surfer Grid Data dialog with the assign NoData outside convex hull of data option enabled

Assign NoData outside an alpha shape

Restricting your grid to an alpha shape creates a tight polygon boundary around your data points, similar to the existing Convex hull option. The Alpha shape option can limit all extrapolation because it can create a concave or convex hull around data points, and 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

Left: Surfer post map with blue line illustrating the alpha shape
Right: Color relief map of the resulting grid file created using Assign NoData outside alpha shape

How to assign NoData outside an alpha shape (step-by-step)

  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 or click Next until the Grid Data - Output page is showing. 
  5. Click in the Assign NoData outside of field and select Alpha Shape. 
  6. Enter a value in the Alpha value by field. The larger the value the more convex the polygon will be, and the smaller the number the move concave the polygon will be. 
  7. Adjust all other options as desired and click Finish.

Surfer Grid Data dialog with the assign NoData outside alpha shape option enabled

Assign NoData inside or outside a polygon

Restricting your grid file to inside or outside of a polygon gives you full control of where data is interpolated and displayed on your map. To do this you must first have or create a vector boundary file (BLN, SHP, DXF, etc.) defining the desired outline of your grid file. For detailed instructions on creating a boundary file see Create a NoData Polygon or BLN file in Surfer

AmGeo-Graphic-3_smaller.jpg

Geotechnical survey results created in Surfer using Assign NoData outside a polygon

How to assign NoData outside a polygon boundary (step-by-step)

  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 or click Next until the Grid Data - Output page is showing. 
  5. Click in the Browse in the NoData Polygon boundary section and select your boundary file.
    Alternatively, click <None> and select the Base layer from your map that contains your boundary file.
  6. Click NoData Inside, NoData Outside or Mixed depending on your needs.
    See the NoData 2D Polygon Boundary section of this help page for more details.
  7. Adjust all other options as desired and click Finish.

grid_data_output_nodata_polygon.png

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

Assign NoData above or below a surface

When creating a 3D (XYZC) grid file, you may want to restrict the display of data to below the topography surface.  To do this you will first need to create or download a 2D (XYZ) grid file of the surface in your data area.  As with all other NoData operations, the 2D surface and 3D grid must use the same coordinate system.

example_NoData_below_surface.png

How to assign NoData to a 3D grid below a 2D grid surface (step-by-step)

  1. Click Home | Grid Data | Grid Data.
  2. In the Grid Data - Select Data dialog, click XYZC in the Data type section.
  3. Click Browse in the Dataset 1 field, select the data file and click Open.
  4. Assign the X, Y, Z and C data columns.
  5. Click Skip to End.
  6. On the Output page of the Grid Data dialog, select your surface boundary and click Finish.

 

Use a breakline to define a boundary

If you are created a grid file the represents a body of water or other closed area, using a breakline boundary may be the most effective method of assigning NoData.  This will no online limit extrapolation, it will also assign a Z value to the grid along the line. 

Before beginning you will need to create a BLN boundary file defining the outline of your data area (i.e. the lake edge), including a third column of values defining the Z values for the boundary itself (for a lake, this could be a depth of 0 for the lake edge).

How to use a breakline to assign NoData during gridding (step-by-step)

  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.

Restrict grid results after grid creation

If you already have a grid file, perhaps downloaded or created elsewhere, you can still limit where data is displayed in your grid based map by assigning a null or NoData value.  This can be done using a polygon boundary or using a surface boundary.

Assign NoData inside or outside a polygon

Restricting your grid file to inside or outside of a polygon gives you full control of where data is interpolated and displayed on your map. To do this you must first have or create a vector boundary file (BLN, SHP, DXF, etc.) defining the desired outline of your grid file. For detailed instructions for creating a boundary file see Create a NoData Polygon or BLN file in Surfer.

example_NoData_polygon.png

How to Assign NoData inside or outside of a boundary after gridding (step-by-step)

  1. Click Grids | Edit | Assign NoData.
  2. In the Input Grid section, select your grid-based map layer from the list,
    or click Browse, select the grid file, and click Open.
  3. In the NoData 2D Polygon Boundary section, select your base map layer from the list,
    or click Browse, select the vector file, and click Open.
  4. Toggle NoData Outside.
  5. Enter a name to save the new grid file as.
  6. Choose what type of map layer to create from this grid, and what map to add it to.
  7. Click OK.

Assign NoData above or below a surface

When working with a 3D (XYZC) grid file, you may want to restrict the display of data to below the topography surface or above the bedrock surface.  To do this you will first need to create or download a 2D (XYZ) grid file of the surface in your data area.  

example_NoData_below_surface_2.png

How to Assign NoData outside of a boundary after gridding (step-by-step)

  1. Click Grids | Edit | Assign NoData.
  2. In the Input Grid section, select your grid-based map layer from the list, or click Browse, select the grid file, and click Open.
  3. In the NoData 2D Polygon Boundary section, select your base map layer from the list*, or click Browse, select the vector file, and click Open.
  4. Toggle NoData Outside.
  5. Enter a name to save the new grid file as.
  6. Choose what type of map layer to create from this grid, and what map to add it to.
  7. Click OK.

AssignNoData_SurfaceBoundary.png

Additional Resources

Was this article helpful?
...

Comments

0 comments

Please sign in to leave a comment.