You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

378 lines
17 KiB
HTML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html >
<head>
<meta charset="utf-8" />
<title>sccnv &#8212; SeisComP Release documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/seiscomp.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css" />
<script type="text/javascript" src="../_static/seiscomp.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/language_data.js"></script>
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="scconfig" href="scconfig.html" />
<link rel="prev" title="scchkcfg" href="scchkcfg.html" />
</head>
<body>
<div class="header">
<div class="container">
<div class="brand">
<img class="logo" src="../_static/brands/seiscomp/text/white.svg"/>
<!-- span class="title">SeisComP Release</span -->
<span class="version">5.3.0</span>
</div>
</div>
</div>
<div class="nav">
<div class="container">
<div class="content"><a class="pull-right" id="sidebar-toggle">TOC</a>
<div class="related" role="navigation" aria-label="related navigation">
<ul>
<li class="right">
<a href="../genindex.html" title="General Index"
accesskey="I">
index
</a>
</li>
<li class="right">
<a href="scconfig.html" title="scconfig"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="scchkcfg.html" title="scchkcfg"
accesskey="P">
previous
</a>
</li>
<li class="nav-item nav-item-0">
<a href="../index.html">Home</a>
</li>
<li class="nav-item nav-item-1">
<a href="../modules.html" >Modules</a>
</li>
<li class="nav-item nav-item-2">
<a href="../toc/utilities.html" accesskey="U">Utilities</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="container">
<div class="fitted content" id="anchors-container">
<div class="body" role="main">
<div class="section" id="sccnv">
<span id="id1"></span><h1>sccnv<a class="headerlink" href="#sccnv" title="Permalink to this headline"></a></h1>
<p><strong>Converts data in different formats.</strong></p>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline"></a></h2>
<p>sccnv reads input given in a supported format, converts the content to another
format and writes the output. Use the command-line option <code class="xref std std-confval docutils literal notranslate"><span class="pre">format-list</span></code>
for a list of supported formats.</p>
</div>
<div class="section" id="formats">
<h2>Formats<a class="headerlink" href="#formats" title="Permalink to this headline"></a></h2>
<p>Different formats are supported for input and output files.</p>
<table class="colwidths-given docutils align-left">
<colgroup>
<col style="width: 11%" />
<col style="width: 67%" />
<col style="width: 11%" />
<col style="width: 11%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Name</p></th>
<th class="head"><p>Description</p></th>
<th class="head"><p>Input</p></th>
<th class="head"><p>Output</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>arclink</p></td>
<td><p><a class="reference external" href="https://www.seiscomp.de/seiscomp3/doc/applications/arclink-status-xml.html">Arclink XML</a></p></td>
<td><p>X</p></td>
<td><p>X</p></td>
</tr>
<tr class="row-odd"><td><p>bson</p></td>
<td></td>
<td><p>X</p></td>
<td><p>X</p></td>
</tr>
<tr class="row-even"><td><p>bson-json</p></td>
<td></td>
<td></td>
<td><p>X</p></td>
</tr>
<tr class="row-odd"><td><p>csv</p></td>
<td><p>comma-separated values</p></td>
<td></td>
<td><p>X</p></td>
</tr>
<tr class="row-even"><td><p>hyp71sum2k</p></td>
<td><p>Hypo71 format</p></td>
<td></td>
<td><p>X</p></td>
</tr>
<tr class="row-odd"><td><p>ims10</p></td>
<td></td>
<td></td>
<td><p>X</p></td>
</tr>
<tr class="row-even"><td><p>json</p></td>
<td><p><a class="reference external" href="https://www.json.org/">JSON</a> format</p></td>
<td><p>X</p></td>
<td><p>X</p></td>
</tr>
<tr class="row-odd"><td><p>qml1.2</p></td>
<td><p><a class="reference internal" href="../base/glossary.html#term-quakeml"><span class="xref std std-term">QuakeML</span></a> format</p></td>
<td><p>*</p></td>
<td><p>X</p></td>
</tr>
<tr class="row-even"><td><p>qml1.2rt</p></td>
<td><p><a class="reference internal" href="../base/glossary.html#term-quakeml"><span class="xref std std-term">QuakeML</span></a> real time (RT) format</p></td>
<td><p>*</p></td>
<td><p>X</p></td>
</tr>
<tr class="row-odd"><td><p>scdm0.51</p></td>
<td></td>
<td><p>X</p></td>
<td><p>X</p></td>
</tr>
<tr class="row-even"><td><p>trunk</p></td>
<td><p>SeisComP XML (<a class="reference internal" href="../base/glossary.html#term-scml"><span class="xref std std-term">SCML</span></a>) - <a class="reference internal" href="../base/api-python.html#api-datamodel-python"><span class="std std-ref">SCML API</span></a></p></td>
<td><p>X</p></td>
<td><p>X</p></td>
</tr>
</tbody>
</table>
<p><strong>*</strong>: The conversion from files in QuakeML format is not supported by sccnv
but can be realized by system tools. Read section <a class="reference internal" href="#sec-sccnv-quakeml"><span class="std std-ref">QuakeML</span></a> for
details and instructions.</p>
<div class="section" id="quakeml">
<span id="sec-sccnv-quakeml"></span><h3>QuakeML<a class="headerlink" href="#quakeml" title="Permalink to this headline"></a></h3>
<p><a class="reference internal" href="../base/glossary.html#term-quakeml"><span class="xref std std-term">QuakeML</span></a> is used in a variety of flavors involving, e.g.,</p>
<ul class="simple">
<li><p>Using non-standard objects,</p></li>
<li><p>PublicID references which are not globally unique,</p></li>
<li><p>Missing references to parent objects,</p></li>
<li><p>Missing creationInfo parameters.</p></li>
</ul>
<p>The ability to convert from QuakeML to <a class="reference internal" href="../base/glossary.html#term-scml"><span class="xref std std-term">SCML</span></a> is thus limited and it
depends on the parameters provided with the input QuakeML file.</p>
<p>However, XSLT stylesheets are provided for mapping the parameters. The files
are located in <code class="file docutils literal notranslate"><span class="pre">&#64;DATADIR&#64;/xml/[version]/</span></code> for different <cite>SeisComP</cite> data schema
versions. The stylesheet files provide information on the mapping and on
limitations as well as examples on their application.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>You may find out about the <cite>SeisComP</cite> data schema version using modules along
with the command-line option <cite>-V</cite>, e.g.,</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sccnv -V
</pre></div>
</div>
</div>
<p>The style sheets can be used along with other stylesheet converter tools provided
by your system, e.g., <strong class="program">xalan</strong> or <strong class="program">xsltproc</strong>. Examples are given
in section <a class="reference internal" href="#sec-sccnv-examples"><span class="std std-ref">Examples</span></a>.</p>
</div>
</div>
<div class="section" id="examples">
<span id="sec-sccnv-examples"></span><h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline"></a></h2>
<ul>
<li><p>Print the list of supported formats:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sccnv --format-list
</pre></div>
</div>
</li>
<li><p>Convert an event parameter file in <a class="reference internal" href="../base/glossary.html#term-scml"><span class="xref std std-term">SCML</span></a> format to <a class="reference internal" href="../base/glossary.html#term-quakeml"><span class="xref std std-term">QuakeML</span></a> and
store the content in a file:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sccnv -i seiscomp.xml -o qml1.2:quakeml.xml
</pre></div>
</div>
</li>
<li><p>Convert an inventory file in Arclink XML format to <a class="reference internal" href="../base/glossary.html#term-scml"><span class="xref std std-term">SCML</span></a> and store the
content in a file:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sccnv -i arclink:Package_inventory.xml -o inventory.sc.xml
</pre></div>
</div>
</li>
<li><p>Convert an event parameter file in <a class="reference internal" href="../base/glossary.html#term-scml"><span class="xref std std-term">SCML</span></a> format to ims1.0 and store the
content in a file:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ sccnv -i trunk:event.xml -o ims10:event.ims
</pre></div>
</div>
</li>
<li><p>Convert QuakeML real time (RT) format in version 1.2 to SCML in data schema
version 0.12:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>$ xsltproc -o quakeml.xml <span class="nv">$SEISCOMP_ROOT</span>/share/xml/0.12/sc3ml_0.12__quakeml_1.2-RT.xsl scml.xml
</pre></div>
</div>
</li>
</ul>
</div>
<div class="section" id="command-line-options">
<h2>Command-Line Options<a class="headerlink" href="#command-line-options" title="Permalink to this headline"></a></h2>
<p><strong class="program">sccnv -i format:file -o format:file</strong></p>
<p>sccnv reads the input given in a supported format, converts the content
and writes the output in another format. Use the option <cite>format-list</cite>
for a list of supported formats.</p>
<div class="section" id="generic">
<h3>Generic<a class="headerlink" href="#generic" title="Permalink to this headline"></a></h3>
<dl class="option">
<dt id="cmdoption-sccnv-h">
<code class="sig-name descname">-h</code><code class="sig-prename descclassname"></code><code class="sig-prename descclassname">, </code><code class="sig-name descname">--help</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-sccnv-h" title="Permalink to this definition"></a></dt>
<dd><p>Show help message.</p>
</dd></dl>
<dl class="option">
<dt id="cmdoption-sccnv-v">
<code class="sig-name descname">-V</code><code class="sig-prename descclassname"></code><code class="sig-prename descclassname">, </code><code class="sig-name descname">--version</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-sccnv-v" title="Permalink to this definition"></a></dt>
<dd><p>Show version information.</p>
</dd></dl>
</div>
<div class="section" id="verbosity">
<h3>Verbosity<a class="headerlink" href="#verbosity" title="Permalink to this headline"></a></h3>
<dl class="option">
<dt id="id2">
<code class="sig-name descname">-v</code><code class="sig-prename descclassname"></code><code class="sig-prename descclassname">, </code><code class="sig-name descname">--v</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#id2" title="Permalink to this definition"></a></dt>
<dd><p>Increase verbosity level (may be repeated, eg. -vv).</p>
</dd></dl>
<dl class="option">
<dt id="cmdoption-sccnv-debug">
<code class="sig-name descname">--debug</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-sccnv-debug" title="Permalink to this definition"></a></dt>
<dd><p>Execute in debug mode.
Equivalent to verbosity=4 console=1 .</p>
</dd></dl>
</div>
<div class="section" id="id3">
<h3>Formats<a class="headerlink" href="#id3" title="Permalink to this headline"></a></h3>
<dl class="option">
<dt id="cmdoption-sccnv-format-list">
<code class="sig-name descname">--format-list</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-sccnv-format-list" title="Permalink to this definition"></a></dt>
<dd><p>List all supported formats</p>
</dd></dl>
</div>
<div class="section" id="input">
<h3>Input<a class="headerlink" href="#input" title="Permalink to this headline"></a></h3>
<dl class="option">
<dt id="cmdoption-sccnv-i">
<code class="sig-name descname">-i</code><code class="sig-prename descclassname"></code><code class="sig-prename descclassname">, </code><code class="sig-name descname">--input</code><code class="sig-prename descclassname"> arg</code><a class="headerlink" href="#cmdoption-sccnv-i" title="Permalink to this definition"></a></dt>
<dd><p>Input stream [format:][file], default: trunk:-</p>
</dd></dl>
</div>
<div class="section" id="output">
<h3>Output<a class="headerlink" href="#output" title="Permalink to this headline"></a></h3>
<dl class="option">
<dt id="cmdoption-sccnv-o">
<code class="sig-name descname">-o</code><code class="sig-prename descclassname"></code><code class="sig-prename descclassname">, </code><code class="sig-name descname">--output</code><code class="sig-prename descclassname"> arg</code><a class="headerlink" href="#cmdoption-sccnv-o" title="Permalink to this definition"></a></dt>
<dd><p>Output stream [format:][file], default trunk:-</p>
</dd></dl>
<dl class="option">
<dt id="cmdoption-sccnv-f">
<code class="sig-name descname">-f</code><code class="sig-prename descclassname"></code><code class="sig-prename descclassname">, </code><code class="sig-name descname">--formatted</code><code class="sig-prename descclassname"></code><a class="headerlink" href="#cmdoption-sccnv-f" title="Permalink to this definition"></a></dt>
<dd><p>Use formatted output</p>
</dd></dl>
<dl class="option">
<dt id="cmdoption-sccnv-indent">
<code class="sig-name descname">--indent</code><code class="sig-prename descclassname"> arg</code><a class="headerlink" href="#cmdoption-sccnv-indent" title="Permalink to this definition"></a></dt>
<dd><p>Formatted line indent. Default: 2</p>
</dd></dl>
</div>
</div>
</div>
<div id="anchors-bottom"></div>
</div>
<div class="sidebar" role="navigation" aria-label="main navigation">
<div id="anchors-top"></div>
<div id="anchors" class="content">
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">sccnv</a><ul>
<li><a class="reference internal" href="#description">Description</a></li>
<li><a class="reference internal" href="#formats">Formats</a><ul>
<li><a class="reference internal" href="#quakeml">QuakeML</a></li>
</ul>
</li>
<li><a class="reference internal" href="#examples">Examples</a></li>
<li><a class="reference internal" href="#command-line-options">Command-Line Options</a><ul>
<li><a class="reference internal" href="#generic">Generic</a></li>
<li><a class="reference internal" href="#verbosity">Verbosity</a></li>
<li><a class="reference internal" href="#id3">Formats</a></li>
<li><a class="reference internal" href="#input">Input</a></li>
<li><a class="reference internal" href="#output">Output</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="scchkcfg.html"
title="previous chapter">scchkcfg</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="scconfig.html"
title="next chapter">scconfig</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/apps/sccnv.rst.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<div class="horizontal layout content">
<a class="fade-in" href="https://www.gempa.de" target="_blank">
<img class="brand" src="../_static/brands/gempa.svg"/>
</a>
<div class="stretched align-center fitted content">
<div>
Version <b>5.3.0</b> Release
</div>
<div class="copyright">
Copyright &copy; gempa GmbH, GFZ Potsdam.
</div>
</div>
<a class="fade-in" href="https://www.gfz-potsdam.de" target="_blank">
<img class="brand" src="../_static/brands/gfz.svg"/>
</a>
</div>
</div>
</div>
</body>
</html>