Using Surfer, I am making contours using a grid. I have a river running through my extent, that I need the contours to not cross over. How can I create this buffer? I can add a shapefile of the river into my Surfer plot, but do not know where to go from there. Any tips?

As is, I am exporting my contours as a shapefile, uploading in ArcGIS Pro, and hand-editing to account for the river.


1 Answer 1


In Surfer, you can use the river as a breakline when gridding. That will prevent the contours from crossing over and use the river during the gridding process. The polyline representing the river does need to have a Z value associated with it.

Breaklines can only be used from BLN files though, so what you can do is first convert the SHP to a BLN file. How you do this best though depends if the SHP has a Z value associated with the polyline or not.

  1. So first click Home | New Map | Base, select the SHP and click Open.
  2. If the polyline already has a Z value (e.g. it's listed as a 3D Polyline in Contents | Base, or if it's a regular Polyline object but you have the Z value associated with it saved as an attribute), the easiest way is to use v28 (currently in Beta). Right click over the Base layer and click 3D View. This will view the polyline in 3D. Select Vector Data | Base layer in the 3D View Contents. If it was a regular Polyline object with Z as an attribute, click the Z coordinate tab in Properties and make sure the Z coordinates is set to the right Z attribute. Then click Save Vector Data and save to a BLN file. The Z value is preserved.
  3. If the polyline does not already have a Z value in it (e.g. it's listed as simply Polyline in Contents | Base and there is no attribute for the Z), then it's a slightly different process. Right click over the Base layer and in Properties click the Save File button (on the same line as Input file). Then save it as a BLN file. Now we just need to add Z values to it. Click File | Open in Worksheet, select the BLN file and click Open. You'll see data values in columns A and B (this is X and Y). Now add the Z values in column C. You'll need add a Z value for each vertex of the polyline. It can be the same for each vertex, or it can be different. Once the Z values are all added, click File | Save and File | Close.
  4. Once you have a BLN file for the river, you can use it during gridding! Click Home | Grid Data.
  5. In the Grid Data process, on step 1, select the data, data columns and gridding method you wish. The gridding method needs to support breaklines (view these on the Help page). Click Next.
  6. One the Options page, under Breaklines, load the BLN file as a breakline file. Click Next and complete the gridding as usual.

Now when you load the new grid as a contour map, you can see the breakline area. You can add the BLN (or SHP) back as a base layer, so you can see the river through the contours.

If that doesn't work for any reason, please contact Surfer support at [email protected]!

I will also add your request to the suggestion database to support SHP files as Breakline files, so you wouldn't have to convert it to a BLN - that would save you a step or two.

To use Surfer beta, if you have active maintenance, you can see instructions here. If you do not have active maintenance, again please contact [email protected] and mention this stack exchange post.

  • Thank you for this. I do not see where the "Save Vector Data" option is in order to save as a BLN file? Mar 19 at 16:14
  • Hi Maggie - The Save Vector Data is a new feature for the 3D View, and currently it's only in Surfer Beta version (v28). If you have an active maintenance for Surfer 27, you can click File | Online | Try Beta Version. If you do not have active maintenance for Surfer, please contact [email protected] with an email to my attention (Kari) and mention this stack exchange post. Thanks! Mar 20 at 17:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.