<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hi<br>
</p>
<p>I found from documentation following about subdataset:</p>
<div class="moz-forward-container">
<h3>Subdatasets<a class="headerlink"
href="https://gdal.org/drivers/raster/gtiff.html#subdatasets"
title="Permalink to this heading" moz-do-not-send="true"></a></h3>
<p>Multi-page TIFF files are exposed as subdatasets. On opening, a
subdataset name is GTIFF_DIR:{index}:filename.tif, where {index}
starts at 1.</p>
<p>I am using following code :</p>
<p> GDALDataset* subdataset =
static_cast<GDALDataset*>(GDALOpen("F:\\3D-data\\GeoTIFFs\\[1]:44744.tif",
GA_ReadOnly));<br>
if (subdataset == NULL) {<br>
std::cout << "Failed to open subdataset!" <<
std::endl;<br>
return 1;<br>
}<br>
</p>
<p>But geting following :</p>
<p>subdataset = NULL</p>
<p>From documentation I didn't find more</p>
<p>In what I am wrong</p>
<p>Regards</p>
<p>Raivo<br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 08.03.23 01:01, Brad Hards wrote:<br>
</div>
<blockquote type="cite" cite="mid:12164630.O9o76ZdvQC@audax">
<pre class="moz-quote-pre" wrap="">On Wednesday, 8 March 2023 6:53:17 AM AEDT Raivo Rebane wrote:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">I studied and asked from <a class="moz-txt-link-freetext" href="https://chat.openai.com/chat" moz-do-not-send="true">https://chat.openai.com/chat</a> how to read
multiband raster image, but I did'nt find anywhere how to rread from
tiff file next frame or ortofo bands
Please ask me if it's possible
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">It is possible. See <a class="moz-txt-link-freetext" href="https://gdal.org/drivers/raster/gtiff.html#subdatasets" moz-do-not-send="true">https://gdal.org/drivers/raster/gtiff.html#subdatasets</a> for
how the multiple images are identified.
Use gdalinfo on your file to see the specific characteristics.
See <a class="moz-txt-link-freetext" href="https://gdal.org/tutorials/raster_api_tut.html" moz-do-not-send="true">https://gdal.org/tutorials/raster_api_tut.html</a> for use of the Raster API
abstraction.
So you just need to pass the correct name to the open call.
Brad
_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:gdal-dev@lists.osgeo.org" moz-do-not-send="true">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
</div>
</body>
</html>