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.

417 lines
25 KiB
HTML

<!DOCTYPE html>
<html >
<head>
<meta charset="utf-8" />
<title>RegionCheck &#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="scm" href="../toc/extensions/scm.html" />
<link rel="prev" title="scevent" href="../toc/extensions/scevent.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="../toc/extensions/scm.html" title="scm"
accesskey="N">
next
</a>
</li>
<li class="right">
<a href="../toc/extensions/scevent.html" title="scevent"
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="../toc/extensions.html" >Extensions</a>
</li>
<li class="nav-item nav-item-2">
<a href="../toc/extensions/scevent.html" accesskey="U">scevent</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="regioncheck">
<span id="scevent-regioncheck"></span><h1>RegionCheck<a class="headerlink" href="#regioncheck" title="Permalink to this headline"></a></h1>
<p>evrc plugin for scevent</p>
<div class="section" id="description">
<h2>Description<a class="headerlink" href="#description" title="Permalink to this headline"></a></h2>
<p><em>evrc</em> (event region check) is a <a class="reference internal" href="../base/glossary.html#term-plugin"><span class="xref std std-term">plugin</span></a> for <a class="reference internal" href="scevent.html#scevent"><span class="std std-ref">scevent</span></a> setting the
event type by comparing the location of the preferred origin with
<a class="reference internal" href="#sec-evrc-regions"><span class="std std-ref">defined regions</span></a>.</p>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Events for which the mode of the preferred origin is “manual” are by default
not considered.</p>
</div>
<div class="section" id="definition-of-regions">
<span id="sec-evrc-regions"></span><h3>Definition of regions<a class="headerlink" href="#definition-of-regions" title="Permalink to this headline"></a></h3>
<p>The regions are defined by closed polygons provided as
<a class="reference internal" href="global_gui.html#sec-gui-layers"><span class="std std-ref">BNA files</span></a>. Configure <a class="reference internal" href="#confval-rc.regions"><code class="xref std std-confval docutils literal notranslate"><span class="pre">rc.regions</span></code></a> to consider
a region defined by its name given in the header of the BNA polygon.</p>
<p>There exist <strong>positive and negative regions</strong>:</p>
<ul class="simple">
<li><p><strong>Positive region:</strong> All events within the area enclosed by the polygon are flagged positive,
all events not enclosed by the polygon are flagged negative.</p></li>
<li><p><strong>Negative region:</strong> All events within the area enclosed by the polygon are flagged negative,
all events not enclosed by the polygon are flagged positive.</p></li>
</ul>
<p>Regions are negative if the <a class="reference internal" href="#confval-rc.regions"><code class="xref std std-confval docutils literal notranslate"><span class="pre">name</span></code></a> of the enclosing polygon
starts with <strong>!</strong> (exclamation mark. Otherwise the region is positive.</p>
<p>If a list of region names is defined, the last matching region in the list takes
priority when treating events.</p>
</div>
<div class="section" id="treatment-of-events">
<h3>Treatment of events<a class="headerlink" href="#treatment-of-events" title="Permalink to this headline"></a></h3>
<p>When the <em>evrc</em> plugin is loaded and configured, the location of the preferred origin
of an events is compared with the defined regions.
Events within a positive and a negative region are flagged positive and negative, respectively.
By default it sets the event type to “outside of network interest” if the event is
flagged negative.</p>
<ol class="arabic simple">
<li><p>When activating <a class="reference internal" href="#confval-rc.readEventTypeFromBNA"><code class="xref std std-confval docutils literal notranslate"><span class="pre">rc.readEventTypeFromBNA</span></code></a> the type of positive events is set according
to the eventType defined in <a class="reference internal" href="#sec-evrc-bna"><span class="std std-ref">BNA headers</span></a>.
The type of negative events is set according to <a class="reference internal" href="#confval-rc.eventTypeNegative"><code class="xref std std-confval docutils literal notranslate"><span class="pre">rc.eventTypeNegative</span></code></a>.
Prepend accept to the list of polygons to unset the type of negative events.</p></li>
<li><p>When <a class="reference internal" href="#confval-rc.readEventTypeFromBNA"><code class="xref std std-confval docutils literal notranslate"><span class="pre">rc.readEventTypeFromBNA</span></code></a> is inactive, the event type is set
based on <a class="reference internal" href="#confval-rc.eventTypePositive"><code class="xref std std-confval docutils literal notranslate"><span class="pre">rc.eventTypePositive</span></code></a> and <a class="reference internal" href="#confval-rc.eventTypeNegative"><code class="xref std std-confval docutils literal notranslate"><span class="pre">rc.eventTypeNegative</span></code></a>:</p>
<ol class="arabic simple">
<li><p>by default the type of all negative events (events within negative regions)
is set to “outside of network interest”.
Prepend <strong>accept</strong> to <a class="reference internal" href="#confval-rc.regions"><code class="xref std std-confval docutils literal notranslate"><span class="pre">rc.regions</span></code></a> to unset the event type for negative events.</p></li>
<li><p><strong>positive:</strong> The event type of positive events is set to <a class="reference internal" href="#confval-rc.eventTypePositive"><code class="xref std std-confval docutils literal notranslate"><span class="pre">rc.eventTypePositive</span></code></a>.
For empty <a class="reference internal" href="#confval-rc.eventTypePositive"><code class="xref std std-confval docutils literal notranslate"><span class="pre">rc.eventTypePositive</span></code></a> the type is unset.</p></li>
<li><p><strong>negative:</strong> The event type of negative events is set to <a class="reference internal" href="#confval-rc.eventTypeNegative"><code class="xref std std-confval docutils literal notranslate"><span class="pre">rc.eventTypeNegative</span></code></a>.
The default type for negative events is “outside of network interest”.</p></li>
</ol>
</li>
</ol>
<p>Evaluation is made based on the order of the regions names defined in <a class="reference internal" href="#confval-rc.regions"><code class="xref std std-confval docutils literal notranslate"><span class="pre">rc.regions</span></code></a>.
The last matching criteria applies.
In this way disjunct and overlapping regions with different behavior can be defined.
If events ARE NOT within positive regions their type is set to “outside of network interest”.</p>
<div class="figure align-center" id="id2">
<span id="fig-evrc-region"></span><a class="reference internal image-reference" href="../_images/regions.png"><img alt="../_images/regions.png" src="../_images/regions.png" style="width: 10cm;" /></a>
<p class="caption"><span class="caption-text">Disjunct and overlapping regions in front of a default.</span><a class="headerlink" href="#id2" title="Permalink to this image"></a></p>
</div>
</div>
<div class="section" id="event-types">
<h3>Event types<a class="headerlink" href="#event-types" title="Permalink to this headline"></a></h3>
<p>The event types are either set based the types configured in
<a class="reference internal" href="#confval-rc.eventTypePositive"><code class="xref std std-confval docutils literal notranslate"><span class="pre">rc.eventTypePositive</span></code></a> and <a class="reference internal" href="#confval-rc.eventTypeNegative"><code class="xref std std-confval docutils literal notranslate"><span class="pre">rc.eventTypeNegative</span></code></a>
or based on the type provided by the header of BNA polygons if
<a class="reference internal" href="#confval-rc.readEventTypeFromBNA"><code class="xref std std-confval docutils literal notranslate"><span class="pre">rc.readEventTypeFromBNA</span></code></a> is active.</p>
<div class="section" id="type-definition">
<h4>Type definition<a class="headerlink" href="#type-definition" title="Permalink to this headline"></a></h4>
<p>For defining the event type, any value defined in <span id="id1"><em>SeisComP UML diagram</em> [<a class="reference internal" href="../base/references.html#id264" title="SeisComP UML diagram. GEOFON. URL: https://geofon.gfz-potsdam.de/_uml_new/.">22</a>]</span>.
The list of valid values can also be found in the Event tab of <a class="reference internal" href="scolv.html#scolv"><span class="std std-ref">scolv</span></a>: Type.</p>
<p>Examples for valid event types:</p>
<ul class="simple">
<li><p>earthquake</p></li>
<li><p>quarry blast</p></li>
<li><p>nuclear explosion</p></li>
<li><p>not existing</p></li>
<li><p></p></li>
</ul>
<p>Invalid values result in errors which are reported depending on the verbosity
level of <a class="reference internal" href="scevent.html#scevent"><span class="std std-ref">scevent</span></a>.</p>
</div>
<div class="section" id="event-type-from-bna">
<span id="sec-evrc-bna"></span><h4>Event type from BNA<a class="headerlink" href="#event-type-from-bna" title="Permalink to this headline"></a></h4>
<p>If <a class="reference internal" href="#confval-rc.readEventTypeFromBNA"><code class="xref std std-confval docutils literal notranslate"><span class="pre">rc.readEventTypeFromBNA</span></code></a> is active, the event type is read from the
header of the feature. Use a key-value pair in double quotes to specify the type
where the key is “eventType” and the value is the event type. Key and value are
separated by “:”.</p>
<p>Example BNA file:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="s2">&quot;coal&quot;</span>,<span class="s2">&quot;rank 1&quot;</span>,<span class="s2">&quot;eventType: mining explosion&quot;</span>,6
<span class="m">13</span>.392,50.3002
<span class="m">13</span>.2244,50.4106
<span class="m">13</span>.4744,50.5347
<span class="m">13</span>.6886,50.4945
<span class="m">13</span>.6089,50.358
<span class="m">13</span>.6089,50.358
</pre></div>
</div>
<p>where the name of the polygon / region is “coal” and the considered event type
is “mining explosion”. The name and the rank are mandatory fields.</p>
<p>The depth of the event can be tested, too. For events within a region but with
depth outside a depth range the type
is not set. The limits of the depth range can be added to the header of the BNA files
using the key words <em>minDepth</em> and <em>maxDepth</em>. The depth <em>d</em> of an event must be
within the range</p>
<div class="math">
<p><img src="../_images/math/f2e87dd314fde8db19e6eb5a5f937278f85efe08.png" alt="minDepth \le d \le maxDepth"/></p>
</div><p>The depth is only tested if minDepth or maxDepth or both are set and if
<a class="reference internal" href="#confval-rc.readEventTypeFromBNA"><code class="xref std std-confval docutils literal notranslate"><span class="pre">rc.readEventTypeFromBNA</span></code></a> is active.</p>
<p>Example BNA file:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="s2">&quot;coal&quot;</span>,<span class="s2">&quot;rank 1&quot;</span>,<span class="s2">&quot;eventType: mining explosion, minDepth: -5, maxDepth: 10&quot;</span>,6
<span class="m">13</span>.392,50.3002
...
</pre></div>
</div>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<ul class="simple">
<li><p>The names of polygons, e.g. coal, are case sensitive and must not contain commas.</p></li>
<li><p>A hierarchy applies to the reading of BNA files. Read the section
<a class="reference internal" href="global_gui.html#sec-gui-layers-vector"><span class="std std-ref">Vector layers</span></a> for the details.</p></li>
</ul>
</div>
</div>
</div>
</div>
<div class="section" id="setting-up-the-plugin">
<h2>Setting up the Plugin<a class="headerlink" href="#setting-up-the-plugin" title="Permalink to this headline"></a></h2>
<p>Load the <em>evrc</em> plugin: Add to the global configuration or to the
global configuration of <a class="reference internal" href="scevent.html#scevent"><span class="std std-ref">scevent</span></a> in the order of priority:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span><span class="nv">plugins</span> <span class="o">=</span> <span class="si">${</span><span class="nv">plugins</span><span class="si">}</span>,evrc
</pre></div>
</div>
<p>Add BNA polygons by defining <a class="reference internal" href="#confval-rc.regions"><code class="xref std std-confval docutils literal notranslate"><span class="pre">rc.regions</span></code></a>.
Use the region name to define positive and negative regions. Names with
leading <em>!</em> define negative regions.</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>rc.regions <span class="o">=</span> accept,area
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p><a class="reference internal" href="scevent.html#scevent"><span class="std std-ref">scevent</span></a> stops
if the <em>evrc</em> plugin is loaded but <a class="reference internal" href="#confval-rc.regions"><code class="xref std std-confval docutils literal notranslate"><span class="pre">rc.regions</span></code></a> is not defined.</p>
</div>
<p>Activate <a class="reference internal" href="#confval-rc.readEventTypeFromBNA"><code class="xref std std-confval docutils literal notranslate"><span class="pre">rc.readEventTypeFromBNA</span></code></a> and add the eventType key-value pair
to the header of the <a class="reference internal" href="#sec-evrc-bna"><span class="std std-ref">BNA polygon</span></a> if the event type shall
be read from the BNA polygon.</p>
<p><strong>Examples:</strong></p>
<p>Set type of events within the positive polygon <strong>germany</strong> but do not change the
type outside:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>rc.regions <span class="o">=</span> accept,germany
</pre></div>
</div>
<p>Accept all events without setting the type but set the type for all events within
the positive polygon <strong>germany</strong> but consider negative within the polygon <strong>quarries</strong>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>rc.regions <span class="o">=</span> accept,germany,!quarries
</pre></div>
</div>
<p>Accept all events without setting the type but consider events within the negative polygon <strong>germany</strong>
and events within the positive polygon <strong>saxony</strong>:</p>
<div class="highlight-sh notranslate"><div class="highlight"><pre><span></span>rc.regions <span class="o">=</span> accept,!germany,saxony
</pre></div>
</div>
</div>
<div class="section" id="module-configuration">
<span id="scevent-regioncheck-configuration"></span><h2>Module Configuration<a class="headerlink" href="#module-configuration" title="Permalink to this headline"></a></h2>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p><strong>rc.*</strong>
<em>Test if events lie within or outside a region.</em>
<em>Events within a region are flagged as positive, outside as negative.</em>
<em>The event type is set accordingly. Add the</em>
<em>plugin “evrc” to the plugins parameter in the</em>
<em>order of priority to make this feature available. Read the</em>
<em>documentation of the RegionCheck for more details.</em></p>
</div>
<dl class="confval">
<dt id="confval-rc.setEventType">
<code class="sig-name descname">rc.setEventType</code><a class="headerlink" href="#confval-rc.setEventType" title="Permalink to this definition"></a></dt>
<dd><p>Default: <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
<p>Type: <em>boolean</em></p>
<p>Allow setting the event type.
The type of events which have manual origins will
not be changed unless configured explicitely by
“overwriteManual”.</p>
</dd></dl>
<dl class="confval">
<dt id="confval-rc.overwriteEventType">
<code class="sig-name descname">rc.overwriteEventType</code><a class="headerlink" href="#confval-rc.overwriteEventType" title="Permalink to this definition"></a></dt>
<dd><p>Default: <code class="docutils literal notranslate"><span class="pre">true</span></code></p>
<p>Type: <em>boolean</em></p>
<p>Allow overwriting existing event types. Disabling does not
allow accounting for changes in source region.</p>
</dd></dl>
<dl class="confval">
<dt id="confval-rc.overwriteManual">
<code class="sig-name descname">rc.overwriteManual</code><a class="headerlink" href="#confval-rc.overwriteManual" title="Permalink to this definition"></a></dt>
<dd><p>Default: <code class="docutils literal notranslate"><span class="pre">false</span></code></p>
<p>Type: <em>boolean</em></p>
<p>Allow setting the event type if the mode of the preferred
origin is manual or if the event type was set manually.</p>
</dd></dl>
<dl class="confval">
<dt id="confval-rc.regions">
<code class="sig-name descname">rc.regions</code><a class="headerlink" href="#confval-rc.regions" title="Permalink to this definition"></a></dt>
<dd><p>Default: <code class="docutils literal notranslate"><span class="pre">!reject</span></code></p>
<p>Type: <em>list:string</em></p>
<p>The list of closed BNA polygon names defining regions for
flagging event as positive or negative.
A polygon name defines a positive region but names with prefix ! (exclamation mark)
define negative regions. Evaluation is done in the order of the
polygons. The last matching criteria applies and the event type
is set accordingly.</p>
<p>Default: If events are not positive or are negative regions the
event type is set to “outside of network interest”.
Default: “!reject”, use “accecpt” to overwrite the default.</p>
<p>Examples:</p>
<p>Events are flagged positive within the polygon “germany”:</p>
<p>germany</p>
<p>All events are flagged positive but events within the polygon “quarries” are negative:</p>
<p>accept,!quarries</p>
<p>Events within the polygon “germany” are flagged positive but
all other events and events within the polygon “quarries” are negaitve:</p>
<p>germany,!quarries</p>
<p>All events are flagged positive but events within the polygon “germany”
are negative and all events within the polygon “saxony” are positive:</p>
<p>accept,!germany,saxony</p>
</dd></dl>
<dl class="confval">
<dt id="confval-rc.readEventTypeFromBNA">
<code class="sig-name descname">rc.readEventTypeFromBNA</code><a class="headerlink" href="#confval-rc.readEventTypeFromBNA" title="Permalink to this definition"></a></dt>
<dd><p>Default: <code class="docutils literal notranslate"><span class="pre">false</span></code></p>
<p>Type: <em>boolean</em></p>
<p>Read the event type, minDepth and maxDepth from the BNA polygon header. The header may contain
the values, e.g. header of a polygon with name “quarry”:</p>
<p>“quarry”,”rank 1”,”eventType: quarry blast, minDepth: -5, maxDepth: 10”,13</p>
<p>When eventType is set, it supersedes eventTypePositive and eventTypeNegative.
When not set, eventTypePositive and eventTypeNegative are considered.</p>
</dd></dl>
<dl class="confval">
<dt id="confval-rc.eventTypePositive">
<code class="sig-name descname">rc.eventTypePositive</code><a class="headerlink" href="#confval-rc.eventTypePositive" title="Permalink to this definition"></a></dt>
<dd><p>Type: <em>string</em></p>
<p>New type of an event which is flagged positive. Ignored
if readEventTypeFromBNA is active.</p>
<p>Empty: Do not set type</p>
</dd></dl>
<dl class="confval">
<dt id="confval-rc.eventTypeNegative">
<code class="sig-name descname">rc.eventTypeNegative</code><a class="headerlink" href="#confval-rc.eventTypeNegative" title="Permalink to this definition"></a></dt>
<dd><p>Default: <code class="docutils literal notranslate"><span class="pre">&quot;outside</span> <span class="pre">of</span> <span class="pre">network</span> <span class="pre">interest&quot;</span></code></p>
<p>Type: <em>string</em></p>
<p>New type of an event which is flagged negative. Ignored
if readEventTypeFromBNA is active.</p>
<p>Empty means default: “outside of network interest”</p>
</dd></dl>
</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="#">RegionCheck</a><ul>
<li><a class="reference internal" href="#description">Description</a><ul>
<li><a class="reference internal" href="#definition-of-regions">Definition of regions</a></li>
<li><a class="reference internal" href="#treatment-of-events">Treatment of events</a></li>
<li><a class="reference internal" href="#event-types">Event types</a><ul>
<li><a class="reference internal" href="#type-definition">Type definition</a></li>
<li><a class="reference internal" href="#event-type-from-bna">Event type from BNA</a></li>
</ul>
</li>
</ul>
</li>
<li><a class="reference internal" href="#setting-up-the-plugin">Setting up the Plugin</a></li>
<li><a class="reference internal" href="#module-configuration">Module Configuration</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="../toc/extensions/scevent.html"
title="previous chapter">scevent</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="../toc/extensions/scm.html"
title="next chapter">scm</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/apps/scevent_regioncheck.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>