Follow

How can I create a BLN file in Surfer?

There are a number of ways to create a BLN file in Surfer. A BLN file consists of a one line header followed by a list of XY points.

The one line header is the number of proceeding data points. If you are using the BLN file for assigning NoData values to a grid, then the header will also need to contain a 1 or a 0 (the blanking flag number) in column B. A 1 means to assign NoData values inside the boundary and a 0 means to assign NoData values outside the boundary. If you are not using the BLN file for assigning NoData values, then it doesn’t matter if a 1 or a 0 is entered as the blanking flag in column B.

See also the Surfer webinar: Creating and Editing BLN files for Blanking Maps in Surfer

Some methods to create a BLN file are:

1. Enter the Data Manually

The simplest method to create a BLN file is to enter the coordinates directly into the Surfer worksheet. This works well if you know the coordinates for the objects you want to describe in the BLN file.

If you have 1 data point in your BLN file, then you are creating a point location. If you have 2 or more data points, then this will be described as a line. If you have multiple data points, and the first and last coordinate set are the same, then this is a polygon. For example:

A BLN file with two points:

1
5,6
1
4,3


A BLN file with two points and one polyline (made of three points connected together):

1
5,6
1
4,3
3
1,1
4,2
6,5


A BLN file with two points, one polyline, and one polygon:

1
5,6
1
4,3
3
1,1
4,2
6,5
5
0,0
5,0
3,4
1,4
0,0

This will look like:

 

A BLN file with one polygon that will be used to assign NoData values to a grid file (outside the boundary):

5,0
0,0
5,0
3,4
1,4
0,0

Enter these coordinates in the Surfer worksheet and then click File | Save As to save it to a BLN file. If using Notepad or WordPad, you can save to filename.bln. You can load the BLN file into Surfer as map by clicking Home | New Map | Base | Base.

2. Digitize the Boundary

If you do not know the coordinates for the boundary, but you can visually pick them off a map in Surfer, then you can digitize them. To do this:

  1. Create a map in Surfer where you can visually see where the boundary should be.
  2. Select the Map and then click Map Tools | Layer Tools | Digitize. Your cursor will turn into a cross hair.
  3. Click on the first point. The coordinates of that point will be entered in a text window that appears (called Digitized Coordinates).
  4. Digitize all around the boundary in order, either clockwise or counterclockwise around a polygon or along the length of the polyline. If you are digitizing multiple objects, separate the ending of one object and the beginning of the other with a blank row between the coordinates in the Digitized Coordinates window.
  5. If using the BLN file for blanking a grid file, click the Options menu in the Digitized Coordinates window and check or uncheck the Blank Inside command as needed.  If this option is checked, the BLN file will be saved with a blanking flag of 1 indicating areas inside the boundary will be assigned a NoData value.
  6. Once you are done digitizing the data, click File | Save As in the Digitized Coordinates window and save to a BLN file.

 

3.  Export an Existing File

You can save an existing vector file (ie. DXF, SHP, MIF, etc) in the BLN format. To do this:

  1. Load the file as a base map by clicking Home | New Map | Base | Base, selecting the file and clicking Open.
  2. Turn off the axes in the Object Manager by unchecking them.
  3. Click File | Export to export to a BLN file.
  4. Click the BLN Options tab in the Export Options dialog and ensure the desired Blank areas option is toggled.

 

4. Draw it in an Empty Base Layer in the Plot Window

You can also draw the objects you want in an empty base layer in your map and export them to a BLN file. To do this:

  1. Select your existing map and click Home | Add to Map | Layer | Empty Base. That will add an empty base map layer, called Base, to your map. You can see this in the Object Manager.
  2. Select the new empty Base layer in the Object Manager and click Features | Group | Edit Group
  3. You may want to zoom in a few times so you can see the map clearly.
  4. Click Features | Insert | Polygon and draw your polygon over the map. You can use the scroll bars on the sides of the window when drawing the polygon.
  5. Double click when you are finished to end the polygon. Now the base map layer has one polygon object in it. Draw as many polygons as needed.
  6. If you drew multiple polygons, and you want to use the BLN file for assigning NoData values outside these polygons, then select them all and click Features | Islands/Lakes | Combine. This will combine the individual polygons into a complex polygon.
  7. Press the ESC key on the keyboard to exit drawing mode.
  8. Click Features | Group | Stop Editing Group.
  9. Turn off the four axes in the Object Manager (uncheck them) and any other map layers (ie. the contour map).
  10. Click File | Export.
  11. In the Export dialog, choose a location to save the file, give the file a name, and choose to save it as BLN Golden Software Blanking (*.bln).
  12. Click Save.
  13. In the Export Options dialog, click OK again and the file is created.

 

5. Draw it in the Plot Window

You can also draw the objects you want over your map and export them to a BLN file. If you want to draw multiple polygons and use them for assigning NoData values, you will need to use method 4 instead. For objects for a base layer or for a single polygon for blanking, this method is quick and easy. To do this:

  1. Click Features | Insert | Polygon and draw your polygon over the map. You can use the scroll bars on the sides of the window when drawing the polygon.
  2. Double click when you are finished to end the polygon. Draw as many objects as needed.
  3. Press the ESC key on the keyboard to exit drawing mode.
  4. Turn off all of the Maps in the Object Manager (uncheck them) so all that's visible are your drawn objects.
  5. Click File | Export.
  6. In the Export dialog, choose a location to save the file, give the file a name, and choose to save it as BLN Golden Software Blanking (*.bln).
  7. Click Save.
  8. In the Export Options dialog, on the Scaling page, set the Scaling source to your Map.
  9. If you will be using this file for blanking, on the BLN Options page, choose whether to blank inside or outside of the polygon.
  10. Click OK and the file is created.

 

See also:

How do I create a BLN file to display multiple polylines?

I want to blank outside several polygons on a map, but the entire map gets blanked, resulting in a horizontal planar grid.

 

Updated January 25, 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.