<div dir="ltr"><div>Jukka,</div><div><br></div><div>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.<br></div><div><br></div><div><p class="MsoNormal"><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></p>
<p class="MsoNormal"><span lang="EN-GB">ERROR 1: Invalid dataset dimensions : -135056383 x -167901439</span></p></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 12 Feb 2021 at 10:32, jratike80 <<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">Hi,<br>
<br>
By reading the documentation <a href="https://gdal.org/drivers/raster/wmts.html" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" 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 <<br>
<br>
> eruiz@<br>
<br>
> > 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" rel="noreferrer" target="_blank">www.aplitop.com</a> <<a href="http://www.aplitop.com" rel="noreferrer" target="_blank">http://www.aplitop.com</a>>*<br>
>><br>
>><br>
>><br>
>> <<a href="http://www.aplitop.com/Product/es/6/5/tcptunnel>" rel="noreferrer" target="_blank">http://www.aplitop.com/Product/es/6/5/tcptunnel></a>;<br>
>><br>
>> <<a href="http://www.aplitop.com/New/es/281/mdt-75-a-la-venta>" rel="noreferrer" target="_blank">http://www.aplitop.com/New/es/281/mdt-75-a-la-venta></a>;<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> *De:* Travis Kirstine <<br>
<br>
> traviskirstine@<br>
<br>
> ><br>
>> *Enviado el:* jueves, 11 de febrero de 2021 20:20<br>
>> *Para:* Elena Ruiz <<br>
<br>
> eruiz@<br>
<br>
> ><br>
>> *CC:* <br>
<br>
> gdal-dev@.osgeo<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" rel="noreferrer" 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 <<br>
<br>
> eruiz@<br>
<br>
> > 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" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" 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" rel="noreferrer" target="_blank">www.aplitop.com</a> <<a href="http://www.aplitop.com" rel="noreferrer" target="_blank">http://www.aplitop.com</a>>*<br>
>><br>
>> <<a href="https://www.facebook.com/AplitopSL/>" rel="noreferrer" target="_blank">https://www.facebook.com/AplitopSL/></a>; <br>
>> <<a href="https://twitter.com/aplitop>" rel="noreferrer" target="_blank">https://twitter.com/aplitop></a>;<br>
>> <<a href="https://www.linkedin.com/company/aplitop>" rel="noreferrer" target="_blank">https://www.linkedin.com/company/aplitop></a>;<br>
>> <<a href="https://www.youtube.com/user/aplitop>" rel="noreferrer" target="_blank">https://www.youtube.com/user/aplitop></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>
> gdal-dev@.osgeo<br>
<br>
>> <a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
>><br>
>><br>
> <br>
> _______________________________________________<br>
> gdal-dev mailing list<br>
<br>
> gdal-dev@.osgeo<br>
<br>
> <a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
> <br>
> <br>
> image002.jpg (984 bytes)<br>
> <<a href="http://osgeo-org.1560.x6.nabble.com/attachment/5457213/0/image002.jpg>" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/attachment/5457213/0/image002.jpg></a>;<br>
> image004.jpg (980 bytes)<br>
> <<a href="http://osgeo-org.1560.x6.nabble.com/attachment/5457213/1/image004.jpg>" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/attachment/5457213/1/image004.jpg></a>;<br>
> image006.jpg (1008 bytes)<br>
> <<a href="http://osgeo-org.1560.x6.nabble.com/attachment/5457213/2/image006.jpg>" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/attachment/5457213/2/image006.jpg></a>;<br>
> image008.png (918 bytes)<br>
> <<a href="http://osgeo-org.1560.x6.nabble.com/attachment/5457213/3/image008.png>" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/attachment/5457213/3/image008.png></a>;<br>
<br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html" rel="noreferrer" 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" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div>