<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Michael,</p>
<p>apart your code not using the same GDAL version as the one of
gdalinfo (but I can't recall versions having such issues), or a
flow in your code, I don't see why you'd this.</p>
<p>Even<br>
</p>
<div class="moz-cite-prefix">Le 31/08/2021 à 12:07, Michael Sumner a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAAcGz9-vnUSb5YtfRiZcjeJOCxaiR9XGvBrBT53UFCnwRmRiug@mail.gmail.com">
<div dir="ltr">Hello, I'm having trouble getting subdataset names
programatically from the WMTS/OGC Web Map Tile Service<br>
<div><br>
</div>
<div>Using </div>
<div><br>
</div>
<div>/vsicurl/<a
href="https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml"
moz-do-not-send="true">https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml</a><br>
<div><br>
</div>
<div>I see many well named SDS sources from gdalinfo, i.e.
listed below. </div>
<div><br>
</div>
<div>But when I try to obtain these programatically I only get
repeated values : literally</div>
<div><br>
</div>
<div>"WMTS:/vsicurl/<a
href="https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml,layer"
moz-do-not-send="true">https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml,layer</a>"</div>
<div><br>
</div>
<div>I'm using (effectively) </div>
<div><br>
</div>
<div>char **SDS = poDataset->GetMetadata("SUBDATASETS");<br>
</div>
<div><br>
</div>
<div>and that gives me the same value for every SDS, i.e. no
layer name. </div>
<div><br>
</div>
<div>Is there something extra that needs to be done especially
for WMTS? I can't figure it out from the sources. </div>
<div><br>
</div>
<div>Thanks for any help!</div>
<div><br>
</div>
<div>Best, Mike</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>gdalinfo /vsicurl/<a
href="https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml"
moz-do-not-send="true">https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml</a><br>
Driver: WMTS/OGC Web Map Tile Service<br>
Files: /vsicurl/<a
href="https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml"
moz-do-not-send="true">https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml</a><br>
Size is 512, 512<br>
Origin = (0.000000000000000,0.000000000000000)<br>
Pixel Size = (1.000000000000000,1.000000000000000)<br>
Subdatasets:<br>
SUBDATASET_1_NAME=WMTS:/vsicurl/<a
href="https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml,layer=AMSRE_Sea_Ice_Concentration_12km"
moz-do-not-send="true">https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml,layer=AMSRE_Sea_Ice_Concentration_12km</a><br>
SUBDATASET_1_DESC=Layer Sea Ice Concentration (12 km,
AMSR-E, Aqua)<br>
SUBDATASET_2_NAME=WMTS:/vsicurl/<a
href="https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml,layer=AMSRE_Snow_Depth_Over_Ice"
moz-do-not-send="true">https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml,layer=AMSRE_Snow_Depth_Over_Ice</a><br>
SUBDATASET_2_DESC=Layer Snow Depth Over Ice (12 km,
AMSR-E, Aqua)<br>
SUBDATASET_3_NAME=WMTS:/vsicurl/<a
href="https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml,layer=AMSRE_Sea_Ice_Concentration_25km"
moz-do-not-send="true">https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml,layer=AMSRE_Sea_Ice_Concentration_25km</a><br>
S<br>
</div>
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">Michael Sumner<br>
Software and Database Engineer<br>
Australian Antarctic Division<br>
Hobart, Australia<br>
e-mail: <a href="mailto:mdsumner@gmail.com" target="_blank"
moz-do-not-send="true">mdsumner@gmail.com</a></div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>