Le jeudi 30 avril 2015 02:33:47, Jeremy Palmer a écrit : > Is it now possible to read WMTS sources using the GDAL WMS driver? The case > looking at is using a service such as > https://data.linz.govt.nz/set/2-nz-aerial-imagery/webservices/ and which > has custom tile matrix specification and a RESTFul Tile access API.
Hi Jeremy, There is no dedicated WMTS driver (or WMS "mini-driver"). However in particular - but common- cases, for example when the tiling scheme is the GoogleMapsCompatible one, and more generally when all resolution levels have the same origin point, and their resolution differ by a factor of 2, you can use a definition of the WMS TMS mini-driver. In your case, you can put the following content in a .xml file and it will work (adapted from http://www.gdal.org/frmt_wms_openstreetmap_tms.xml). <GDAL_WMS> <Service name="TMS"> <ServerUrl>http://tiles-a.data- cdn.linz.govt.nz/services;key=327224a02cc4453ba183441bbb6267aa/tiles/v4/set=2/EPSG:3857/${z}/${x}/${y}.png</ServerUrl> </Service> <DataWindow> <UpperLeftX>-20037508.34</UpperLeftX> <UpperLeftY>20037508.34</UpperLeftY> <LowerRightX>20037508.34</LowerRightX> <LowerRightY>-20037508.34</LowerRightY> <TileLevel>20</TileLevel> <!-- limited to 20, instead of 21 since GDAL block array would require much too memory --> <TileCountX>1</TileCountX> <TileCountY>1</TileCountY> <YOrigin>top</YOrigin> </DataWindow> <Projection>EPSG:3857</Projection> <BlockSizeX>256</BlockSizeX> <BlockSizeY>256</BlockSizeY> <BandsCount>4</BandsCount> <Cache /> </GDAL_WMS> A proper driver would infer that from the capabilities, and possibly deal with the annoying cases I mentionned (the fact that overviews in WMTS may have not the same origin point is the most annoying one) Even > > Cheers, > > Jeremy Palmer > Data Services Group Manager > Location Information - Data Services > > E jpal...@linz.govt.nz | DDI 04 498 3537 | M 027 2747 862 > > Wellington Office, Level 7, Radio New Zealand House, 155 The Terrace > PO Box 5501, Wellington 6145, New Zealand | T 04 460 0110 > W www.linz.govt.nz<http://www.linz.govt.nz/> | > www.landonline.govt.nz<http://www.landonline.govt.nz/> | > data.linz.govt.nz<http://www.data.linz.govt.nz/> > [cid:image001.png@01D08341.873BCAE0] > > > ________________________________ > This message contains information, which may be in confidence and may be > subject to legal privilege. If you are not the intended recipient, you > must not peruse, use, disseminate, distribute or copy this message. If you > have received this message in error, please notify us immediately (Phone > 0800 665 463 or i...@linz.govt.nz) and destroy the original message. LINZ > accepts no responsibility for changes to this email, or for any > attachments, after its transmission from LINZ. Thank You. -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev