<div dir="ltr">Thanks Even :-)<div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 18, 2024 at 3:48 PM Even Rouault <<a href="mailto:even.rouault@spatialys.com">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"><u></u>

  
    
  
  <div>
    <p>cf improvement <a href="https://github.com/OSGeo/gdal/pull/9101" target="_blank">https://github.com/OSGeo/gdal/pull/9101</a></p>
    <p><a href="https://docs.ogc.org/is/17-083r2/17-083r2.html#76" target="_blank">https://docs.ogc.org/is/17-083r2/17-083r2.html#76</a> mentions "TileMatrices
      for more detailed scales is possible if they follow the same
      pattern."  . The current limitation to 25 was to make some
      computations easier, but supporting up to 30 (or 29 when
      MatrixWidth=2 at zoom level = 0) is now possible.<br>
    </p>
    <div>Le 18/01/2024 à 15:35, Rahkonen Jukka
      via gdal-dev a écrit :<br>
    </div>
    <blockquote type="cite">
      
      
      
      <div>
        <p class="MsoNormal"><span>Hi,<u></u><u></u></span></p>
        <p class="MsoNormal"><span><u></u> <u></u></span></p>
        <p class="MsoNormal"><span lang="EN-US">I am not sure how standard the level 25 is for
            the
          </span><span lang="EN-US">InspireCRS84Quad, the INSPIRE
            technical guidance stops at 17. But I believe that you know
            your own use case and have considered also that EPSG:3857 at
            1 mm resolution is good for you</span><span lang="EN-US">.<br>
            <br>
            The number of tiles at level 25 is 2^50=</span><span style="color:black" lang="EN-US"> 1.1259E+15. TileCol and
            TileRow would get rather large numbers but I suppose that it
            is not an issue.<u></u><u></u></span></p>
        <p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
        <p class="MsoNormal"><span lang="EN-US">-Jukka Rahkonen-<u></u><u></u></span></p>
        <p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
        <div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
          <p class="MsoNormal"><b>Lähettäjä:</b> Philippe Ghesquiere
            <a href="mailto:philippe.ghesquiere@airbus.com" target="_blank"><philippe.ghesquiere@airbus.com></a>
            <br>
            <b>Lähetetty:</b> torstai 18. tammikuuta 2024 16.06<br>
            <b>Vastaanottaja:</b> Rahkonen Jukka
            <a href="mailto:jukka.rahkonen@maanmittauslaitos.fi" target="_blank"><jukka.rahkonen@maanmittauslaitos.fi></a><br>
            <b>Kopio:</b> gdal-dev <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank"><gdal-dev@lists.osgeo.org></a><br>
            <b>Aihe:</b> Re: [gdal-dev] GPKG raster creation : error
            with too small resolution<u></u><u></u></p>
        </div>
        <p class="MsoNormal"><u></u> <u></u></p>
        <div>
          <p class="MsoNormal">Hi Jukka,<u></u><u></u></p>
          <div>
            <p class="MsoNormal"><u></u> <u></u></p>
          </div>
          <div>
            <p class="MsoNormal">I have no choice but to use the
              standard InspireCRS84Quad tiling grid.<u></u><u></u></p>
          </div>
          <div>
            <p class="MsoNormal"><u></u> <u></u></p>
          </div>
          <div>
            <p class="MsoNormal">Thanks for the "-a_ullr fix"<u></u><u></u></p>
          </div>
          <div>
            <p class="MsoNormal"><u></u> <u></u></p>
          </div>
          <div>
            <p class="MsoNormal">Philippe<u></u><u></u></p>
          </div>
          <div>
            <p class="MsoNormal"><u></u> <u></u></p>
          </div>
        </div>
        <p class="MsoNormal"><u></u> <u></u></p>
        <div>
          <div>
            <p class="MsoNormal">On Thu, Jan 18, 2024 at 2:42 PM
              Rahkonen Jukka <<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi" target="_blank">jukka.rahkonen@maanmittauslaitos.fi</a>>
              wrote:<u></u><u></u></p>
          </div>
          <blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin:5pt 0cm 5pt 4.8pt">
            <div>
              <div>
                <div>
                  <p class="MsoNormal">Hi,<u></u><u></u></p>
                  <p class="MsoNormal"> <u></u><u></u></p>
                  <p class="MsoNormal"><span lang="EN-US">Can you imagine using a custom tiling
                      schema instead of the world-wide
                    </span>InspireCRS84Quad<span lang="EN-US">? These
                      commands work<br>
                      <br>
                      gdal_create -of GTiff -co COMPRESS=DEFLATE
                      -outsize 2000 2000 -burn 255 -burn 0 -burn 0
                      -bands 3 -ot Byte -a_srs epsg:32631 -a_ullr
                      1000000 1000002 1000002 1000000 1mm.tif<br>
                      <br>
                      gdal_translate -of GPKG  1mm.tif 1mm.gpkg<br>
                      <br>
                      Notice the fixed ullr for making the image
                      north-up.</span><u></u><u></u></p>
                  <p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
                  <p class="MsoNormal"><span lang="EN-US">-Jukka Rahkonen-<br>
                      <br>
                      <br>
                      <br>
                      gdal_translate -of GPKG  1mm.tif 1mm.gpkg</span><u></u><u></u></p>
                  <p class="MsoNormal"><span lang="EN-US">Input file size is 2000, 2000</span><u></u><u></u></p>
                  <p class="MsoNormal"><span lang="EN-US">0ERROR 6: Only north-up non rotated
                      geotransform supported</span><u></u><u></u></p>
                  <p class="MsoNormal"><span lang="EN-US">..ERROR 1: Raster table 1mm not
                      correctly initialized due to missing call to
                      SetGeoTransform()</span><u></u><u></u></p>
                  <p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
                  <div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
                    <p class="MsoNormal"><b>Lähettäjä:</b>
                      gdal-dev <<a href="mailto:gdal-dev-bounces@lists.osgeo.org" target="_blank">gdal-dev-bounces@lists.osgeo.org</a>>
                      <b>Puolesta </b>Philippe Ghesquiere via gdal-dev<br>
                      <b>Lähetetty:</b> torstai 18. tammikuuta 2024
                      15.22<br>
                      <b>Vastaanottaja:</b> gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>><br>
                      <b>Aihe:</b> [gdal-dev] GPKG raster creation :
                      error with too small resolution<u></u><u></u></p>
                  </div>
                  <p class="MsoNormal"> <u></u><u></u></p>
                  <div>
                    <p class="MsoNormal"> <u></u><u></u></p>
                    <div>
                      <p class="MsoNormal">Dear all,<br>
                        <br>
                        I just had an error while converting an image to
                        GPKG. This image has a very small resolution and
                        gdal_translate pops up an error message.<br>
                        <br>
                        <u>Test image :</u><br>
                        gdal_create -of GTiff -co COMPRESS=DEFLATE
                        -outsize 2000 2000 -burn 255 -burn 0 -burn 0
                        -bands 3 -ot Byte -a_srs epsg:32631 -a_ullr
                        1000000 1000000 1000002 1000002 1mm.tif<br>
                        <br>
                        <u>Conversion to GPKG :</u><br>
                        gdal_translate -of GPKG -co
                        TILING_SCHEME=InspireCRS84Quad -co
                        ZOOM_LEVEL_STRATEGY=UPPER 1mm.tif 1mm.gpkg<br>
                        Input file size is 2000, 2000<br>
                        ERROR 1: Could not find an appropriate zoom
                        level<br>
                        <br>
                        <u>Analysis</u><u></u><u></u></p>
                    </div>
                    <div>
                      <p class="MsoNormal">The error is
                        due to 
                        <a href="https://github.com/OSGeo/gdal/blob/master/ogr/ogrsf_frmts/gpkg/ogrgeopackagedatasource.cpp#L3169" title="Follow link" target="_blank">
                          ogrgeopackagedatasource.cpp</a> (line 3169),
                        and it does make sense : the zoom level is too
                        high (Z>25).<u></u><u></u></p>
                    </div>
                    <div>
                      <p class="MsoNormal"> <u></u><u></u></p>
                    </div>
                    <div>
                      <p class="MsoNormal">However,
                        wouldn't it be possible to modify gdal_translate
                        behavior ?<u></u><u></u></p>
                    </div>
                    <div>
                      <p class="MsoNormal">For example,
                        we could :<u></u><u></u></p>
                    </div>
                    <div>
                      <ul type="disc">
                        <li class="MsoNormal">
                          let GDAL compute the appropriate zoom level :
                          -co ZOOM_LEVEL_STRATEGY=AUTO/LOWER/UPPER,<u></u><u></u></li>
                        <li class="MsoNormal">
                          optionally specify a maximum zoom level : -co
                          MAX_ZOOM_LEVEL=18<u></u><u></u></li>
                      </ul>
                      <div>
                        <p class="MsoNormal">What do you
                          think ?<u></u><u></u></p>
                      </div>
                    </div>
                    <div>
                      <p class="MsoNormal"> <u></u><u></u></p>
                    </div>
                    <div>
                      <p class="MsoNormal">Philippe<u></u><u></u></p>
                    </div>
                    <div>
                      <p class="MsoNormal"> <u></u><u></u></p>
                    </div>
                  </div>
                  <p class="MsoNormal"><span style="font-size:7pt">The information in this
                      e-mail is confidential. The contents may not be
                      disclosed or used by anyone other than the
                      addressee. Access to this e-mail by anyone else is
                      unauthorised.<br>
                      If you are not the intended recipient, please
                      notify Airbus immediately and delete this e-mail.<br>
                      Airbus cannot accept any responsibility for the
                      accuracy or completeness of this e-mail as it has
                      been sent over public networks. If you have any
                      concerns over the content of this message or its
                      Accuracy or Integrity, please contact Airbus
                      immediately.<br>
                      All outgoing e-mails from Airbus are checked using
                      regularly updated virus scanning software but you
                      should take whatever measures you deem to be
                      appropriate to ensure that this message and any
                      attachments are virus free.</span><u></u><u></u></p>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <p class="MsoNormal"><span style="font-size:7pt">The
            information in this e-mail is confidential. The contents may
            not be disclosed or used by anyone other than the addressee.
            Access to this e-mail by anyone else is unauthorised.<br>
            If you are not the intended recipient, please notify Airbus
            immediately and delete this e-mail.<br>
            Airbus cannot accept any responsibility for the accuracy or
            completeness of this e-mail as it has been sent over public
            networks. If you have any concerns over the content of this
            message or its Accuracy or Integrity, please contact Airbus
            immediately.<br>
            All outgoing e-mails from Airbus are checked using regularly
            updated virus scanning software but you should take whatever
            measures you deem to be appropriate to ensure that this
            message and any attachments are virus free.</span><u></u><u></u></p>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
    </blockquote>
    <pre cols="72">-- 
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </div>

</blockquote></div>
<font style="font-size: 9px;">The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised.<br>If you are not the intended recipient, please notify Airbus immediately and delete this e-mail.<br>Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately.<br>All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.</font>