Producing a Grid File from a Regular Array of XYZ Data
When your XYZ data are collected or generated on regular intervals it is possible to produce a grid file that uses your values directly and does not interpolate the values for the grid nodes. You can use the Grid Data command to create a grid file in the correct format.
When you have a complete array of XYZ data (or a nearly complete set of data with only a few "holes"), you can use the Nearest Neighbor gridding method to convert your data directly to a grid file. The Nearest Neighbor method does not interpolate data but merely picks the closest point and assigns that value to the grid node.
To use the Home | Grid Data | Grid Data command to produce a .GRD grid file from regularly spaced data:
-
Create an XYZ data .DAT file from your data.
-
Select the Home | Grid Data | Grid Data command.
-
Specify the name of the XYZ data file in the Open dialog and click Open.
-
In the Grid Data dialog, select the Nearest Neighbor gridding method from the Gridding Method list. During gridding, the nearest Z value from the data file is assigned to the grid node.
-
Set the Spacing values in the Output Grid Geometry group to match the spacing of your data in the X and Y directions. This assures that the grid nodes coincide with your data. For example, if your data are separated by 100 meters over the extent of your map, enter 100 for the X Direction and Y Direction boxes.
-
Click OK in the Grid Data dialog and the grid file is created.
You can also produce grid files directly from an evenly spaced array of Z values. When your Z values are organized correctly in an ASCII file, you can use the file directly as a TXT Formatted Text Grid file. Alternatively, add some header information identifying the data as a grid file, specify the limits of the data, and then save the file. The ASCII grid file format is given in Surfer 6 Text Grid Format.