Follow

I want to blank (or assign NoData values) outside several polygons on a map in Surfer, but the entire map gets blanked, resulting in a horizontal planar grid.

Q: I want to blank the grid nodes (assign NoData values) outside several polygons on a map in Surfer, but the entire map gets blanked, resulting in a horizontal planar grid.


A: This is a result of the area outside Polygon A being included inside Polygon B, and vice versa, which causes the entire map to be blanked. 

blank outside polygon

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

 

You can blank a map with multiple polygons by combining the polygons into a single complex polygon. To do this, use the Features | Islands/Lakes | Combine command to combine multiple polygons into a single complex polygon and re-export the BLN. With the command, a new complex polygon containing all the selected polygons is created. 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 Contents window, select the Base object.
  3. Click Features | Group | Start Editing.
  4. In the Contents window, select all the Polygon objects below the Base layer. Hold the CTRL key on the keyboard to select multiple polygons.
  5. Click Features | Islands/Lakes | Combine. Now the polygons are combined into a single complex polygon.
  6. Click Features | Group | Stop Editing.
  7. In the Contents window, turn off the axes by unchecking them.
  8. Click File | Export.
  9. In the Export dialog:
    1. Enter a File name.
    2. Select BLN Golden Software Blanking (*.bln) for Save as type.
    3. Click Save.
  10. In the Export Options dialog, on the Scaling tab, make sure the Scaling source is set to Map. On the BLN Options tab, make sure the Break apart compound areas option is not checked.
  11. Click OK

The BLN file that is created will contain one complex polygon and can then be used to blank the grid file outside the polygon.

 


 

If you are using Surfer 10 or previous, the polygons can be combined manually in the worksheet. To do this:

  1. Click File | Open and open the BLN file containing both polygons in the Surfer worksheet. Notice that above the points for each polygon there is header row with the number of points and the blanking flag.
  2. Remove the header row of the second polygon (select the two and click Edit | Delete).
  3. Repeat the first point in Polygon A after the last point in Polygon B. This will combine both polygons into a single complex polygon. The first value is repeated to close the shape to create a polygon instead of polyline.
  4. Update the header value to contain the total number of points in the Polygon A and Polygon B. 

blank outside polygons

Editing the blanking file to create complex polygons resolves the issue of having the entire grid blanked. 

 

In a more complex example, consider adding a third polygon. One complex BLN file with three polygons would appear as below.

blank outside polygons

blank outside polygons

Multiple polygons can be combined into a single complex polygon so that the entire grid is not blanked. 

 

Also see the attached script conjoinBLN.bas which automatically converts a BLN file with multiple polygons into a BLN file with a single complex polygon. Download the script and open it in the Scripter program that comes with Surfer. Go to Script | Run and follow the prompts. The files can be downloaded below.


Updated October 30, 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.