<div dir="ltr">You are right, I don't have to drink beer in the afternoon:)<div><br></div><div>Thank you very much</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 5 Oct 2021 at 15:57, Rahkonen Jukka (MML) <<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi">jukka.rahkonen@maanmittauslaitos.fi</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 lang="FI" style="overflow-wrap: break-word;">
<div class="gmail-m_7937844581732075785WordSection1">
<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">There is not so much wrong, you should just read
<a href="https://gdal.org/drivers/raster/wms.html" target="_blank">https://gdal.org/drivers/raster/wms.html</a> more carefully and write server URL this way:<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"> <ServerUrl><a href="https://tiles.wmflabs.org/osm-no-labels/$%7Bz%7D/$%7Bx%7D/$%7By%7D.png" target="_blank">https://tiles.wmflabs.org/osm-no-labels/${z}/${x}/${y}.png</a></ServerUrl><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>
<p class="MsoNormal"><span lang="EN-US"><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"><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> gdal-dev <<a href="mailto:gdal-dev-bounces@lists.osgeo.org" target="_blank">gdal-dev-bounces@lists.osgeo.org</a>>
<b>Puolesta </b>andy<br>
<b>Lähetetty:</b> tiistai 5. lokakuuta 2021 16.42<br>
<b>Vastaanottaja:</b> <a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<b>Aihe:</b> [gdal-dev] Not able to use gdal_translate and a TMS source<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<div>
<p class="MsoNormal">in QGIS I have set this XYZ source: <a href="https://tiles.wmflabs.org/osm-no-labels/%7bz%7d/%7bx%7d/%7by%7d.png" target="_blank">https://tiles.wmflabs.org/osm-no-labels/{z}/{x}/{y}.png</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">QGIS renders it properly.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I have created this GDAL source<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><GDAL_WMS><br>
<Service name="TMS"><br>
<ServerUrl><a href="https://tiles.wmflabs.org/osm-no-labels/%7bz%7d/%7bx%7d/%7by%7d.png" target="_blank">https://tiles.wmflabs.org/osm-no-labels/{z}/{x}/{y}.png</a></ServerUrl><br>
</Service><br>
<DataWindow><br>
<UpperLeftX>-20037508.34</UpperLeftX><br>
<UpperLeftY>20037508.34</UpperLeftY><br>
<LowerRightX>20037508.34</LowerRightX><br>
<LowerRightY>-20037508.34</LowerRightY><br>
<TileLevel>18</TileLevel><br>
<TileCountX>1</TileCountX><br>
<TileCountY>1</TileCountY><br>
<YOrigin>top</YOrigin><br>
</DataWindow><br>
<Projection>EPSG:900913</Projection><br>
<BlockSizeX>256</BlockSizeX><br>
<BlockSizeY>256</BlockSizeY><br>
<BandsCount>3</BandsCount><br>
<Cache /><br>
<ZeroBlockHttpCodes>204,404</ZeroBlockHttpCodes><br>
</GDAL_WMS><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">But if run<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">gdal_translate --debug ON -of PNG -projwin 5203413 2847209 5221042 2829459 -outsize 512 512 osm-no-labels.xml openstreetmap.png<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">I have a black PNG. <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">The debug shows me a wrong HTTP call (the below one), but I do not know how to modify my xml source to be able to run right requests.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">HTTP: Request [1] <a href="https://tiles.wmflabs.org/osm-no-labels/%7bz%7d/%7bx%7d/%7by%7d.png/1.0.0/12/2580/1758.jpg" target="_blank">
https://tiles.wmflabs.org/osm-no-labels/{z}/{x}/{y}.png/1.0.0//12/2580/1758.jpg</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">What's wrong in my settings?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thank you<u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12pt">___________________</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Andrea Borruso<br>
website: <a href="https://medium.com/tantotanto" target="_blank">https://medium.com/tantotanto</a><br>
38° 7' 48" N, 13° 21' 9" E, EPSG:4326<br>
<span style="font-size:12pt">___________________</span><br>
<br>
"cercare e saper riconoscere chi e cosa,<br>
in mezzo all’inferno, non è inferno, <br>
e farlo durare, e dargli spazio"<br>
<br>
Italo Calvino<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><span style="font-size:small">___________________</span><br></div><div dir="ltr"><span style="font-size:small"><br></span></div><div dir="ltr">Andrea Borruso<br>
website: <a href="https://medium.com/tantotanto" target="_blank">https://medium.com/tantotanto</a><br>38° 7' 48" N, 13° 21' 9" E, EPSG:4326<br><span style="font-size:small">___________________</span><br>
<br>
"cercare e saper riconoscere chi e cosa,<br>
in mezzo all’inferno, non è inferno, <br>
e farlo durare, e dargli spazio"<br>
<br>
Italo Calvino<br></div></div></div></div></div></div></div></div></div></div></div></div></div>