Extracting metadata from raster (tif) file using python in Knime

Hi @Leedsbash7,

I have recently tried finding a way to extract the XMP Meta data from images too and, whilst not Phyton, found a way to extract the information too using a simple RegEx

(?<XMP Meta Data><x:xmpmeta((?!</x:xmpmeta>).)+</x:xmpmeta>)

You basically:

  1. Create a list of Paths to each image
  2. Convert it to binary and remove all line breaks
  3. Extract XMP and convert to XML

PS: I created a sample workflow for you- Whilst not using a tif, this still might be applicable.

Please note that the Python-Approach is still WIP because of:

Best
Mike