<div dir="ltr"><div dir="ltr">Hi,</div><div dir="ltr"><br></div><div>You could use gdal to write a single tiff file from each numpy array layer and name it accordingly:</div><div>base.tif - your input tiff file</div><div>base.tif.ovr - first overview</div><div>base.tif.ovr.ovr - second overview</div><div>base.tif.ovr.ovr.ovr - third overview<br></div><div>etc.</div><div><br></div><div>gdal would know to read these overviews automatically, but if you want you can also transform base.tif (along with its new overviews) into a single tif file with internal overviews (a COG could be a good choice).<br></div><div><br></div><div>There might be a way to write them all together into a single tiff in one go without using intermediate single overview per layer files, but I'm not sure how.</div><div> </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 12 Mar 2024 at 10:28, Pradeep Mahato <<a href="mailto:pradeep.cabs@gov.in">pradeep.cabs@gov.in</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div>Hi Idan,<br></div><div> We are using CuPy and CuCim to generate the pyramid layers, these layers are in numpy array format (LxWxHxC). Here L is number of pyramid layer and HxWxC is image in numpy array. Problem we are facing is that how to combine/stack these pyramid layers in one tiff file using GDAL.<br></div><div><br></div><div>Thanks and Regards,<br></div><div>Pradeep Kumar Mahato<br></div><div>Phone: 080-2504 9199/ +91 8762020114</div><div><br></div><hr id="m_-2043509867922820935zwchr"><div><b>From: </b><a href="mailto:idan@miara.com" target="_blank">idan@miara.com</a><br><b>To: </b>"Pradeep Mahato" <<a href="mailto:pradeep.cabs@gov.in" target="_blank">pradeep.cabs@gov.in</a>><br><b>Cc: </b><a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br><b>Sent: </b>Tuesday, March 12, 2024 12:41:25 PM<br><b>Subject: </b>Re: [gdal-dev] Utilizing GDAL for adding overviews layer in python language<br></div><div><br></div><div><div dir="auto"><div>Hi,</div><div dir="auto"><br><div dir="auto">So you are saying that you used gdal buildoverview in Python to add overviews to the tiff file but it only uses CPU and not GPU. </div><div dir="auto">And you could use the other library to add overviews using GPU - can you share which library you used or what's the output format that you got?</div><div dir="auto">Maybe you can combine the output of the other library into the tiff file using gdal in Python. </div><div dir="auto"><br></div><div dir="auto">Kind regards, </div><div dir="auto">Idan </div><br><br><div dir="auto"><div dir="ltr">On Tue, 12 Mar 2024, 09:02 Pradeep Mahato via gdal-dev, <<a href="mailto:gdal-dev@lists.osgeo.org" rel="nofollow noopener noreferrer" target="_blank">gdal-dev@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div><div>Dear Team,<br></div><div> We are working on a project with Geo-spatial images using python language for our development purpose. To visualize the images properly pyramid layer is necessary. GDAL buildoverview functionality of python, we are using to generate the overview but it is utilizing only the CPU. We are able to generate the pyramid layer using other python library utilizing the GPU but not able to add this pyramid layer into the geospatial images of <strong>".tiff"</strong> file format as overview layer. </div><div> <br></div><div>Please help us in this regards if any GDAL function is there to add the pyramid as overview layer.</div></div><br><div><div>Thanks and Regards,<br>Pradeep Kumar Mahato</div><div>Phone: 080-2504 9199/ +91 8762020114<br></div><div><br><br></div></div></div>
<br><div> <p><a href="https://amritmahotsav.nic.in/" rel="noreferrer nofollow noopener noreferrer" target="_blank"><img style="width: 450px; height: 113px;" src="https://email.gov.in/videos/images/75.jpg"></a><br></p> </div>
<br></div>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" rel="noreferrer nofollow noopener noreferrer" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer noreferrer nofollow noopener noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div></div></div><br></div><div><br></div></div></div></blockquote></div></div>