Question: does ExifTool support GML meta data ?

Started by boxerab, December 31, 2020, 04:01:27 PM

Previous topic - Next topic

boxerab

Here are a few links:

https://en.wikipedia.org/wiki/Geography_Markup_Language

https://www.loc.gov/preservation/digital/formats/fdd/fdd000279.shtml

https://www.loc.gov/preservation/digital/formats/fdd/fdd000303.shtml

Thanks,
Aaron

blue-j

ExifTool doesn't have built-in mapping for GML, but since it is XML-based, it's quite possible to use a custom config to build custom support for it.  Unfortunately, I recently reported a problem with the support of XML-based file formats, and I believe the principal (sole?) author of ExifTool, Phil Harvey, is reviewing the matter.  It's likely to be resolved sometime quite soon.

https://exiftool.org/config.html

- J

Phil Harvey

ExifTool doesn't officially support XML files, but it will parse them and extract the individual properties as separate tags if you force it to read any XML-based file.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

boxerab

Thanks, guys. The reason I am interested in GML is that this is one type of meta-data stored in JPEG 2000 file format. But, it is stored in a JPEG 2000 Part 2
box, which would need to be parsed by exiftool.
It doesn't look like GML can be stored in any non-jpeg 2000 file formats, so it may not make sense
for exiftool to extract it from J2K if it can't store it anywhere.

blue-j

Can you share any sample images with GML in them?

-J

Phil Harvey

If you share a sample I should be able to add the ability to extract this using ExifTool.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

boxerab

Thanks, Phil, attached is a sample with GML.

The header uses the Part 2 Association box - you can find a description here:
https://web.archive.org/web/20161011044237/http://old.jpeg.org/public/15444-2annexm.pdf

if you search for:

M.11.11  Association box (superbox)

Phil Harvey

Thanks for the sample.  ExifTool 12.14 will extract metadata from the Association box, so you will be able to extract the GML using this command:

exiftool -xml -b FILE

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

boxerab


boxerab


Phil Harvey

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).