How do I create an ASCII curvilinear lattice (LAT) file in Voxler from a Surfer GRD file?

The LAT file format consists of header information, a list of the XYZ coordinates, and a repeat list of just the Z coordinates. The LAT file requires additional memory for processing when compared to a GRD file, but a HeightField is scaled automatically and does not require a manual calculation.
  1. Use the Surfer Grid | Convert command to convert the GRD file to an ASCII GRD.
  2. In a text editor, copy the template LAT file listed below (do not copy the LAT Template title).
  3. Change the Number of columns and rows from the current [9 7] to the values that correspond with your GRD file.
  4. Open the XYZ DAT file in a text editor, copying the contents to the clipboard, and paste the XYZ coordinates where indicated in the template (Paste the XYZ values...).
  5. Copy all of the Z values from the DAT and paste them where indicated in the template (Paste the Z values...).
  6. In similar fashion, open the ASCII GRD file in a text editor, copy lines 6 through the end of the file to the clipboard, and paste into the LAT file where indicated in the template (Data values...).
  7. Save the LAT file by using File | Saves As (using the LAT extension).
  8. Open Voxler and use the File | Import command to load the LAT file into Voxler.
  9. Select the LAT in the Network Manager, right-click and choose Graphics Output | HeightField.


Troubleshooting in Voxler to display the HeightField:

  • Check your X, Y, and Z min and max values.
  • Check your scale.
  • You may need to apply a Transform module between the LAT and HeightField.
  • If you have blanked values, you may need to use Grid | Filter in Surfer to give a value (like 0) to the blanked nodes before creating the LAT file and bringing it into Voxler.
  • If you still cannot see the HeightField, please email your LAT file and GRD file to


LAT Template

#!/usr/explorer/bin/explorer cxLattice plain 1.0
# nDim, number of dimensions.
2 # dims, the vector of dimensions (size of the array).  # Number of columns and rows in the GRD file. 9 7 # nDataVar, number of data variables at each node.  # 1 for just the Z value. 1 # primType, primitive type of data.  # 1 is short int*2, 2 is long int*4, 3 is float*4, 4 is double*8. 4 # coordType, lattice type.
# 0=uniform, 1=perimeter or rectilinear, 2=curvilinear. 2 # nSteps, number of data structures in the file. 1 # nCoordVar (Curvilinear lattices only).  3 # coordinate values.  # For uniform lattices, these are the bounding box coordinates. # For rectilinear (perimeter) lattices, these are the values of the edge points. # For curvilinear lattices, these are the node locations. # Paste the XYZ values below. Space delimited is OK. Delete the "..."  ... #data values. Delete the "..." ... # Paste the Z values below. Delete the "..." ...


Updated October 10, 2016

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.