<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Dear all,<br>
    <br>
    Overall, I'm trying to convert ESRI SHAPE data, given in "Web
    Mercator" EPSG:3857 , to a TIF in   ETRS89 / UTM Zone 32U ,
    EPSG:25832 .<br>
    <br>
    The GDAL Version is the one included in current stable Debian,
    <a class="moz-txt-link-freetext" href="https://packages.debian.org/bookworm/gdal-bin">https://packages.debian.org/bookworm/gdal-bin</a> ,  gdal-bin
    (3.6.2+dfsg-1 and others) <br>
    <br>
    The first step, rasterization, works flawless:<br>
        gdal_rasterize -a_srs EPSG:3857 -tr 10 10 -burn 1 q.shp q.tif<br>
    <br>
    gdalinfo lists the file as: (full text attached)<br>
    <blockquote>....<br>
      Coordinate System is:<br>
      PROJCRS["WGS 84 / Pseudo-Mercator",<br>
          BASEGEOGCRS["WGS 84",<br>
              ENSEMBLE["World Geodetic System 1984 ensemble",<br>
                  MEMBER["World Geodetic System 1984 (Transit)"],<br>
      ..<br>
      Corner Coordinates:<br>
      Upper Left  (  836370.121, 6080896.490) (  7d30'47.67"E,
      47d50'37.43"N)<br>
      Lower Left  (  836370.121, 6045996.490) (  7d30'47.67"E,
      47d37'58.40"N)<br>
      Upper Right (  887980.121, 6080896.490) (  7d58'36.70"E,
      47d50'37.43"N)<br>
      Lower Right (  887980.121, 6045996.490) (  7d58'36.70"E,
      47d37'58.40"N)<br>
      Center      (  862175.121, 6063446.490) (  7d44'42.18"E,
      47d44'18.30"N)<br>
      Band 1 Block=5161x1 Type=Float64, ColorInterp=Gray<br>
    </blockquote>
    Running the lower left corner through gdaltransform gives plausible
    ETRS89 coordinates :<br>
    <blockquote>echo  836375.120800 6045997.312000 | gdaltransform
      -s_srs EPSG:3857 -t_srs EPSG:25832<br>
      388314.422838145 5276569.91979615 0<br>
    </blockquote>
    However, running the TIF through gdalwarp, and checking the result
    with gdalinfo, does not show a plausible bounding box:<br>
    <blockquote>gdalwarp  -s_srs EPSG:3857 -t_srs EPSG:25832 q.tif w.tif<br>
      gdalinfo w.tif<br>
      ...<br>
      Corner Coordinates:<br>
      Upper Left  (  836370.121, 6080896.490) (Invalid angle,Invalid
      angle)<br>
      Lower Left  (  836370.121, 6045996.490) (Invalid angle,Invalid
      angle)<br>
      Upper Right (  887980.121, 6080896.490) (Invalid angle,Invalid
      angle)<br>
      Lower Right (  887980.121, 6045996.490) (Invalid angle,Invalid
      angle)<br>
      Center      (  862175.121, 6063446.490) (Invalid angle,Invalid
      angle)<br>
    </blockquote>
    Looks like it passes gdalwarp unchanged.<br>
    <br>
    Apparently, I'm overlooking something obvious.<br>
    Any pointers much appreciated,<br>
    thanks, best regards, have a nice Sunday and thanks for GDAL !<br>
    Peter<br>
  </body>
</html>