<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,</p>
    <p>There might 2 potential issues here: being close to the
      antimeridian (and potentially slightly crossing it, but not
      visible here with the rounding used to display coordinates), and
      being close to the pole. I think that might be the later reason
      here. Basically EPSG:3857 can't be reasonably used beyond 85
      degrees of latitude. Latitudes of +/- 90 project to infinity in
      mercator projection...</p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 29/03/2021 à 17:24, Hotmail a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:PR3P193MB0507C1A41BBC6A7F9FF0D91AB67E9@PR3P193MB0507.EURP193.PROD.OUTLOOK.COM">Hi,
      <div class="">
        <div class=""><br class="">
        </div>
        <div class="">From a png file library (524288 tiles of
          256x256px), I georeference them using gdal_translate like this
          :</div>
        <div class="">=> gdal_translate -of VRT -a_srs EPSG: 4326
          -a_nodata 255 PATH / FILE.png PATH / FILE.vrt -a_ullr ULLR</div>
      </div>
      <div class=""><br class="">
      </div>
      <div class="">Then I use gdalwarp to reproject them like this :</div>
      <div class="">=> gdalwarp -overwrite -s_srs EPSG:4326 -t_srs
        EPSG:3857 -co COMPRESS=LZW PATH/FILE.vrt PATH/FILE.tiff</div>
      <div class=""><br class="">
      </div>
      <div class="">524286 tiles, out of 524288, work without any
        problem but 2 gives me an error message …</div>
      <div class=""><br class="">
      </div>
      <div class="">The 2 .vrt files of these tiles tell me this :</div>
      <div class=""><br class="">
      </div>
      <div class="">
        <div class=""><span class="">Driver: VRT/Virtual Raster</span></div>
        <div class=""><span class="">Files: map_11_1023_0.vrt</span></div>
        <div class=""><span class="">      
            /Users/romain/VRTiles/bw_png/map_11_1023_0.png</span></div>
        <div class=""><span class="">Size is 256, 256</span></div>
        <div class=""><span class="">Coordinate System is:</span></div>
        <div class=""><span class="">GEOGCRS["WGS 84",</span></div>
        <div class=""><span class="">    DATUM["World Geodetic System
            1984",</span></div>
        <div class=""><span class="">        ELLIPSOID["WGS
            84",6378137,298.257223563,</span></div>
        <div class=""><span class="">           
            LENGTHUNIT["metre",1]]],</span></div>
        <div class=""><span class="">    PRIMEM["Greenwich",0,</span></div>
        <div class=""><span class="">       
            ANGLEUNIT["degree",0.0174532925199433]],</span></div>
        <div class=""><span class="">    CS[ellipsoidal,2],</span></div>
        <div class=""><span class="">        AXIS["geodetic latitude
            (Lat)",north,</span></div>
        <div class=""><span class="">            ORDER[1],</span></div>
        <div class=""><span class="">           
            ANGLEUNIT["degree",0.0174532925199433]],</span></div>
        <div class=""><span class="">        AXIS["geodetic longitude
            (Lon)",east,</span></div>
        <div class=""><span class="">            ORDER[2],</span></div>
        <div class=""><span class="">           
            ANGLEUNIT["degree",0.0174532925199433]],</span></div>
        <div class=""><span class="">    ID["EPSG",4326]]</span></div>
        <div class=""><span class="">Data axis to CRS axis mapping: 2,1</span></div>
        <div class=""><span class="">Origin =
            (179.648437500000000,90.000000000000000)</span></div>
        <div class=""><span class="">Pixel Size =
            (0.001373291015625,-0.001373291015625)</span></div>
        <div class=""><span class="">Corner Coordinates:</span></div>
        <div class=""><span class="">Upper Left  ( 179.6484375, 
            90.0000000) (179d38'54.38"E, 90d 0' 0.00"N)</span></div>
        <div class=""><span class="">Lower Left  ( 179.6484375, 
            89.6484375) (179d38'54.38"E, 89d38'54.38"N)</span></div>
        <div class=""><span class="">Upper Right ( 180.0000000, 
            90.0000000) (180d 0' 0.00"E, 90d 0' 0.00"N)</span></div>
        <div class=""><span class="">Lower Right ( 180.0000000, 
            89.6484375) (180d 0' 0.00"E, 89d38'54.38"N)</span></div>
        <div class=""><span class="">Center      ( 179.8242188, 
            89.8242188) (179d49'27.19"E, 89d49'27.19"N)</span></div>
        <div class=""><span class="">Band 1 Block=128x128 Type=Byte,
            ColorInterp=Palette</span></div>
        <div class=""><span class="">  NoData Value=255</span></div>
        <div class=""><span class="">  Image Structure Metadata:</span></div>
        <div class=""><span class="">    NBITS=1</span></div>
        <div class=""><span class="">  Color Table (RGB with 2 entries)</span></div>
        <div class=""><span class="">    0: 0,0,0,255</span></div>
        <div class=""><span class="">    1: 255,255,255,255</span></div>
      </div>
      <div class=""><br class="">
      </div>
      <div class="">
        <div class=""><span class="">Driver: VRT/Virtual Raster</span></div>
        <div class=""><span class="">Files: map_11_1023_511.vrt</span></div>
        <div class=""><span class="">      
            /Users/romain/VRTiles/bw_png/map_11_1023_511.png</span></div>
        <div class=""><span class="">Size is 256, 256</span></div>
        <div class=""><span class="">Coordinate System is:</span></div>
        <div class=""><span class="">GEOGCRS["WGS 84",</span></div>
        <div class=""><span class="">    DATUM["World Geodetic System
            1984",</span></div>
        <div class=""><span class="">        ELLIPSOID["WGS
            84",6378137,298.257223563,</span></div>
        <div class=""><span class="">           
            LENGTHUNIT["metre",1]]],</span></div>
        <div class=""><span class="">    PRIMEM["Greenwich",0,</span></div>
        <div class=""><span class="">       
            ANGLEUNIT["degree",0.0174532925199433]],</span></div>
        <div class=""><span class="">    CS[ellipsoidal,2],</span></div>
        <div class=""><span class="">        AXIS["geodetic latitude
            (Lat)",north,</span></div>
        <div class=""><span class="">            ORDER[1],</span></div>
        <div class=""><span class="">           
            ANGLEUNIT["degree",0.0174532925199433]],</span></div>
        <div class=""><span class="">        AXIS["geodetic longitude
            (Lon)",east,</span></div>
        <div class=""><span class="">            ORDER[2],</span></div>
        <div class=""><span class="">           
            ANGLEUNIT["degree",0.0174532925199433]],</span></div>
        <div class=""><span class="">    ID["EPSG",4326]]</span></div>
        <div class=""><span class="">Data axis to CRS axis mapping: 2,1</span></div>
        <div class=""><span class="">Origin =
            (179.648437500000000,-89.648437500000000)</span></div>
        <div class=""><span class="">Pixel Size =
            (0.001373291015625,-0.001373291015625)</span></div>
        <div class=""><span class="">Corner Coordinates:</span></div>
        <div class=""><span class="">Upper Left  ( 179.6484375,
            -89.6484375) (179d38'54.38"E, 89d38'54.38"S)</span></div>
        <div class=""><span class="">Lower Left  ( 179.6484375,
            -90.0000000) (179d38'54.38"E, 90d 0' 0.00"S)</span></div>
        <div class=""><span class="">Upper Right ( 180.0000000,
            -89.6484375) (180d 0' 0.00"E, 89d38'54.38"S)</span></div>
        <div class=""><span class="">Lower Right ( 180.0000000,
            -90.0000000) (180d 0' 0.00"E, 90d 0' 0.00"S)</span></div>
        <div class=""><span class="">Center      ( 179.8242188,
            -89.8242188) (179d49'27.19"E, 89d49'27.19"S)</span></div>
        <div class=""><span class="">Band 1 Block=128x128 Type=Byte,
            ColorInterp=Palette</span></div>
        <div class=""><span class="">  NoData Value=255</span></div>
        <div class=""><span class="">  Image Structure Metadata:</span></div>
        <div class=""><span class="">    NBITS=1</span></div>
        <div class=""><span class="">  Color Table (RGB with 2 entries)</span></div>
        <div class=""><span class="">    0: 0,0,0,255</span></div>
        <div class=""><span class="">    1: 255,255,255,255</span></div>
      </div>
      <div class=""><br class="">
      </div>
      <div class=""><br class="">
      </div>
      <div class=""><u class="">gdalwarp errors :</u></div>
      <div class="">• the first one give me this :</div>
      <div class=""><br class="">
      </div>
      <div class="">
        <div class=""><span class="">Creating output file that is
            -2147483648P x 362L.</span></div>
        <div class=""><span class="">ERROR 1: Attempt to create
            -2147483648x362 dataset is illegal,sizes must be larger than
            zero.</span></div>
      </div>
      <div class=""><br class="">
      </div>
      <div class="">• the second one give me this :</div>
      <div class=""><br class="">
      </div>
      <div class="">
        <div class=""><span class="">Creating output file that is
            -2147483648P x 362L.</span></div>
        <div class=""><span class="">ERROR 1: Attempt to create
            -2147483648x362 dataset is illegal,sizes must be larger than
            zero.</span></div>
      </div>
      <div class=""><br class="">
      </div>
      <div class="">And I don't understand why ... what am I doing that
        is not correct since it works well on all the other tiles?</div>
      <div class=""><br class="">
      </div>
      <div class="">I use <span class="">GDAL 3.2.2, released 2021/03/05</span></div>
      <div class=""><br class="">
      </div>
      <div class="">Thanks</div>
      <div class=""><br class="">
      </div>
      <div class="">Romain</div>
      <br>
      <fieldset class="mimeAttachmentHeader"></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>