Follow

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. In Surfer, click Grids | Edit | Convert.
  2. In the Open Grid dialog, select your GRD file. Make note of the Size (# rows x # columns) and then click Open.
  3. In the Save Grid As dialog, change the Save as type to DAT XYZ grid (*.dat), give your file a name, and click Save
  4. In the Export Options dialog, check the Don't export nodata nodes (blank nodes) box  and click OK.
  5. Copy the template LAT file listed below (do not copy the underlined LAT Template title) and paste it into a text editor program like Notepad++ or Notepad.
  6. Change the Number of columns and rows from the current [9 7] to the values that you made note of in step 2.
  7. Open the DAT grid file in a text editor.
  8. Select all of the rows, and then copy and paste them where indicated in the template (Paste the XYZ values...).
  9. Copy lines 6 through the end of the DAT grid file and paste into the LAT file where indicated in the template (data values...).
  10. Open the DAT grid file in Excel as a space-delimited file, and then copy all of the Z values from the third column and paste them where indicated in the template (Paste the Z values...).
  11. Click File | Saves As.
  12. Set the Save as type to All Files (*.*) and then enter your filename, in double quotes with a .LAT file extension.
  13. Click Save.
  14. Open Voxler and use the File | Import command to load the LAT file into Voxler.
  15. Right click on the LAT in the Network Manager and click 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 still cannot see the HeightField, please email your LAT file and GRD file to voxlersupport@goldensoftware.com.

 

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 August 16, 2018

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.