Assign NoData outside several polygons in Surfer

In Surfer, you can assign a null or NoData value to grid nodes outside multiple polygons. You can do so either using the files directly (without first creating a map) or by creating a map first to view the data and then assigning NoData. 


How to assign NoData outside multiple polygons

  1. Click Home | New Map | Contour, select your grid file and click Open.
  2. Select the map and click Home | Add to Map | Layer | Base.
  3. Select the file containing the polygons you want to use for assigning NoData and click Open. This enables you to verify that the polygons are in the correct location on the map.
  4. Click Grids | Edit | Assign NoData.
  5. In the Assign NoData to Grid dialog:
    1. Select the grid file used to create the contour map from the Input Grid drop down.
    2. Select the base layer from the NoData 2D Polygon Boundary drop down.
    3. Choose NoData Outside for the NoData direction
    4. Set the Output Grid name and format.
    5. Check Add grid as layer to: to add the grid as a layer to the Map, if desired.
  6. Click OK. The layer is added. You can turn off the original layer (or delete it) in the Contents window.


How to assign NoData outside multiple polygons in Surfer 13 or older

In Surfer v13 and previous versions, you could not blank grid nodes outside multiple polygons without combining the polygons first into a single complex polygon. 'Blanking' was the term used in Surfer 13 and previous versions instead of 'Assign NoData', but it means the same thing. If the polygons were not combined, then the entire grid would be blanked (have NoData for all nodes) since the area outside one polygon includes the other polygon, and vice versa. 


The area outside Polygon A includes Polygon B, and vice versa, which causes the entire grid to be assigned NoData when using multiple, separate polygons.


You can use the Geoprocessing | Edit Boundaries | Combine Islands/Lakes command to combine multiple polygons into a single complex polygon, and then use the polygon when blanking the grid. The exact steps are as follows:

  1. Click Home | New Map | Base | Base, select the original BLN file and click Open. A base map is created showing the existing polygons.
  2. In the Object Manager window, click the expand layer button button to expand the Base layer.
  3. Right click over the Base layer and click Edit Group.
  4. Press CTRL+A to select all the polygons in the group.
  5. Click Geoprocessing | Edit Boundaries | Combine Islands/Lakes. Now the multiple polygons are combined into a single complex one. Even though they don't look any different on the screen, you can see the Object Manager that there is just one polygon now.
  6. Right click over the Base layer and click Stop Editing Group.
  7. With the Base layer selected in the Object Manager, on the General page in the Property Manager, click the Save As button.
  8. In the Export dialog, give the file a name, choose a location to save the new file, and choose to save it as a BLN. Click Save.
  9. In the Export dialog, enter a File name, change the Save as type to BLN Golden Software Blanking (*.bln), and click Save.
  10. In the Export Options, click the BLN Options tab and choose an option for Blank areas. Click OK.

The BLN file that is created will contain one complex polygon and can be used to blank the grid file outside that polygon, using the Grid | Blank command.


In Surfer versions prior to v11, you would need to open the BLN file in the worksheet and manually edit it to combine all the polygons into one complex polygon, and resave the BLN file.

Updated March 2024

Was this article helpful?
3 out of 7 found this helpful



Please sign in to leave a comment.