Have you ever wanted to “blank” a grid-based map, so that it does not display outside of a specified area? This can be useful if you want to limit a contour map to display only inside or outside a specified area. You can do this in Surfer using a blanking file. Described below is the process that you can use to blank a grid file using area that you define from digitized points.
As an example, I am going to start by using the example file Contours.srf that is installed with Surfer. This file is located in the Surfer installation directory, in the Samples folder. The typical file path for the sample files is: C:\Program Files\Golden Software\Surfer 12\Samples.
First, you will need to create a blanking file that you can use to blank your input grid file. To do so, follow these steps:
To use this blanking file to blank the area inside or outside of your grid, you will need to open and edit the BLN file and add the appropriate blanking flag. Follow these steps to correctly format your blanking file:
Example Blanking File (*.bln) format,
to blank inside of a polygon.
Using the steps above, you can digitize the points which define any complex polygon in your map. For this example, I have digitized a rectangular area to create the blanking file show above.
You can view this blanking file on your map by adding it to your Map as a Base Map object with the following procedure:
Base map object added from BLN file.
By adding the blanking file as a basemap, you can confirm that it includes the entire area of the grid that you wish to blank. You can see that using the digitized coordinates shown above that I have defined the blanking polygon to separate the interior and exterior regions separated by 0.2 degrees of latitude and longitude.
Blanking file (in red) added as Base map to confirm coverage area.
When you are ready to blank your grid file, follow these steps to blank a grid file using a BLN file:
Use the Grid | Blank command.
With your grid file blanked, you can create a new contour layer with the blanked grid file. Click the Map | Add | Contour Layer command to add the new blanked contour map. In the Open Grid dialog, navigate to the location of your blanked grid file (Grand Canyon_BLANKED_IN.grd). Select the grid file you would like to add, and click the Open button. Below is an image which shows this setup in the Open Grid dialog.
Select your new grid file in the Open | Grid dialog.
Below I have included screenshots of the new contour layers that have been created using the blanking procedure described above. The grid named Grand Canyon_BLANKED_IN was created using a blanking flag of 1, while the Grand Canyon_Blanked_OUT grid was created using a blanking flag of 0.
Grand Canyon grid file blanked with blanking flag equal to 1, to blank inside the polygon.
Grand Canyon grid file blanked with blanking flag equal to 0, to blank outside the polygon.
Hopefully this blog post provides you with a better understanding of the procedure used to blank a grid file. If you would like to review the files that I have used in this example, you can download them here.
Hello - In Surfer 15 we changed the "blank" functionality to "Assign NoData."You can read more about using the Assign NoData functionality here: https://surferhelp.goldensoftware.com/gridmenu/Assign-NoData-Blank-Grid.htm?Highlight=assign%20nodata
Golden Software Support