Search the Knowledgebase |
Browse by Category |
|
|
|
| How do I create an ASCII curvilinear lattice (LAT) file from a Surfer GRD file? |
| User Opinions |
75%
25%
|
|
Thank you for rating this answer.
|
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 with a [GRD] file, but a HeightField
is scaled automatically and does not require a manual calculation.
- Use
the Surfer Grid | Convert command to convert the [GRD] file to an ASCII GRD [GS ASCII (*.grd)] file
and an ASCII XYZ DAT file [ASCII XYZ (*.dat)].
- In a text editor, copy the template [LAT] file listed
below (do not copy the [LAT] Template title)
- Change the Number of columns and rows from the current [9 7] to the values that correspond with your GRD file
- 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...)
- Copy all of the Z values from the DAT and paste them where indicated in the template (Paste the Z values...)
- 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...)
- Save the [LAT] file using the .lat extension
- Open Voxler and use the File | Load Data command to load the [LAT] file into Voxler
- Attach a
HeightField module
- Set the Scale to 0
Note: You may also be interested in the Grid2Lat.bas script available for free download here.
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 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
"..." ...
| | |
|
| Visitor Comments |
|
No visitor comments posted. Post a comment
|
| Attachments |
|
No attachments were found.
|