You can constrain the gridded area (or contours) to the area inside the data points in a few ways in Surfer. Some of these options include a vector file to Assign NoData values to the grid file during or after gridding, to act as a fault during gridding, or to act as a breakline during gridding. The polygon in this vector file will define the outline of the building, lake, mine, etc. that you wish to limit your map to.
This article covers all the methods to constrain the data to the data limits while using Grid Data in Surfer via the user interface and automation. If you are interested in the options available to create an irregularly shaped grid after the grid has been created, see Create a irregular-shaped map in Surfer.
The following topics are covered in this article:
- Assign NoData outside the convex hull of data
- Assign NoData outside an alpha shape
- Assign NoData to the grid outside the data limits
- Use a fault file to define your data limits
- Use a breakline to define a boundary
- Grid the data and specify a reduced search radius
1. Assign NoData outside the convex hull of data
- Click Home | Grid Data | Grid Data.
- In the Grid Data - Select Data dialog, click Browse in the Dataset 1 field, select the data file and click Open.
- Assign the X, Y, and Z data columns.
- Click Skip to End.
- 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.
Surfer Grid Data dialog with Assign NoData outside convex hull of data option enabled
Use the BlankOutsideHull parameter of the GridData6 method:
SurferApp.GridData6(DataFile:=SurferApp.Path + "\samples\Demogrid.dat", BlankOutsideHull:=True, InflateHull:=-1, OutGrid:="c:\temp\Demo3.grd")
If you wish to constrain the gridding inside an even tighter boundary around your data than the convex hull, you can use one of these methods:
2. Assign NoData outside an alpha shape
Delete data 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 hull around data points and even gives you control on how tight the polygon clings around the data limits. See Assign NoData outside of Alpha Shape for more information.
3. Assign NoData to the grid outside the data limits
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.
Assign a NoData polygon boundary to your grid file during gridding in Surfer
4. 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.
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 (very similar to Kriging) does. See the article Available advanced options for each gridding method in Surfer for additional information.
5. Use a breakline to define a boundary
This is most useful when trying to create bathymetry contours for a lake or other closed area. 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).
- Click Home | Grid Data | Grid Data.
- In the Grid Data - Select Data dialog,
- Choose your data file from the Dataset 1 list on the right, or click Browse, select the data file, and click Open.
- Choose Kriging from the Gridding Method list on the left.
- Verify your X, Y, and Z columns are set appropriately.
- Click Next.
- In the Grid Data - <Gridding Method> - Options dialog,
- Expand the Breaklines section on the right.
- Click the open file icon in the File containing breaklines field.
- Select the BLN file defining your breakline, and click Open.
- Click Skip to End.
- In the Grid Data - <Gridding Method> - Output dialog,
- Enter a name to save the new grid file as.
- Uncheck Add grid as layer to.
- Click Finish
- Click Grids | Edit | Assign NoData.
- In the Input Grid section, click Browse, select the grid file you just created, and click Open.
- In the NoData Polygon Boundary section, select your base map layer from the list, or click Browse, select the vector file, and click Open.
- Toggle NoData Outside.
- Enter a name to save the new grid file as.
- Choose what type of map layer to create from this grid, and what map to add it to.
- Click OK.
6. 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 wish. On 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.
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 November 2021
Comments
0 comments
Please sign in to leave a comment.