<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=utf-8">
<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.Shkpostityyli19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        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">That’s not the main issue because hand written XML gives the same error. I guess that GDAL is reading the EPSG:4326 tile matrix set from GetCapabilities and does not like it. This is
 what I used for testing:<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"><GDAL_WMTS><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">  <GetCapabilitiesUrl>http://www.ign.es/wmts/pnoa-ma?request=GetCapabilities&service=WMTS&version=1.0.0</GetCapabilitiesUrl><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">  <Layer>OI.OrthoimageCoverage</Layer><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">  <Style>default</Style><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">  <TileMatrixSet>EPSG:4326</TileMatrixSet><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">  <DataWindow><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">    <UpperLeftX>-180</UpperLeftX><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">    <UpperLeftY>90</UpperLeftY><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">    <LowerRightX>180</LowerRightX><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">    <LowerRightY>-90</LowerRightY><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">  </DataWindow><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">  <BandsCount>3</BandsCount><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">  <Cache /><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">  <UnsafeSSL>true</UnsafeSSL><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">  <ZeroBlockHttpCodes>404</ZeroBlockHttpCodes><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">  <ZeroBlockOnServerException>true</ZeroBlockOnServerException><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US"></GDAL_WMTS><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-<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> Travis Kirstine <traviskirstine@gmail.com>
<br>
<b>Lähetetty:</b> perjantai 12. helmikuuta 2021 20.43<br>
<b>Vastaanottaja:</b> Rahkonen Jukka (MML) <jukka.rahkonen@maanmittauslaitos.fi><br>
<b>Kopio:</b> gdal dev <gdal-dev@lists.osgeo.org><br>
<b>Aihe:</b> Re: [gdal-dev] WMTS services error<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Jukka,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I think the main issue is that the gdal_translate command throws an error when generating the WMTS XML config file, so there is nothing to edit.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB">gdal_translate "WMTS:<a href="http://www.ign.es/wmts/pnoa-ma?request=GetCapabilities&service=WMTS,layer=OI.OrthoimageCoverage,tilematrixset=EPSG:4326" target="_blank">http://www.ign.es/wmts/pnoa-ma?request=GetCapabilities&service=WMTS,layer=OI.OrthoimageCoverage,tilematrixset=EPSG:4326</a>"
 wmts_bm.xml -of WMTS</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span lang="EN-GB">ERROR 1: Invalid dataset dimensions : -135056383 x -167901439</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Fri, 12 Feb 2021 at 10:32, jratike80 <<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi">jukka.rahkonen@maanmittauslaitos.fi</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<p class="MsoNormal">Hi,<br>
<br>
By reading the documentation <a href="https://gdal.org/drivers/raster/wmts.html" target="_blank">
https://gdal.org/drivers/raster/wmts.html</a> it<br>
could be possible to edit the automatically created XML service definition<br>
file or write it by hand from a scratch.<br>
<br>
-Jukka Rahkonen-<br>
<br>
<br>
Travis Kirstine wrote<br>
> Elena<br>
> <br>
> This appears to be a bug in wmts driver in gdal, I would suggest filing a<br>
> issue<br>
> <br>
> The below is from the OGC Two Dimensional Tile Matrix Set specs, section<br>
> d2<br>
> <a href="http://docs.opengeospatial.org/is/17-083r2/17-083r2.html" target="_blank">
http://docs.opengeospatial.org/is/17-083r2/17-083r2.html</a><br>
> <br>
> "NOTE4: Some implementers prefer to define this TileMatrixSet using the<br>
> CRS<br>
> <a href="http://www.opengis.net/def/crs/EPSG/0/4326" target="_blank">http://www.opengis.net/def/crs/EPSG/0/4326</a>. The definition is the same<br>
> except that CRS coordinates are expressed in latitude, longitude order,<br>
> affecting the TopLeftCorner and the BBox encoding only".<br>
> <br>
> <br>
> On Fri, 12 Feb 2021 at 08:05, Elena Ruiz &lt;<br>
<br>
> eruiz@<br>
<br>
> &gt; wrote:<br>
> <br>
>> Hello, my goal is to obtain images of both WMS and WMTS web services<br>
>> using<br>
>> GDAL, with the CRS that each service provides, in the case of the<br>
>> example,<br>
>> how can I do then to obtain images in EPSG: 4326 or any other CRS that<br>
>> have<br>
>> changed axes? Should a parameter be added to the gdal_translate call?<br>
>> What<br>
>> would be the correct way to obtain this type of images using gdal<br>
>> applications like gadlinfo and gdaltranslate?<br>
>><br>
>> I have found very little information about this on the web, many thanks<br>
>> and best regards<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> ------------------------------<br>
>><br>
>> *Elena Ruiz*<br>
>><br>
>><br>
>> Sofware Development & Technical Support<br>
>> Tel.: +34 952 43 97 71<br>
>> <br>
<br>
> eruiz@<br>
<br>
>> *<a href="http://www.aplitop.com" target="_blank">www.aplitop.com</a> &lt;<a href="http://www.aplitop.com" target="_blank">http://www.aplitop.com</a>&gt;*<br>
>><br>
>><br>
>><br>
>> &lt;<a href="http://www.aplitop.com/Product/es/6/5/tcptunnel&gt" target="_blank">http://www.aplitop.com/Product/es/6/5/tcptunnel&gt</a>;<br>
>><br>
>> &lt;<a href="http://www.aplitop.com/New/es/281/mdt-75-a-la-venta&gt" target="_blank">http://www.aplitop.com/New/es/281/mdt-75-a-la-venta&gt</a>;<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> *De:* Travis Kirstine &lt;<br>
<br>
> traviskirstine@<br>
<br>
> &gt;<br>
>> *Enviado el:* jueves, 11 de febrero de 2021 20:20<br>
>> *Para:* Elena Ruiz &lt;<br>
<br>
> eruiz@<br>
<br>
> &gt;<br>
>> *CC:* <br>
<br>
> <a href="mailto:gdal-dev@.osgeo">gdal-dev@.osgeo</a><br>
<br>
>> *Asunto:* Re: [gdal-dev] WMTS services error<br>
>><br>
>><br>
>><br>
>> Elena,<br>
>><br>
>><br>
>><br>
>> I'm not exactly sure what is causing the issue but if you look at the<br>
>> capabilities of the 4326 tilematrixset compared to the InspireCRS84Quad<br>
>> the<br>
>> topleftcorner coordinates are reversed.  My guess gdal is expecting a X Y<br>
>> order.<br>
>><br>
>><br>
>><br>
>> <br>
> <TileMatrixSet><br>
>> <br>
> <ows:Identifier><br>
> InspireCRS84Quad<br>
> </ows:Identifier><br>
>> <br>
> <ows:SupportedCRS><br>
> <a href="http://www.opengis.net/def/crs/OGC/1.3/CRS84" target="_blank">http://www.opengis.net/def/crs/OGC/1.3/CRS84</a><br>
>> <br>
> </ows:SupportedCRS><br>
>> <br>
> <TileMatrix><br>
>> <br>
> <ows:Identifier><br>
> 0<br>
> </ows:Identifier><br>
>> <br>
> <ScaleDenominator><br>
> 2.79541132014358E8<br>
> </ScaleDenominator><br>
>> <br>
> <TopLeftCorner><br>
> -180.0 90.0<br>
> </TopLeftCorner><br>
>> <br>
> <TileWidth><br>
> 256<br>
> </TileWidth><br>
>> <br>
> <TileHeight><br>
> 256<br>
> </TileHeight><br>
>> <br>
> <MatrixWidth><br>
> 2<br>
> </MatrixWidth><br>
>> <br>
> <MatrixHeight><br>
> 1<br>
> </MatrixHeight><br>
>> <br>
> </TileMatrix><br>
>><br>
>><br>
>><br>
>> <br>
> <TileMatrixSet><br>
>> <br>
> <ows:Identifier><br>
> EPSG:4326<br>
> </ows:Identifier><br>
>> <br>
> <ows:SupportedCRS><br>
> EPSG:4326<br>
> </ows:SupportedCRS><br>
>> <br>
<br>
>> <br>
> <TileMatrix><br>
>> <br>
> <ows:Identifier><br>
> EPSG:4326:0<br>
> </ows:Identifier><br>
>> <br>
> <ScaleDenominator><br>
> 2.795411320143589E8<br>
> </ScaleDenominator><br>
>> <br>
> <TopLeftCorner><br>
> 90.0 -180.0<br>
> </TopLeftCorner><br>
>> <br>
> <TileWidth><br>
> 256<br>
> </TileWidth><br>
>> <br>
> <TileHeight><br>
> 256<br>
> </TileHeight><br>
>> <br>
> <MatrixWidth><br>
> 2<br>
> </MatrixWidth><br>
>> <br>
> <MatrixHeight><br>
> 1<br>
> </MatrixHeight><br>
>> <br>
> </TileMatrix><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> On Thu, 11 Feb 2021 at 11:51, Elena Ruiz &lt;<br>
<br>
> eruiz@<br>
<br>
> &gt; wrote:<br>
>><br>
>> Hello, I´m trying call web services (WMTS and WMS) using GDAL 3.0.2, but<br>
>> I<br>
>> have a problem with this example:<br>
>><br>
>><br>
>><br>
>> gdal_translate "WMTS:<br>
>> <a href="http://www.ign.es/wmts/pnoa-ma?request=GetCapabilities&service=WMTS,layer=OI.OrthoimageCoverage,tilematrixset=EPSG:4326" target="_blank">
http://www.ign.es/wmts/pnoa-ma?request=GetCapabilities&service=WMTS,layer=OI.OrthoimageCoverage,tilematrixset=EPSG:4326</a>"<br>
>> d://wmts_bm.xml -of WMTS<br>
>><br>
>> ERROR 1: Invalid dataset dimensions : -135056383 x -167901439<br>
>><br>
>><br>
>><br>
>> gdal_translate "WMTS:<br>
>> <a href="http://www.ign.es/wmts/pnoa-ma?request=GetCapabilities&service=WMTS,layer=OI.OrthoimageCoverage,tilematrixset=EPSG:25830" target="_blank">
http://www.ign.es/wmts/pnoa-ma?request=GetCapabilities&service=WMTS,layer=OI.OrthoimageCoverage,tilematrixset=EPSG:25830</a>"<br>
>> d://wmts_bm.xml -of WMTS<br>
>><br>
>> Input file size is 20616192, 26817505<br>
>><br>
>><br>
>><br>
>> In this server <a href="http://www.ign.es/wmts/pnoa-ma" target="_blank">http://www.ign.es/wmts/pnoa-ma</a> have available the next SRS<br>
>> :<br>
>><br>
>> SUBDATASET_1_NAME=WMTS:<br>
>> <a href="http://www.ign.es/wmts/pnoa-ma?request=GetCapabilities&service=WMTS,layer=OI.OrthoimageCoverage,tilematrixset=InspireCRS84Quad" target="_blank">
http://www.ign.es/wmts/pnoa-ma?request=GetCapabilities&service=WMTS,layer=OI.OrthoimageCoverage,tilematrixset=InspireCRS84Quad</a><br>
>><br>
>> SUBDATASET_2_NAME=WMTS:<br>
>> <a href="http://www.ign.es/wmts/pnoa-ma?request=GetCapabilities&service=WMTS,layer=OI.OrthoimageCoverage,tilematrixset=EPSG:4326" target="_blank">
http://www.ign.es/wmts/pnoa-ma?request=GetCapabilities&service=WMTS,layer=OI.OrthoimageCoverage,tilematrixset=EPSG:4326</a><br>
>><br>
>> SUBDATASET_3_NAME=WMTS:<br>
>> <a href="http://www.ign.es/wmts/pnoa-ma?request=GetCapabilities&service=WMTS,layer=OI.OrthoimageCoverage,tilematrixset=EPSG:4258" target="_blank">
http://www.ign.es/wmts/pnoa-ma?request=GetCapabilities&service=WMTS,layer=OI.OrthoimageCoverage,tilematrixset=EPSG:4258</a><br>
>><br>
>> SUBDATASET_4_NAME=WMTS:<br>
>> <a href="http://www.ign.es/wmts/pnoa-ma?request=GetCapabilities&service=WMTS,layer=OI.OrthoimageCoverage,tilematrixset=EPSG:25830" target="_blank">
http://www.ign.es/wmts/pnoa-ma?request=GetCapabilities&service=WMTS,layer=OI.OrthoimageCoverage,tilematrixset=EPSG:25830</a><br>
>><br>
>> SUBDATASET_5_NAME=WMTS:<br>
>> <a href="http://www.ign.es/wmts/pnoa-ma?request=GetCapabilities&service=WMTS,layer=OI.OrthoimageCoverage,tilematrixset=GoogleMapsCompatible" target="_blank">
http://www.ign.es/wmts/pnoa-ma?request=GetCapabilities&service=WMTS,layer=OI.OrthoimageCoverage,tilematrixset=GoogleMapsCompatible</a><br>
>><br>
>><br>
>><br>
>> But when I want Know the information or download a image in certain<br>
>> coordinates  with EPSG:4326, it returns an error “ERROR 1: Invalid<br>
>> dataset<br>
>> dimensions : -135056383 x -167901439”, with EPSG:25830 works fine. I<br>
>> don`t<br>
>> understand this error, someone could help me?<br>
>><br>
>><br>
>><br>
>> Thank you and regards<br>
>> ------------------------------<br>
>><br>
>> *Elena Ruiz *<br>
>> Sofware Development & Technical Support<br>
>> Tel. +34 952 43 97 71<br>
>> <br>
<br>
> eruiz@<br>
<br>
>> Sumatra, 9 - 29190 Málaga (Spain)<br>
>> *<a href="http://www.aplitop.com" target="_blank">www.aplitop.com</a> &lt;<a href="http://www.aplitop.com" target="_blank">http://www.aplitop.com</a>&gt;*<br>
>><br>
>> &lt;<a href="https://www.facebook.com/AplitopSL/&gt" target="_blank">https://www.facebook.com/AplitopSL/&gt</a>; 
<br>
>> &lt;<a href="https://twitter.com/aplitop&gt" target="_blank">https://twitter.com/aplitop&gt</a>;<br>
>> &lt;<a href="https://www.linkedin.com/company/aplitop&gt" target="_blank">https://www.linkedin.com/company/aplitop&gt</a>;<br>
>> &lt;<a href="https://www.youtube.com/user/aplitop&gt" target="_blank">https://www.youtube.com/user/aplitop&gt</a>;<br>
>><br>
>> In accordance with the provisions of the European Regulation of Data<br>
>> Protection 2016/679 (Reglamento Europeo de Protección de Datos 2016/679),<br>
>> we inform you that the data and the information you provide us through<br>
>> this<br>
>> medium will be used by APLITOP, S.L., with C.I.F. B-92543396 and with<br>
>> address at C / Sumatra, 9, Malaga, 29190, in order to answer your<br>
>> questions<br>
>> and inform you about our products. The data provided will be kept as long<br>
>> as it does not request its cessation and will not be transferred to third<br>
>> parties except in cases where there is a legal obligation. You have the<br>
>> right to access your personal data, correct inaccurate data or request<br>
>> its<br>
>> deletion when the data is no longer necessary for the purposes that were<br>
>> collected, as well as any rights recognized in the RGPD 2016/679<br>
>><br>
>><br>
>> _______________________________________________<br>
>> gdal-dev mailing list<br>
>> <br>
<br>
> <a href="mailto:gdal-dev@.osgeo">gdal-dev@.osgeo</a><br>
<br>
>> <a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
>><br>
>><br>
> <br>
> _______________________________________________<br>
> gdal-dev mailing list<br>
<br>
> <a href="mailto:gdal-dev@.osgeo">gdal-dev@.osgeo</a><br>
<br>
> <a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
> <br>
> <br>
> image002.jpg (984 bytes)<br>
> &lt;<a href="http://osgeo-org.1560.x6.nabble.com/attachment/5457213/0/image002.jpg&gt" target="_blank">http://osgeo-org.1560.x6.nabble.com/attachment/5457213/0/image002.jpg&gt</a>;<br>
> image004.jpg (980 bytes)<br>
> &lt;<a href="http://osgeo-org.1560.x6.nabble.com/attachment/5457213/1/image004.jpg&gt" target="_blank">http://osgeo-org.1560.x6.nabble.com/attachment/5457213/1/image004.jpg&gt</a>;<br>
> image006.jpg (1008 bytes)<br>
> &lt;<a href="http://osgeo-org.1560.x6.nabble.com/attachment/5457213/2/image006.jpg&gt" target="_blank">http://osgeo-org.1560.x6.nabble.com/attachment/5457213/2/image006.jpg&gt</a>;<br>
> image008.png (918 bytes)<br>
> &lt;<a href="http://osgeo-org.1560.x6.nabble.com/attachment/5457213/3/image008.png&gt" target="_blank">http://osgeo-org.1560.x6.nabble.com/attachment/5457213/3/image008.png&gt</a>;<br>
<br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html" target="_blank">
http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html</a><br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><o:p></o:p></p>
</blockquote>
</div>
</div>
</body>
</html>