<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Javier,</p>
    <p>I don't think that can be done directly in PROJ. That would
      somehow require a "add" operator using coordinates pushed on the
      stack. Or maybe some super convoluted trickery abusing some of our
      existing operators, but nothing comes to mind.</p>
    <p>No magic then: I would probably write custom code that would
      create a grid from ETRS89 to the final CRS (the geographic CRS of
      it), with roughly the resolution of the grid in TM07, applying "at
      hand" the 4 steps to compute the shift in the lat/long space for
      all grid cells (using PROJ for some of the individual steps and
      Python to make the addition).</p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 14/02/2025 à 17:50, Javier Jimenez
      Shaw a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CADRrdKtyunVnhkWp3-KfywznD+TfGw-Nms-oABQQJBO4K0bj3Q@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">
          <div>Hi Even.</div>
          <div><br>
          </div>
          <div>The example in data/sql/transformations_czechia_extra.sql
            was very useful.</div>
          <div>First I am trying to reproduce the transformation with a
            pipeline, and later I will make the proper operations and
            concatenated operations in the database.</div>
          <div><br>
          </div>
          <div>However this Greek transformation is more convoluted than
            I expected (initially I misunderstood some steps).</div>
          <div><br>
          </div>
          <div>a) First they have a Helmert from ETRS89 (from their
            realization, but I do not care) to GGRS87. So far so good
            (params are not the ones from EPSG, but no problem)</div>
          <div>b) Then they apply the transverse Mercator to "GGRS87 /
            Greek Grid". All fine.</div>
          <div>c) In parallel they project ETRS89 coordinates into a
            different transverse Mercator, called TM07 (not in EPSG;
            they provide the params). The grid with the horizontal
            corrections are in TM07</div>
          <div>d) the final projected coordinates in "GGRS87 / Greek
            Grid" are the values from b) plus the corrections from the
            grid in c)</div>
          <div><br>
          </div>
          <div>See that the easting-northing coordinates to get the
            correction from the grid are not the same as the coordinates
            from b). To make it clear, TM07 has a false-northing of
            -2000 km</div>
          <div><br>
          </div>
          <div>How can it be done in a pipeline? (later to be converted
            into something in proj.db)</div>
          <div>I do not know how to keep the corrections somewhere to be
            added later to the projected coordinates.</div>
          <div><br>
          </div>
          <div>Thanks</div>
          <div>Javier</div>
          <div><br>
          </div>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Mon, 3 Feb 2025 at 16:54,
            Even Rouault <<a href="mailto:even.rouault@spatialys.com"
              target="_blank" moz-do-not-send="true"
              class="moz-txt-link-freetext">even.rouault@spatialys.com</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
            <div>
              <p>Javier,</p>
              <p>you can probably hack around BOUNDCRS in a totally
                PROJ-specific way by using the "METHOD["PROJ-based
                operation method: {proj_pipeline_here}" <br>
                <br>
              </p>
              <p>Otherwise having records in the DB will certainly be
                cleaner.  data/sql/transformations_czechia_extra.sql can
                probably be used as an example of quite advanced
                transformations, including using a grid referenced in a
                projected CRS.</p>
              <p>Even<br>
              </p>
              <p><br>
              </p>
              <div>Le 03/02/2025 à 16:26, Javier Jimenez Shaw via PROJ a
                écrit :<br>
              </div>
              <blockquote type="cite">
                <div dir="ltr">
                  <div>Hi</div>
                  <div><br>
                  </div>
                  <div>I am trying to make this transformation (that is
                    not in EPGS). I do not know how far I can go with
                    PROJ.</div>
                  <div><br>
                  </div>
                  <div>(Apparently this transformation is needed to go
                    from the coordinates used by HEPOS.gr, the Greek
                    positioning system, to the official -I think- CRS in
                    Greece, <span
style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">GGRS87</span>.</div>
                  <div>The best is that the transformation would be in
                    EPSG. Do you know anybody in Greece with the proper
                    contacts? I am happy to talk with them about it, and
                    help if needed)</div>
                  <div><br>
                  </div>
                  <div>Until it is in EPSG, I would like to use PROJ to
                    do it.<br>
                  </div>
                  <div><br>
                  </div>
                  <div><span
style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">The
                      accurate transformation from ETRS89  to GGRS87 is
                      something like:</span></div>
                  <div><span
style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">-
                      apply a Helmert transformation</span></div>
                  <div><span
style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">-
                      Project into a transverse Mercator</span></div>
                  <div><span
style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">-
                      Apply a correction grid. Yes, in the projected
                      system.<br>
                    </span></div>
                  <div><span
style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">-
                      (optional) go back from the projected to the
                      geographic crs.</span></div>
                  <div><span
style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none"><br>
                    </span></div>
                  <div><span
style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">I
                      thought about several options:<br>
                    </span></div>
                  <div><span
style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none"><br>
                    </span></div>
                  <div><span
style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">-
                      First option: create a WKT2 with a BOUNDCRS that
                      defines the transformation. Can it be done in a
                      single WKT2?<br>
                    </span></div>
                  <div><span
style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">-
                      Second option: add the transformation to proj.db.
                      Is it doable?<br>
                    </span></div>
                  <div><span
style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">-
                      Third option: Create "my own grid" file (in the
                      geographic system) combining all the steps. Of
                      course, it will loose some accuracy due to the new
                      grid interpolation.<br>
                    </span></div>
                  <div><span
style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none"><br>
                    </span></div>
                  <div><span
style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">Any
                      clue?</span></div>
                  <div><span
style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px;white-space:normal;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;display:inline;float:none">Thanks.<br>
                    </span></div>
                </div>
                <br>
                <fieldset></fieldset>
                <pre>_______________________________________________
PROJ mailing list
<a href="mailto:PROJ@lists.osgeo.org" target="_blank"
                moz-do-not-send="true" class="moz-txt-link-freetext">PROJ@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/proj" target="_blank"
                moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/proj</a>
</pre>
              </blockquote>
              <pre cols="72">-- 
<a href="http://www.spatialys.com" target="_blank"
              moz-do-not-send="true" class="moz-txt-link-freetext">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
            </div>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>