<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.Shkpostityyli18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
mso-ligatures:none;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 70.85pt 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="FI" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">When you have a RasterBand from the WMTS data source, it is abstracted and you can read the raster data just like from any other data source and raster band
<a href="https://gdal.org/tutorials/raster_api_tut.html#reading-raster-data">https://gdal.org/tutorials/raster_api_tut.html#reading-raster-data</a> “There are a few ways to read raster data, but the most common is via the GDALRasterBand::RasterIO() method.
This method will automatically take care of data type conversion, up/down sampling and windowing.” GDAL knows which tiles to read.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">I do not know if the WMTS driver can do parallel tile downloads. If not, it is possible to run many RasterIO() at the same time, each reading data from a different window like in this
rasterio document https://rasterio.readthedocs.io/en/latest/topics/concurrency.html.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">-Jukka Rahkonen-<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b>Lähettäjä:</b> gdal-dev <gdal-dev-bounces@lists.osgeo.org>
<b>Puolesta </b>Michal Kowalczuk via gdal-dev<br>
<b>Lähetetty:</b> keskiviikko 29. toukokuuta 2024 9.08<br>
<b>Vastaanottaja:</b> gdal-dev@lists.osgeo.org<br>
<b>Aihe:</b> [gdal-dev] GDAL WMTS get tiles no documentation<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hi GDAL fellows<o:p></o:p></p>
<div>
<p class="MsoNormal">This is my first post on this mailing list, so I'm asking for understanding.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">As all we know the purpose of using WMTS over WMS, I'd like to implement parallel downloading tiles from service using C API.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">In my opinion GDAL documentation (<a href="https://gdal.org/drivers/raster/wmts.html">https://gdal.org/drivers/raster/wmts.html</a>) says nothing on this topic.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">I can get capabilities from WMTS, I can open the selected subdataset but how to get tiles for given extent? I could not find any information how to do it, even in the GDAL tests on github.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I am kindly asking for tips. It also can be in python. How using pure GDAL API fetch tiles to dynamically complete the displayed map. This is my goal.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thank you!<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Michal<o:p></o:p></p>
</div>
</div>
</div>
</body>
</html>