<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Le 12/10/2022 à 22:12, Andrew Patterson
      a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAC8biO2Hk1Zcwuv9wo8NoPTv2W3h_6g4L2h+Gh3dQoAPccqjvQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Even,
        <div><br>
        </div>
        <div>I can share both, but presumably I shouldn't (or can't?)
          post the PDF to the mailing list. Should I create an issue on
          GitHub and post the PDF and other information there?</div>
      </div>
    </blockquote>
    yes please<br>
    <blockquote type="cite"
cite="mid:CAC8biO2Hk1Zcwuv9wo8NoPTv2W3h_6g4L2h+Gh3dQoAPccqjvQ@mail.gmail.com">
      <div dir="ltr">
        <div><br>
        </div>
        <div>The transformation is from WGS84 into the CRS of the map
          (or in this case, PDF). We render the PDF in its native
          projection and the points in question are stored in lat/long
          in the KML file, so they are being projected from WGS84 to
          Equidistant Cylindrical and then transformed into pixels by a
          second stage transformation. The latter hasn't changed between
          the two versions of the app, so it's presumably the WGS84
          -> Equidistant Cylindrical where the problem lies.</div>
      </div>
    </blockquote>
    hum, weird, this is the most simple projection you can imagine...<br>
    <blockquote type="cite"
cite="mid:CAC8biO2Hk1Zcwuv9wo8NoPTv2W3h_6g4L2h+Gh3dQoAPccqjvQ@mail.gmail.com"><br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Wed, Oct 12, 2022 at 2:48
          PM Even Rouault <<a
            href="mailto:even.rouault@spatialys.com"
            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>Andrew,</p>
            <p>the PDF file would be needed to analyze this, as well as
              the target CRS you are reprojecting into with your app.<br>
            </p>
            <p>I suspect that the "proj_create_from_database: crs not
              found" error might come from the fact that the PDF
              contains a WKT string with AUTHORITY["Esri","102422"], and
              PROJ currently only understands "ESRI" as the authority,
              and not "Esri". It should probably be laxer regarding
              that. That said, I'm not sure that explains a difference
              in positioning. It is probably more that recent PROJ
              versions can apply datum shifts more often than older
              ones, so things might behave as expected.<br>
            </p>
            <p>Even<br>
            </p>
            <div>Le 12/10/2022 à 20:04, Andrew Patterson a écrit :<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">
                <div>Hello everyone!</div>
                <div><br>
                </div>
                <div>I posted an issue, #3186, involving Equidistant
                  Cylindrical back in May. It was fixed (very quickly I
                  might add) and I applied the patch to our version of
                  PROJ without an issue, solving the problem.</div>
                <div><br>
                </div>
                <div>Since then, however, I've been given a PDF with an
                  Equirectangular/Equidistant Cylindrical projection
                  that is giving me some grief. My QA team has created a
                  KMl file with three positions on this map that when
                  imported to an earlier version of our app using GDAL
                  2.4, properly positioned the placemarks where they are
                  expected. If I do the same with the current version of
                  our app, running GDAL 3.4, these placemarks appear
                  west & south of where they should be. I know I'm
                  talking about GDAL here, but I'm pretty sure this is a
                  PROJ issue for both the obvious reason that it's a
                  transformation and for another that I'll get to
                  momentarily.</div>
                <div><br>
                </div>
                <div>I downloaded GDAL binaries for 2.4 & 3.5.2 and
                  ran gdalinfo -proj4 against the PDF file and I get the
                  following outputs (I've removed everything but the
                  WKTs & proj4 string):</div>
                <div><br>
                </div>
                <div>GDAL 2.4:</div>
                <div>---------------------------------------------------------------------------------------------</div>
                <div>Driver: PDF/Geospatial PDF<br>
                  Files: 11.2 - Cape Spear Path - Blackhead to Maddox
                  Cove GEO.pdf<br>
                  Size is 1275, 1650<br>
                  Coordinate System is:<br>
                  PROJCS["WGS_1984_ARC_System_Zone_02",<br>
                      GEOGCS["GCS_WGS_1984",<br>
                          DATUM["WGS_1984",<br>
                             
                  SPHEROID["WGS_84",6378137.0,298.257223563]],<br>
                          PRIMEM["Greenwich",0.0],<br>
                          UNIT["Degree",0.0174532925199433]],<br>
                      PROJECTION["Equirectangular"],<br>
                      PARAMETER["False_Easting",0.0],<br>
                      PARAMETER["False_Northing",0.0],<br>
                      PARAMETER["Central_Meridian",0.0],<br>
                      PARAMETER["Standard_Parallel_1",41.12682127],<br>
                      UNIT["Meter",1.0],<br>
                      AUTHORITY["Esri","102422"]]<br>
                  PROJ.4 string is:<br>
                  '+proj=eqc +lat_ts=41.12682127 +lat_0=0 +lon_0=0
                  +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '<br>
                </div>
                <div>---------------------------------------------------------------------------------------------<br>
                </div>
                <div><br>
                </div>
                <div>GDAL 3.5.2:</div>
                <div>---------------------------------------------------------------------------------------------<br>
                </div>
                <div>ERROR 1: PROJ: proj_create_from_database: crs not
                  found<br>
                  Driver: PDF/Geospatial PDF<br>
                  Files: 11.2 - Cape Spear Path - Blackhead to Maddox
                  Cove GEO.pdf<br>
                  Size is 1275, 1650<br>
                  Coordinate System is:<br>
                  PROJCRS["WGS_1984_ARC_System_Zone_02",<br>
                      BASEGEOGCRS["WGS 84",<br>
                          DATUM["World Geodetic System 1984",<br>
                              ELLIPSOID["WGS 84",6378137,298.257223563,<br>
                                  LENGTHUNIT["metre",1]],<br>
                              ID["EPSG",6326]],<br>
                          PRIMEM["Greenwich",0,<br>
                              ANGLEUNIT["Degree",0.0174532925199433]]],<br>
                      CONVERSION["unnamed",<br>
                          METHOD["Equidistant Cylindrical",<br>
                              ID["EPSG",1028]],<br>
                          PARAMETER["Latitude of 1st standard
                  parallel",41.12682127,<br>
                              ANGLEUNIT["Degree",0.0174532925199433],<br>
                              ID["EPSG",8823]],<br>
                          PARAMETER["Longitude of natural origin",0,<br>
                              ANGLEUNIT["Degree",0.0174532925199433],<br>
                              ID["EPSG",8802]],<br>
                          PARAMETER["False easting",0,<br>
                              LENGTHUNIT["metre",1],<br>
                              ID["EPSG",8806]],<br>
                          PARAMETER["False northing",0,<br>
                              LENGTHUNIT["metre",1],<br>
                              ID["EPSG",8807]]],<br>
                      CS[Cartesian,2],<br>
                          AXIS["(E)",east,<br>
                              ORDER[1],<br>
                              LENGTHUNIT["metre",1,<br>
                                  ID["EPSG",9001]]],<br>
                          AXIS["(N)",north,<br>
                              ORDER[2],<br>
                              LENGTHUNIT["metre",1,<br>
                                  ID["EPSG",9001]]]]<br>
                  Data axis to CRS axis mapping: 1,2<br>
                  PROJ.4 string is:<br>
                  '+proj=eqc +lat_ts=41.12682127 +lat_0=0 +lon_0=0
                  +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs'<br>
                </div>
                <div>---------------------------------------------------------------------------------------------<br>
                </div>
                <div><br>
                </div>
                <div>Now, obviously the fact that it has a PROJ error at
                  the top in 3.5.2 is what points me at PROJ rather than
                  GDAL, even if it wasn't likely just for being anyways
                  just for being a transformation problem. Just to be on
                  the safe side, I repealed the fix for #3186 to make
                  sure that wasn't somehow causing this problem, and no,
                  the problem remains even if I pull that fix out (of
                  our app, not gdalinfo). I also tried feeding in the
                  WKT from 3.5.2 that the original WKT gets transformed
                  into (this was a workaround for #3186) but that didn't
                  help.</div>
                <div><br>
                </div>
                <div>Any idea on what the problem might be? I'm happy to
                  provide more information if needed (and even the file
                  it would help!). I'm assuming that error is the key
                  piece though. Unfortunately, when I debug our app, I
                  never hit that line; it always manages to pull the SRC
                  from the cache (it never seems to ask for anything
                  other than EPSG 4326)</div>
                <div><br>
                  Any help would be greatly appreciated!</div>
                <div><span style="font-size:12.8px"><br>
                  </span></div>
                <div><span style="font-size:12.8px">..............................</span><br>
                </div>
                <div dir="ltr">
                  <div dir="ltr">
                    <div>Andrew Patterson</div>
                    <div>Lead Software Architect</div>
                    <div>Avenza Systems Inc.</div>
                    <div><br>
                    </div>
                    <div>email: <a href="mailto:andrew@avenza.com"
                        target="_blank" moz-do-not-send="true"
                        class="moz-txt-link-freetext">andrew@avenza.com</a></div>
                    <div>phone: 416.487.5116 </div>
                  </div>
                </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>
      <br clear="all">
      <div><br>
      </div>
      -- <br>
      <div dir="ltr" class="gmail_signature">
        <div dir="ltr">
          <div><span style="font-size:12.8px">..............................</span><br>
          </div>
          <div>Andrew Patterson</div>
          <div>Lead Software Architect</div>
          <div>Avenza Systems Inc.</div>
          <div><br>
          </div>
          <div>email: <a href="mailto:andrew@avenza.com"
              target="_blank" moz-do-not-send="true"
              class="moz-txt-link-freetext">andrew@avenza.com</a></div>
          <div>phone: 416.487.5116 </div>
        </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>