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:
To rotate the Z value contents in a grid file 90° without interchanging the X and Y coordinates in Surfer, follow these steps:
- Click Grids | Edit | Convert.
- In the Open Grid dialog, select the grid file and click Open.
- In the Save Grid As dialog, choose to save the grid as a GRD Surfer 6 Text Grid and click Save.
- Click OK in the Export Options dialog.
- Open the text grid in a text editor, like Notepad.
- Switch the third and fourth rows.
- Select the fourth row and click Edit | Cut.
- Insert a new row after row 2.
- Click Edit | Paste and paste the information as a new third row.
- Delete the blank row
- Click File | Save and save the changes. Close the file.
- In Surfer, click Grids | Calculate | Transform.
- In the Grid Transform dialog, click Browse in the Input Grid field.
- Select the newly saved text grid and click Open.
- In the Grid Transform dialog, choose Operation = Rotate and Angle = 90 (to rotate 90° counterclockwise) or 270 (to rotate 90° clockwise) and click OK.
Rotate the Z value contents in a grid file, while leaving the XY coordinates alone
Updated December, 2021
Please sign in to leave a comment.