scxmldump

To get event information from the database without using SQL is an important task for the user. scxmldump queries the database and transforms that information into XML. The result can be converted into a bulletin with scbulletin or imported into another database with scdb. An XSD schema of the XML output can be downloaded at http://geofon.gfz-potsdam.de/schema/.

Commandline Options

-d, --database <string>
Specify the database connection to read the event/origin information from.
--listen
Listen to the messaging for incoming events and dump it. Only new events and event updates trigger an output. Dependend objects (like magnitude updates or origin updates) will be ignored. scevtlog is recommended for that purpose.

-I [ --inventory ] :

export the inventory

--stations arg :

if inventory is exported filter the stations to export where each item is in format net[.{sta|*}]

-C [ --config ] :

export the config

-O, --origin <string>
Specify the origin ID to dump.
-E, --event id
Specify the event ID to dump.
-P, --with-picks
Exports associated picks.
-A, --with-amplitudes
Export associated amplitudes.
-M, --with-magnitudes
Export station magnitudes for all dumped origins.
-a, --ignore-arrivals
Do not export origin arrivals.
-p, --preferred-only
When exporting events dump only the preferred origin and the preferred magnitude.
-m, --all-magnitudes
If only the preferred origin is dumped, dump all magnitudes for this origin.
-f, --formatted
Use formatted output. That means that newlines and tabs are inserted to make the XML file easier to read.
--prepend-datasize
Prepend a line with the length of the XML data.
-o, --output file
The output file (default is stdout).

Examples

Dump an event with the preferred origin only, but with all magnitudes, all station magnitudes, all picks and amplitudes:

scxmldump -d mysql://user:test@localhost/seiscomp3 -E gfz2008abcd -pmPAMf

Convert a dump into a bulletin using the autoloc3 bulletin format:

scxmldump -d mysql://user:test@localhost/seiscomp3 -E gfz2008abcd -pmPAMf | scbulletin -i - -3 

Copy an event into another database:

scxmldump -d mysql://user:test@localhost/seiscomp3 -E gfz2008abcd -PAMf | scdb 
          -o mysql://user:test@localhost/seiscomp3_backup -i -