Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for EPSG methods 9666 and 1049 #4097

Open
yportier opened this issue Mar 21, 2024 · 4 comments
Open

Support for EPSG methods 9666 and 1049 #4097

yportier opened this issue Mar 21, 2024 · 4 comments

Comments

@yportier
Copy link

P6 I=J+90 seismic bin grid coordinate operation (EPSG:9666) and
P6 I=J-90 seismic bin grid coordinate operation (EPSG:1049)
are both special cases of the Affine Geometric Transformation (method code 9623)
They are fully described in EPSG Guidance Note 7-2 (p.142-147) and as such should be easy to implement.
I'd like to help but have no idea where to start.

@rouault
Copy link
Member

rouault commented Mar 21, 2024

@yportier
Copy link
Author

yportier commented May 11, 2024

In singleoperation.cpp, I am defining the parameters for the Affine Parametric Transformation, but I need first to shift the coordinates so can I apply two affine steps like this ?

formatter->addStep("affine");
formatter->addParam("xoff", I0);
formatter->addParam("yoff", J0);
formatter->addStep("affine");
formatter->addParam("xoff", X0);
formatter->addParam("s11", SF * Mx * cos(theta) / inc_SX);
formatter->addParam("s12", SF * My * sin(theta) / inc_SY);
formatter->addParam("yoff", Y0);
formatter->addParam("s21", -SF * Mx * sin(theta) / inc_SX);
formatter->addParam("s22", SF * My * cos(theta) / inc_SY);

@jjimenezshaw
Copy link
Contributor

jjimenezshaw commented May 11, 2024 via email

@yportier
Copy link
Author

yportier commented May 11, 2024

Is this what you are suggesting ?

formatter->addStep("affine");
formatter->addParam("xoff", X0 + I0 * SF * Mx * cos(theta) / inc_SX + J0 * SF * My * sin(theta) / inc_SY);
formatter->addParam("s11", SF * Mx * cos(theta) / inc_SX);
formatter->addParam("s12", SF * My * sin(theta) / inc_SY);
formatter->addParam("yoff", Y0 - I0 * SF * Mx * sin(theta) / inc_SX + J0 * SF * My * cos(theta) / inc_SY);
formatter->addParam("s21", -SF * Mx * sin(theta) / inc_SX);
formatter->addParam("s22", SF * My * cos(theta) / inc_SY);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants