<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'monospace'; font-size:9pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On dimanche 24 septembre 2017 09:28:52 CEST Isaac Gerg wrote:</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> Hi Even, thanks for your reply. I do not understand your syntax,</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> "GTIFF_DIR:your.tiff:XXXX" </p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Actually I was wrong, it is "GTIFF_DIR:XXXX:your.tiff"</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> I am using GDAL via python. Is there a way to</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> access these layers via that interface. Attached is a sample file.</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Demo:</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">$ python</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">>>> from osgeo import gdal</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">>>> ds = gdal.Open('/tmp/sample.tif')</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">>>> ds.GetSubDatasets()</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">[('GTIFF_DIR:1:/tmp/sample.tif', 'Page 1 (80P x 400L x 1B)'), ('GTIFF_DIR:2:/tmp/sample.tif', 'Page 2 (80P x 400L x 1B)'), ('GTIFF_DIR:3:/tmp/sample.tif', 'Page 3 (80P x 400L x 1B)'), ('GTIFF_DIR:4:/tmp/sample.tif', 'Page 4 (80P x 400L x 1B)'), ('GTIFF_DIR:5:/tmp/sample.tif', 'Page 5 (80P x 400L x 1B)'), ('GTIFF_DIR:6:/tmp/sample.tif', 'Page 6 (80P x 400L x 1B)'), ('GTIFF_DIR:7:/tmp/sample.tif', 'Page 7 (80P x 400L x 1B)'), ('GTIFF_DIR:8:/tmp/sample.tif', 'Page 8 (80P x 400L x 1B)'), ('GTIFF_DIR:9:/tmp/sample.tif', 'Page 9 (80P x 400L x 1B)'), ('GTIFF_DIR:10:/tmp/sample.tif', 'Page 10 (80P x 400L x 1B)'), ('GTIFF_DIR:11:/tmp/sample.tif', 'Page 11 (80P x 400L x 1B)'), ('GTIFF_DIR:12:/tmp/sample.tif', 'Page 12 (80P x 400L x 1B)'), ('GTIFF_DIR:13:/tmp/sample.tif', 'Page 13 (80P x 400L x 1B)'), ('GTIFF_DIR:14:/tmp/sample.tif', 'Page 14 (80P x 400L x 1B)'), ('GTIFF_DIR:15:/tmp/sample.tif', 'Page 15 (80P x 400L x 1B)'), ('GTIFF_DIR:16:/tmp/sample.tif', 'Page 16 (80P x 400L x 1B)'), ('GTIFF_DIR:17:/tmp/sample.tif', 'Page 17 (80P x 400L x 1B)'), ('GTIFF_DIR:18:/tmp/sample.tif', 'Page 18 (80P x 400L x 1B)'), ('GTIFF_DIR:19:/tmp/sample.tif', 'Page 19 (80P x 400L x 1B)'), ('GTIFF_DIR:20:/tmp/sample.tif', 'Page 20 (80P x 400L x 1B)'), ('GTIFF_DIR:21:/tmp/sample.tif', 'Page 21 (80P x 400L x 1B)')]</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">>>> subds = gdal.Open('GTIFF_DIR:1:/tmp/sample.tif')</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">>>> gdal.Info(subds, format = 'json')</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">{u'files': [u'/tmp/sample.tif'], u'cornerCoordinates': {u'upperRight': [-77.6741449, 41.0051153], u'lowerLeft': [-77.6739868, 41.0049763], u'lowerRight': [-77.6739574, 41.0050046], u'upperLeft': [-77.6741742, 41.0050871], u'center': [-77.6740658, 41.0050458]}[...snipped....]</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">-- </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Spatialys - Geospatial professional services</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">http://www.spatialys.com</p></body></html>