<div dir="ltr">Thanks!<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 4 Dec 2023 at 16:46, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</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"><u></u>
<div>
<p>Javier,</p>
<p>TIFFTAG_DATETIME or AREA_OR_POINT are copied by the COG/GTiff
drivers from the source dataset metadata.</p>
<p>So using gdal_translate / GDALTranslate(), you may set them with
the "-mo KEY=VALUE" option.</p>
<p>If using an intermediate VRT as the source for GDALCreateCopy(),
then you may call SetMetadataItem("KEY", "VALUE") on the VRT. I
don't see an option in GDALBuildVRT() to do that, but you can
definitely open the VRT after it has been created and call
SetMetadataItem() on it</p>
<p>Even<br>
</p>
<div>Le 04/12/2023 à 16:14, Javier Jimenez
Shaw via gdal-dev a écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi</div>
<div><br>
</div>
<div>I am trying to convert a "normal" tiff file into a COG. For
that I am using an intermediate vrt file to add the
geolocation parameters, and finally copy the vrt into a COG.</div>
<div>I am doing it in C++, but it should be similar doing it on
the command line I hope. (In some cases I am using also other
parameters of the gdalbuildvrt).<br>
</div>
<div><br>
</div>
<div>My problem is how are the "magic words" to set the
TIFFTAG_* (like TIFFTAG_DATETIME) in the final COG. I guess I
could use the option "-oo" for the options in GDALBuildVRT, or
in the options of the method "CreateCopy" for COG driver.</div>
<div>Is that doable that way? Should I prefix "TIFFTAG_..." with
something like "GDALMETADATA:"? (I tried, unsuccessfully)<br>
</div>
<div>Is that the same for AREA_OR_POINT?<br>
</div>
<div><br>
</div>
<div>Thanks.<br>
</div>
<div>
<div>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>.___ ._ ..._ .. . ._. .___ .. __ . _. . __.. ...
.... ._ .__</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre cols="72">--
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</div>
</blockquote></div>