GMT does not support non-NS oriented grids, so basically that means you should not use xyz2grd in this case. Likely, you’ll have to interpolate the data again.
I don’t know the angle of rotation exactly, but I can give a reasonable estimate.
(Now that you mention it, how do you rotate a set of points with GMT..)
The grid in question is an interpretation from a seismic cube that I have exported. So it’s basically a Z-value for each bin for all inlines and crosslines. Maybe I have to use rows and columns instead of coordinates, ala Format output with grd2xyz - Q&A - GMT Community Forum.
What are the projected units for the suspected oblique projection?
Is it not possible to just make a Cartesian grid in these units of the data and then e.g plot it using -Jx and the corresponding -J(a|b|o) projection for example?
I did create(/reformat) a Cartesion grid the normal way (ref. -I12.5/25 in my original post), but this creates a grid with gaps, since my ‘region of data’ is rotated. So as far as xyz2grd is concerned, the spacing of -I12.5/25 is not correct (but it would be if you rotated the data points to align with N-S, ref. timhume’s answer above).
To make a Cartesian coordinate transformation of mydata.xy so that the new origin is at 5,3 and the new
axis (p) makes an angle of 20 degrees with the old axis, use:
The idea of rotation isn’t to move the points at all, but to create a new X and Y axis which the data are aligned with. Of course one would want to add appropriate metadata to the grd file so that an unsuspecting user didn’t think the axes were geographic north-south and west-east.
I think my original reply was confusing. I should have said rotate the axes rather than rotate the data.
Still think the easiest is to regrid the data and aply it an outside mask to let it clearly show the rotated nature of the data.
Curiously, when many hears ago I used to work with aeromagnetic surveys most of the grids where not NS and we had software that knew how to dean with local rotated reference systems. Nowadays, I think GeoTIFF has metadata to store angle of rotation (and the GDAL affine matix has place for it) but, again, GMT does not know anything about rotated CS.
Thank you all for very good input. I’ll think and see what I do. I can always just interpolate the data, as @Joaquim suggested. I just hoped there was a more elegant way of doing it.
I thought it might make sense to specify (e g to xyz2grd for gridding) that the input data are not geographical, presumably using -fic like it says in the docs here: https://docs.generic-mapping-tools.org/latest/gmt.html#f-full - unless this gets detected automatically (a not very well educated guess).
For a small local region it however might not make a lot of difference, as far as i can understand.