stationxml-build
Build a network StationXML file from delta meta & response information.
Overview
The stationxml-build application can be run either with the compiled in delta files, or by pointing at a delta file base directory.
The first option is designed for automatic configuration generators running in a CI/CD like environment whereas the second is aimed
at manual runs, it is important to provide a base in this instance as otherwise the built in, and likely to be old, files will be used.
The output of the program can be either of two types,
- A complete StationXML file given by the output flag, or
stdout
.
- A set of StationXML files per station, this is aimed at configuring applications such as SeisComP using individual StationXML files.
For the second option, this is purge option which will maintain the contents of the given directory used for the single option. It
will automatically remove any non-active stations.
Sometimes, e.g. for automatic systems, it is better to not create an XML Created entry, as this will make the file unique and will always
indicate a new file has been created, even if the metadata content hasn't changed.
The response information is read via small XML files representing dataloggers and sensors, these are joined together on the fly as needed.
The application will come with compiled in versions, again this may need to be updated if new responses are added. Alternatively this can
be overridden using a standalone directory.
The versioning mechanism is based around a single structure that incorporates all parameter options, and when building a particular version
this structure is mapped into the actual version layout and saved via XML encoding.
It is assumed that the small response files will not vary with version changes.
Usage:
./stationxml-build [options]
Options:
-verbose
add operational info
-debug
add extra operational info
-base string
base of delta files on disk
-resp string
base for response xml files on disk
-version string
create a specific StationXML version
-create
add a root XML "Created" entry
-module string
stationxml module (default "Delta")
-sender string
stationxml sender (default "WEL(GNS_Test)")
-source string
stationxml source (default "GeoNet")
-output string
output xml file, use "-" for stdout
-directory string
where to store station xml files (default "xml")
-single
produce single station xml files
-purge
remove unknown single xml files
-template string
how to name the single station xml files (default "station{{.ExternalCode}}{{.StationCode}}.xml")
-ignore string
list of stations to skip
-exclude value
regexp selection of networks to exclude (default ^()$)
-external value
regexp selection of external networks (default ^(NZ)$)
-station value
regexp selection of stations (default [A-Z0-9]+)
-network value
regexp selection of networks (default [A-Z0-9]+)
-location value
regexp selection of locations (default [A-Z0-9]+)
-channel value
regexp selection of channels (default [A-Z0-9]+)
-freq freq
response frequency (e.g B:1.0, BH:10.0)