Fill outside of a polygon to mask a portion of the map in Surfer

Surfer does not currently offer an automatic way to mask a map with a boundary polygon but there are two workflows available that provide the same results.

Option 1: Assign a NoData value to areas outside the boundary.

To mask (or assign NoData values to) contours or any grid-based map outside a boundary, save the boundary polygon to a vector file format such as BLN, SHP, DXF, etc., then use the Grids | Edit | Assign NoData command to assign null values to grid nodes that are outside the polygon. See the article How can I create a map inside an irregular boundary? for detailed instructions.

 

Option 2: Create a complex polygon that covers the area outside the boundary area. 

  1. Load the boundary polygon as a base layer (if it is saved in a base map file format, like DXF, SHP or BLN), or add an empty base map layer and draw the boundary polygon over the map.
  2. Click the Base(vector) layer in the Contents window to select it.
  3. Click Home | Insert | Polygon and draw another larger polygon outside the outer edge of all four corners of the map (so it is a rectangle that is larger than the map).
  4. Select both the large polygon you just drew and the smaller polygon defining the boundary and click Features | New Features | Combine. This combines the two polygons into one complex polygon.
  5. You can now fill the complex polygon with whatever fill pattern you wish. The fill will be between the boundary polygon and the larger polygon you drew.

Creating a mask for a Surfer mask.png

Example of a filled complex polygon.

 

Updated November 1, 2021

Was this article helpful?
2 out of 6 found this helpful

Comments

0 comments

Please sign in to leave a comment.