To calculate the Z values along a line in Surfer, use the Grids | Calculate | Slice command. You will need a BLN file defining the line. This workflow will also give you the XY coordinates of each point along the line. The steps are:
- Create a vector file (like a SHP, DXF, or BLN file) of the line if you do not already have one. For information about creating BLN files, please see the article: How can I create a BLN file in Surfer?
- Click Grids | Calculate | Slice.
- In the Grid Slice dialog:
- Select the grid-based map from the Input Grid dropdown list, or click the Browse button to navigate to and select the grid file.
- Select the base map containing your polyline from the Slice Line dropdown list, or click the Browse button to navigate to and select the vector file.
- Check the Output to DAT box and give your DAT file a name
- Click OK.
- Click File | Open in Worksheet and open the DAT file in the Surfer worksheet. Columns A, B and C are the X, Y and Z values along the line.
Example of the DAT file created with Surfer's Slice tool
Alternatively, if you have a worksheet with the XY coordinates of the points you wish to calculate the Z value for, you can use the Grids | Calculate | Point Sample command. Instructions for Grid Residuals can be found in the Help on the How can I find the Z value of a known XY point? page.
Updated November 2021