<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<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 class="moz-cite-prefix">Le 04/12/2023 à 16:14, Javier Jimenez
Shaw via gdal-dev a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CADRrdKu8v7aGfS67-Y3K8e3kbJjKzYYSNu2mpu4rjS5R=6UOZg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<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"
data-smartmail="gmail_signature">
<div dir="ltr">
<div>.___ ._ ..._ .. . ._. .___ .. __ . _. . __.. ...
.... ._ .__</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>