Follow

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.

 


 

If you are using Surfer 10 or previous, or you are using a script in Surfer 11 or 12, you can assign a NoData value to the areas outside the convex hull of the data using one of these methods:

1.  Use a different gridding method. 

Use a different gridding method that does not create data in areas where there was no data to begin with (i.e. Triangulation with Linear Interpolation or Natural Neighbor). The area outside the convex hull of the data will automatically be assigned the NoData value.

2.  Grid your data twice and use Grid Math.

If you prefer to grid with a different method like Kriging, but want it blanked as if it were gridded with Triangulation with Linear Interpolation,  grid the data with both methods and then click Grid | Math to combine them. Use the formula A + B - B, where A is the Kriging GRD and B is the Triangulation GRD. The output GRD will have NoData values where NoData values were present in the Triangulation grid, and have the Kriging grid values in the remaining areas. This would also give you data only inside the convex hull of the data.

 

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

 

Updated September 11, 2017

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

0 Comments

Please sign in to leave a comment.