How can I grid only the area inside my data limits using Surfer?

You can constrain the gridded area (and hence the contours) to the area inside the convex hull of the data by choosing to assign a NoData value to the grid outside the convex hull of the data during the gridding process. You can use this option in the user interface and via automation in a script.

In the user interface, click Home | Grid Data | Grid Data, select the data file and click Open. In 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.  

If you are using a script in Surfer 13 or higher, you can use the BlankOutsideHull parameter of the GridData3 method:


    SurferApp.GridData3(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:

1.  Assign NoData to the grid outside the data limits.

Grid your data as normal by clicking Home | Grid Data | Grid Data, select the data file and click Open, specify any gridding parameters you wish and click OK (it will be a rectangular grid). Create a BLN boundary file or other vector file defining the outline of your data points. After the boundary file is created, click Grids | Edit | Assign NoData, select the grid file, select boundary file, and save the output grid to a new name. This can create maps with data inside any boundary, so it is a good option to choose if you want the limits tighter than the convex hull of the data.

Beginning in Surfer 14, other vector file formats including SHP and DXF can be used as boundaries when using the Grids | Edit | Assign NoData command.  If you are using Surfer 13 or earlier, please see: How can I create a BLN file in Surfer? or, if you have our MapViewer or Didger software packages, you can easily do this by importing your data points, selecting them and using the Convex Hull command to create a polygon of the convex hull around the data points, and then click File | Export to export the polygon to a BLN file.

 2.  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 click Open. In the Grid Data dialog box, click on the Advanced Options button, click the Breaklines and Faults tab, and specify the BLN as a fault file.

Only some gridding methods support faults. Kriging does not, but Minimum Curvature (very similar to Kriging) does.  See What Advanced Options Are Available For Each Of Surfer's Gridding Methods? for additional information.

3.  Grid the data and specify a reduced search radius. 

Click Home | Grid Data | Grid Data, select your file and click Open. In the Grid Data dialog, click on the Advanced Options button, then click on the Search tab. Remove the check mark from the No Search (use all of the data) if necessary, and specify the Radius 1 and Radius 2 values.

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, andLocal Polynomial.

Some gridding methods do not have this option, including Minimum CurvatureNatural NeighborPolynomial Regression, and Triangulation with Linear Interpolation. See What Advanced Options Are Available For Each Of Surfer's Gridding Methods? for additional information.



Related articles: How can I create a map inside an irregular boundary in Surfer?


Updated November 8, 2018

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.