Excellent, thanks so much it's definitely not GDAL-related, a surprising problem in the way I'm getting the strings out.
Appreciate the very fast response! Best, Mike On Tue, Aug 31, 2021 at 8:14 PM Even Rouault <even.roua...@spatialys.com> wrote: > Michael, > > 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. > > Even > Le 31/08/2021 à 12:07, Michael Sumner a écrit : > > Hello, I'm having trouble getting subdataset names programatically from > the WMTS/OGC Web Map Tile Service > > Using > > /vsicurl/ > https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml > > I see many well named SDS sources from gdalinfo, i.e. listed below. > > But when I try to obtain these programatically I only get repeated values > : literally > > "WMTS:/vsicurl/ > https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml,layer > " > > I'm using (effectively) > > char **SDS = poDataset->GetMetadata("SUBDATASETS"); > > and that gives me the same value for every SDS, i.e. no layer name. > > Is there something extra that needs to be done especially for WMTS? I > can't figure it out from the sources. > > Thanks for any help! > > Best, Mike > > > > gdalinfo /vsicurl/ > https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml > Driver: WMTS/OGC Web Map Tile Service > Files: /vsicurl/ > https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml > Size is 512, 512 > Origin = (0.000000000000000,0.000000000000000) > Pixel Size = (1.000000000000000,1.000000000000000) > Subdatasets: > SUBDATASET_1_NAME=WMTS:/vsicurl/ > https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml,layer=AMSRE_Sea_Ice_Concentration_12km > SUBDATASET_1_DESC=Layer Sea Ice Concentration (12 km, AMSR-E, Aqua) > SUBDATASET_2_NAME=WMTS:/vsicurl/ > https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml,layer=AMSRE_Snow_Depth_Over_Ice > SUBDATASET_2_DESC=Layer Snow Depth Over Ice (12 km, AMSR-E, Aqua) > SUBDATASET_3_NAME=WMTS:/vsicurl/ > https://gibs.earthdata.nasa.gov/wmts/epsg3031/best/1.0.0/WMTSCapabilities.xml,layer=AMSRE_Sea_Ice_Concentration_25km > S > > -- > Michael Sumner > Software and Database Engineer > Australian Antarctic Division > Hobart, Australia > e-mail: mdsum...@gmail.com > > _______________________________________________ > gdal-dev mailing > listgdal-dev@lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/gdal-dev > > -- http://www.spatialys.com > My software is free, but my time generally not. > > -- Michael Sumner Software and Database Engineer Australian Antarctic Division Hobart, Australia e-mail: mdsum...@gmail.com
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev