How can I rotate a grid 90° without switching the X and Y coordinates in Surfer?

In some cases, you may wish to rotate the contents of a grid file (the Z values), without changing the actual XY values. This is useful if a grid file was created in another application (i.e. not Surfer) and the Z values were recorded in the grid file starting in a different corner than the lower left corner. 

 

For example, say you have a grid file that created this map. The XYs are correct and in the correct orientation, but the Z values are rotated within the XY extents:
original contour map in Surfer
To rotate the Z value contents in a grid file 90° without interchanging the X and Y coordinates in Surfer, follow these steps:
  1. Click Grids | Edit | Convert.
  2. In the Open Grid dialog, select the grid file and click Open.
  3. In the Save Grid As dialog, choose to save the grid as a GRD Surfer 6 Text Grid and click Save.
  4. Click OK in the Export Options dialog.
  5. Open the text grid in a text editor, like Notepad.
  6. Switch the third and fourth rows.
    1. Select the fourth row and click Edit | Cut.
    2. Insert a new row after row 2.
    3. Click Edit | Paste and paste the information as a new third row.
    4. Delete the blank row
    5. Click File | Save and save the changes. Close the file.
  7. In Surfer, click Grids | Calculate | Transform.
  8. In the Grid Transform dialog, click Browse in the Input Grid field.
  9. Select the newly saved text grid and click Open.
  10. In the Grid Transform dialog, choose Operation = Rotate and Angle = 90 (to rotate 90° counterclockwise) or 270 (to rotate 90° clockwise) and click OK.

contour map in Surfer showing rotated Z values but the same XY coordinates

Rotate the Z value contents in a grid file, while leaving the XY coordinates alone

 

Updated December, 2021

Was this article helpful?
0 out of 2 found this helpful

Comments

0 comments

Please sign in to leave a comment.