There are a number of ways to create a NoData polygon or BLN file in Surfer. A BLN file is not required to Assign NoData, but it is needed if you'd like to use a fault or breakline during gridding. Below, see the options to create a NoData polygon and/or BLN file.
See also the Surfer webinar: Fine Tune Your Maps by Assigning NoData to Your Grid Files or Create Accurate Surface Models with Faults and Breaklines
1. Draw 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:
- 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 Contents.
- Select the Base layer in the Contents window. You may want to zoom in a few times so you can see the map clearly.
- Click Features | Insert | Polygon and draw your polygon over the map. You may also draw a rectangle, rounded rectangle, or ellipse and use this method.
- 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.
- 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 | New Features | Combine. This will combine the individual polygons into a complex polygon.
- Press the ESC key on the keyboard to exit drawing mode.
- If you need a BLN file, see method 5 below.
2. Export a single contour line from a contour map
- Create a contour map using the Home | New Map | Contour command. Select the grid file and click Open.
- In the Contents, select the Contours layer.
- In the Properties, click the Levels tab.
- Change both the Minimum contour and Maximum contour to the contour line of interest. For example:
- Uncheck the box next to Show labels.
- In the Contents uncheck all 4 axes so only the contour line is visible.
- Click File | Export and change the Save as type to BLN, name the file and click Save.
- Ensure the Scaling source is set to Map in the Export Options dialog and click OK.
- If you need a BLN file, see method 5 below.
BLN files only:
3. 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:
- Create a map in Surfer where you can visually see where the boundary should be.
- Select the Map and then click Map Tools | Layer Tools | Digitize. Your cursor will turn into a cross hair.
- Click on the first point. The coordinates of that point will be entered in a text window that appears (called Digitized Coordinates).
- 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.
- If using the BLN file for assigning NoData to a grid file, click the Options menu in the Digitized Coordinates window and check or uncheck the NoData Inside Region 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.
- Once you are done digitizing the data, click File | Save As in the Digitized Coordinates window and save to a BLN file.
4. Draw it in the Plot Window
You can draw the objects you want over your map and export them to a BLN file to use as a fault, breakline, or NoData polygon, or simply select the polygon in the Assign NoData. 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 assigning NoData, this method is quick and easy. To do this:
- Click Features | Insert | Polygon and draw your polygon over the map. You may also draw a rectangle, rounded rectangle, or ellipse and use this method.
- Double click when you are finished to end the polygon. Draw as many objects as needed.
- Press the ESC key on the keyboard to exit drawing mode.
- Turn off all of the Maps in the Contents (uncheck them) so all that's visible are your drawn objects.
- Click File | Export.
- 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).
- Click Save.
- In the Export Options dialog, on the Scaling page, set the Scaling source to your Map.
- If you will be using this file for assigning NoData, on the BLN Options page, choose whether to blank inside or outside of the polygon.
- Click OK and the file is created.
5. Export an Existing File
You can save an existing vector file (ie. DXF, SHP, MIF, etc) in the BLN format. To do this:
- Load the file as a base map by clicking Home | New Map | Base | Base, selecting the file and clicking Open.
- Turn off the axes in the Contents by unchecking them (Surfer will export all visible objects by default).
- Click File | Export to export to a BLN file.
- Click the BLN Options tab in the Export Options dialog and ensure the desired NoData areas option is toggled.
6. Enter the Data Manually
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.
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.
See also:
How do I create a BLN file to display multiple polylines?
How Can I Assign NoData Values To My Contour Map In Surfer?
Updated November 1, 2021
Comments
Is there a way to automatically create a polygon that would follow the limits of the input data or the limits of an image? this would be very useful when combining multiple data files.
Hi Olivier,
Surfer does not currently offer the ability to generate a polygon or BLN file based on the limits of input data. I have added your vote for this feature to our suggestion file. If you have a few moments, it would be beneficial to our development team if you could provide an example workflow or situation where this feature would save you time. Please send any additional information you care to share to support@goldensoftware.com.
Thank you,
Katie Yoder
Golden Software Support
Please sign in to leave a comment.