<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><font face="monospace">Terra,</font></p>
    <p><font face="monospace">you didn't specify how you got GDAL and
        PROJ, and which versions of those you use.<br>
      </font></p>
    <p><font face="monospace">Make sure to solve the
        "proj_create_from_database: Cannot find proj.db" error. Check if
        the PROJ_LIB environment is set and if it points to the
        directory where proj.db is placed<br>
      </font></p>
    <p><font face="monospace">The "free(): invalid pointer" error could
        also suggest that you have several PROJ versions that are linked
        at runtime by GDAL.<br>
      </font></p>
    <p><font face="monospace">Even<br>
      </font></p>
    <div class="moz-cite-prefix">Le 09/11/2022 à 17:54, Terra Frost a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAKY7Jh5G_zkCcRJ4h4pKryUw5-yUnvyw3xR66CKtsKc=uxotkw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">I have two TIFs that I'm able to run <font
          face="monospace">gdal2tiles</font> on without issue, however,
        when I do <font face="monospace">gdal_merge</font> I am unable
        to do <font face="monospace">gdal2tiles</font> on the result.
        When I did <font face="monospace">gdal_merge</font> on the two
        TIFs I got this warning:<br>
        <div><br>
        </div>
        <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
          <div><font face="monospace">Warning 1: PROJ:
              proj_create_from_database: Cannot find proj.db</font></div>
          <div><font face="monospace">Warning 1: The definition of
              projected CRS EPSG:3857 got from GeoTIFF keys is not the
              same as the one from the EPSG registry, which may cause
              issues during reprojection operations. Set
              GTIFF_SRS_SOURCE configuration option to EPSG to use
              official parameters (overriding the ones from GeoTIFF
              keys), or to GEOKEYS to use custom values from GeoTIFF
              keys and drop the EPSG code.</font></div>
          <div><font face="monospace">Warning 1: PROJ:
              proj_create_from_database: Cannot find proj.db</font></div>
          <div><font face="monospace">Warning 1: The definition of
              projected CRS EPSG:3857 got from GeoTIFF keys is not the
              same as the one from the EPSG registry, which may cause
              issues during reprojection operations. Set
              GTIFF_SRS_SOURCE configuration option to EPSG to use
              official parameters (overriding the ones from GeoTIFF
              keys), or to GEOKEYS to use custom values from GeoTIFF
              keys and drop the EPSG code.</font></div>
          <div><font face="monospace">0...10...20...30...40...50...60...70...80...90...100
              - done.</font></div>
        </blockquote>
        <div><br>
        </div>
        <div>Despite the warning the two TIFs merged without issue,
          however, when I try to run <font face="monospace">gdal2tiles</font>
          on the merged TIF I get this error:<br>
        </div>
        <div><br>
        </div>
        <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
          <div><font face="monospace">Traceback (most recent call last):</font></div>
          <div><font face="monospace">  File "/usr/bin/gdal2tiles.py",
              line 16, in <module></font></div>
          <div><font face="monospace">    sys.exit(main(sys.argv))</font></div>
          <div><font face="monospace">  File
              "/usr/lib/python3/dist-packages/osgeo_utils/gdal2tiles.py",
              line 3314, in main</font></div>
          <div><font face="monospace">   
              single_threaded_tiling(input_file, output_folder, options)</font></div>
          <div><font face="monospace">  File
              "/usr/lib/python3/dist-packages/osgeo_utils/gdal2tiles.py",
              line 3229, in single_threaded_tiling</font></div>
          <div><font face="monospace">    conf, tile_details =
              worker_tile_details(input_file, output_folder, options)</font></div>
          <div><font face="monospace">  File
              "/usr/lib/python3/dist-packages/osgeo_utils/gdal2tiles.py",
              line 3145, in worker_tile_details</font></div>
          <div><font face="monospace">    gdal2tiles.open_input()</font></div>
          <div><font face="monospace">  File
              "/usr/lib/python3/dist-packages/osgeo_utils/gdal2tiles.py",
              line 1797, in open_input</font></div>
          <div><font face="monospace">    self.warped_input_dataset =
              reproject_dataset(</font></div>
          <div><font face="monospace">  File
              "/usr/lib/python3/dist-packages/osgeo_utils/gdal2tiles.py",
              line 987, in reproject_dataset</font></div>
          <div><font face="monospace">    to_dataset =
              gdal.AutoCreateWarpedVRT(from_dataset,</font></div>
          <div><font face="monospace">  File
              "/usr/lib/python3/dist-packages/osgeo/gdal.py", line 3976,
              in AutoCreateWarpedVRT</font></div>
          <div><font face="monospace">    return
              _gdal.AutoCreateWarpedVRT(*args)</font></div>
          <div><font face="monospace">RuntimeError: Cannot find
              coordinate operations from
`ENGCRS["WGS_1984_Web_Mercator_Auxiliary_Sphere",EDATUM[""],CS[Cartesian,2],AXIS["easting",east,ORDER[1],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["northing",north,ORDER[2],LENGTHUNIT["metre",1,ID["EPSG",9001]]]]'
              to `EPSG:3857'</font></div>
          <div><font face="monospace">free(): invalid pointer</font></div>
          <div><font face="monospace">Aborted</font></div>
        </blockquote>
        <div><br>
        </div>
        <div>When I do <font face="monospace">gdalinfo</font> on the
          merged TIF I get this:<br>
        </div>
        <div><br>
        </div>
        <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
          <div><font face="monospace">Corner Coordinates:</font></div>
          <div><font face="monospace">Upper Left  (-10880978.065,
              3538629.874)</font></div>
          <div><font face="monospace">Lower Left  (-10880978.065,
              3537702.774)</font></div>
          <div><font face="monospace">Upper Right (-10880302.765,
              3538629.874)</font></div>
          <div><font face="monospace">Lower Right (-10880302.765,
              3537702.774)</font></div>
          <div><font face="monospace">Center      (-10880640.415,
              3538166.324)</font></div>
          <div><font face="monospace"><br>
            </font></div>
        </blockquote>
        When I do <font face="monospace">gdalinfo</font> on the two
        TIFs that I merged I get this:<font face="monospace"><br>
        </font>
        <div><br>
        </div>
        <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
          <div><font face="monospace">Upper Left  (-10880811.355,
              3538629.874)</font></div>
          <div><font face="monospace">Lower Left  (-10880811.355,
              3538052.574)</font></div>
          <div><font face="monospace">Upper Right (-10880302.755,
              3538629.874)</font></div>
          <div><font face="monospace">Lower Right (-10880302.755,
              3538052.574)</font></div>
          <div><font face="monospace">Center      (-10880557.055,
              3538341.224)</font></div>
        </blockquote>
        <div><br>
        </div>
        <div>...and...</div>
        <div><br>
        </div>
        <blockquote style="margin:0 0 0 40px;border:none;padding:0px">
          <div><font face="monospace">Upper Left  (-10880978.065,
              3538273.090)</font></div>
          <div><font face="monospace">Lower Left  (-10880978.065,
              3537702.790)</font></div>
          <div><font face="monospace">Upper Right (-10880474.265,
              3538273.090)</font></div>
          <div><font face="monospace">Lower Right (-10880474.265,
              3537702.790)</font></div>
          <div><font face="monospace">Center      (-10880726.165,
              3537987.940)</font></div>
        </blockquote>
        <div><br>
        </div>
        <div>Any ideas?</div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
    </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>