Oh, wait, it does put IGEOLO in the output nitf, but I also get the warning:
Warning 6: driver NITF does not support creation option IGEOLO On Sun, 26 Feb 2023 16:04:16 +1100, Brad Hards wrote: > On Sunday, 26 February 2023 2:33:31 PM AEDT Amadeus WM via gdal-dev > wrote: >> So I just noticed that if I call >> >> dataset->SetMetadataItem(); >> >> then it creates a file out.ntf.aux.xml and whatever fields I set go in >> there. Both NITF_ICORDS and NITF_IGEOLO are there, and IGEOLO need not >> be a real value, it gets set to whatever I set it to. >> >> Is there any way to put those fields in out.ntf and not in >> out.ntf.aux.xml? What determines where they go? > > See https://gdal.org/drivers/raster/nitf.html#creation-issues in > particular, where it says Most file header, imagery header metadata and > security fields can be set with appropriate creation options (although > they are reported as metadata item, but must not be set as metadata). > For instance setting “FTITLE=Image of abandoned missile silo south west > of Karsk” in the creation option list would result in setting of the > FTITLE field in the NITF file header. Use the official field names from > the NITF specification document; do not put the “NITF_” prefix that is > reported when asking the metadata list. > > > Try: > char **papszOptions = NULL; > papszOptions = CSLSetNameValue( papszOptions, "ICORDS", "D" ); > papszOptions = CSLSetNameValue( papszOptions, "IGEOLO", > "+28.563-080.578+28.563-080.577+28.562-080.577+28.562-080.578" ); > > and pass those options to your Create() call. > > I'll say it again: creation options, not metadata. > > Brad > > > _______________________________________________ > gdal-dev mailing list [email protected] > https://lists.osgeo.org/mailman/listinfo/gdal-dev _______________________________________________ gdal-dev mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/gdal-dev
