Golden Software Blog

Helping you learn more about the latest product information, tips, tricks, techniques, and customer stories so you can visualize data and communicate results with ease.

How To: Digitize Points to Create a Blanking File

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:

  1.  In the Object Manager, click on the Contours map object.
  2. Click the Map | Digitize command.
  3. In the Plot Window, click along the area you would like to not be displayed in the contour map.
  4. In the Digitized Coordinates dialog, the points XYZ coordinates will be displayed. Click File | Save As to save the data points to a blanking file.
  5. In the Save As dialog (shown below), you can edit the File name and select the Save as type to be Boundary Files (*.bln).  Click Save.

    b2ap3_thumbnail_Digitize-Points-1.png
  6.  To exit Digitize mode, click Map | Digitize or click Esc (on your keyboard).
  7. To close the Digitize Coordinates dialog, click the X in the upper right of the dialog.

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:

  1. Use the File | Open command to open the saved BLN file in Surfer as a worksheet.
  2. Insert a blank row at the top of the worksheet using the Edit | Insert command.
  3. Into cell A1, enter the total number of points that you have defined in your blanking file.
  4. Into Cell B1, enter the blanking flag, 0 or 1.
    1. Entering a blanking flag equal to zero will cause the area outside the polygon to be blanked.
    2. Entering a blanking flag equal to one will result in the area inside the polygon being blanked.
  5. Use the File | Save command to save your blanking file.

b2ap3_thumbnail_Digitize-Points-2.png

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:

  1. In the Object Manager, select your Map object.
  2. Click the Map | Add | Base Layer command.
  3. In the Import dialog, navigate to your saved BLN file. Click the file to select it for import.
  4. Click Open. A new Base map object will be added with the BLN filename (see image below).

b2ap3_thumbnail_Digitize-Points-3.pngBase 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.

b2ap3_thumbnail_Digitize-Points-4.png
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:

  1. Click the Grid | Blank command, shown below. 
  2. In the Open Grid dialog, select the grid file and click Open.
  3. In the Open dialog, select the BLN file and click Open.
  4. In the Save Grid As dialog, enter a File name and click Save.

b2ap3_thumbnail_Digitize-Points-5.pngUse 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.


b2ap3_thumbnail_Digitize-Points-6.pngSelect 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.

b2ap3_thumbnail_Digitize-Points-7.png

Grand Canyon grid file blanked with blanking flag equal to 1, to blank inside the polygon.

b2ap3_thumbnail_Digitize-Points-8.png
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

 

 

Comments 1

Guest - Mark Oscar on Friday, 17 March 2017 04:20

Great post Thanks for sharing very informative post

Great post :) Thanks for sharing very informative post :)
Guest
Saturday, 18 November 2017

Captcha Image

Subscribe To Our Blog

Most Popular

This week's new feature series is a tutorial on how to use the new coordinate system dialogs in MapV...
Over the years, one of the most common questions asked is “How can I get my contour map out of Surfe...
For more than 20 years, Surfer mapping software has been used by representatives of nearly all indus...

Exceeding expectations

Go to top