Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTiff: insert GDAL_RELEASE_NICKNAME in GDAL_METADATA tag #11877

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions frmts/gtiff/gtiffdataset_write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3790,16 +3790,21 @@ static void AppendMetadataItem(CPLXMLNode **ppsRoot, CPLXMLNode **ppsTail,
/* Create root, if missing. */
/* -------------------------------------------------------------------- */
if (*ppsRoot == nullptr)
{
*ppsRoot = CPLCreateXMLNode(nullptr, CXT_Element, "GDALMetadata");

*ppsTail =
CPLCreateXMLNode(*ppsRoot, CXT_Comment,
std::string("GDAL release nickname: ")
.append(GDALVersionInfo("RELEASE_NICKNAME"))
.c_str());
}

/* -------------------------------------------------------------------- */
/* Append item to tail. We keep track of the tail to avoid */
/* O(nsquared) time as the list gets longer. */
/* -------------------------------------------------------------------- */
if (*ppsTail == nullptr)
CPLAddXMLChild(*ppsRoot, psItem);
else
CPLAddXMLSibling(*ppsTail, psItem);
CPLAddXMLSibling(*ppsTail, psItem);

*ppsTail = psItem;
}
Expand Down
Loading