Classes for handling Sentinel-1 metadata

exception auscophub.sen1meta.Sen1MetaError
class auscophub.sen1meta.Sen1ZipfileMeta(zipfilename=None)

This class is designed to operate on the whole zipfile of a Sentinel-1 SAFE dataset.

This version uses the top level file.

Additional metadata can be found within the SAFE archive. Someone who knows more about radar than me should work on classes to handle the individual files, when more detail is required.


This is called for the product types which we do not really know how to handle, e.g. RAW and OCN. It fills in a rudimentary amount of metadata which can be gleaned directly from the zipfile name itself.

We really should do more to understand the internals of these other products, particularly the OCN, which is probably manageable, and useful. The RAW perhaps not so much.

static findMetadataNodeByIdName(metadataNodeList, idName)

Search the given list of metadataNode objects, and find the first one with the given ID=idName. If no such object found, return None.

static getElementsContainTagName(node, tagname)

Search in a node based on partial tagname. This has to do with the inconsistent naming for different product levels.

auscophub.sen1meta.findElementByXPath(node, xpath)

Find a sub-node under the given XML minidom node, by traversing the given XPATH notation. Searches all possible values, and returns a list of whatever it finds which matches.

It would be better if minidom understood XPATH, but it does not seem to. I could use some of the other libraries, but ElementTree seems to have obscure bugs, and I did not want to introduce any other dependencies. Sigh…..