Image Metadata Guidelines
It is helpful if the GAIA images contain metadata giving details about what they represent (but entirely optional). We may add options for the user to query the image for information such as spatial extent and data limits, in which case it is necessary for some degree of standardisation.
Metadata values
All PNG files can include extra parameter name/values pairs, and this provides a means by which additional metadata can be included. The value is always a string. The following table describes the different metadata, and whether or not they should be included in keogram and thumbnail images.
You can add as many or as few of these as you choose, but please follow the conventions below.
Name |
Value |
Keogram |
Thumbnail |
PositionX |
X value for the keogram |
Y |
N |
DataLimitMin |
Lower limit for data value (ie corresponging to 0 in the 8-bit image |
Y |
Y |
DataLimitMax |
Upper limit for data value (ie corresponging to 253 in the 8-bit image |
Y |
Y |
DataQuality |
Flag indicating quality issues which may affect the result in a negative way (eg Preliminary |
Y |
Y |
DataUnits |
The units for the data. Use raw for cases like ADC count. |
Y |
Y |
DataValueMin |
Minimum data value within the image (float) |
Y |
Y |
DataValueMax |
Maximum data value within the image (float) |
Y |
Y |
DateTimeStart |
The inclusive start time of the period that the image represents. Must be in YYYY-MM-DD hh:mm:ssZ format. Z indicates UTC. |
Y |
Y |
DateTimeEnd |
The exclusive end time of the period that the image represents. Must be in YYYY-MM-DD hh:mm:ssZ format. Z indicates UTC. |
Y |
Y |
GaiaProject |
The textual name (not abbreviation) of the GAIA project |
Y |
Y |
GaiaStation |
The textual name (not abbreviation) of the GAIA station |
Y |
Y |
GaiaChannel |
The textual name (not refname ) of the GAIA channel |
Y |
Y |
PositionUnits |
The units for the position |
Y |
Y |
PositionXMin |
Minimum X value |
N |
Y |
PositionXMax |
Maximum X value |
N |
Y |
PositionYMin |
Minimum Y value |
Y |
Y |
PositionYMax |
Maximum Y value |
Y |
Y |

Comments sought on
GaiaProject
,
GaiaStation
and
GaiaChannel
. Should we use
GaiaProjectAbbrev
,
GaiaStationAbbrev
,
GaiaChannelRefName
instead? --
SteveMarple - 23 Jan 2008
Adding metadata to PNG images
Matlab
Matlab allows the user to specify extra metadata when a PNG image is saved with
imwrite
. You can use a combination of
imread
and
imwrite
to add metadata to existing images.
Python
The Python Imaging Library (PIL) supports reading and writing PNG metadata. See also
http://blog.client9.com/2007/08/python-pil-and-png-metadata-take-2.html.
Image.load()
loads the metadata into the
Image.info
dict. Extra effort appears to be required to write this dict back out (see previous link), although this may have changed by now.
Topic revision: r3 - 2010-01-20 - 23:26:25 -
MartinGrill