| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 --> |
| <title>FeatureOperations (Apache SIS 1.4 API)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="dc.created" content="2023-10-05"> |
| <meta name="description" content="declaration: module: org.apache.sis.feature, package: org.apache.sis.feature, class: FeatureOperations"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <meta name="keywords" content="org.apache.sis.feature.FeatureOperations class"> |
| <meta name="keywords" content="link()"> |
| <meta name="keywords" content="compound()"> |
| <meta name="keywords" content="envelope()"> |
| <meta name="keywords" content="groupAsPolyline()"> |
| <meta name="keywords" content="function()"> |
| <meta name="keywords" content="expression()"> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../sis.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-3.6.1.min.js"></script> |
| <script type="text/javascript" src="../../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var pathtoroot = "../../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span><span class="nav-bar-toggle-icon"> </span></button> |
| <div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div> |
| <ul id="navbar-top-firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../../index.html">Overview</a></li> |
| <li><a href="../../../../module-summary.html">Module</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html#class">Help</a></li> |
| </ul> |
| <ul class="sub-nav-list-small"> |
| <li> |
| <p>Summary:</p> |
| <ul> |
| <li>Nested</li> |
| <li>Field</li> |
| <li>Constr</li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| </li> |
| <li> |
| <p>Detail:</p> |
| <ul> |
| <li>Field</li> |
| <li>Constr</li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div id="navbar-sub-list"> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method-summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method-detail">Method</a></li> |
| </ul> |
| </div> |
| <div class="nav-list-search"><a href="../../../../../search.html">SEARCH</a> |
| <input type="text" id="search-input" disabled placeholder="Search"> |
| <input type="reset" id="reset-button" disabled value="reset"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip-navbar-top"></span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="module-label-in-type">Module</span> <a href="../../../../module-summary.html">org.apache.sis.feature</a></div> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">org.apache.sis.feature</a></div> |
| <h1 title="Class FeatureOperations" class="title">Class FeatureOperations</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a> |
| <div class="inheritance"><a href="../../../../../org.apache.sis.util/org/apache/sis/util/Static.html" title="class in org.apache.sis.util">Static</a> |
| <div class="inheritance">FeatureOperations</div> |
| </div> |
| </div> |
| <section class="class-description" id="class-description"> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public final class </span><span class="element-name type-name-label">FeatureOperations</span> |
| <span class="extends-implements">extends <a href="../../../../../org.apache.sis.util/org/apache/sis/util/Static.html" title="class in org.apache.sis.util">Static</a></span></div> |
| <div class="block">A set of predefined operations expecting a <code>Feature</code> as input and producing an <code>Attribute</code> as output. |
| Those operations can be used for creating <cite>dynamic properties</cite> which compute their value on-the-fly |
| from the values of other properties. |
| |
| <p>A flexible but relatively cumbersome way to define arbitrary computations is to subclass <a href="AbstractOperation.html" title="class in org.apache.sis.feature"><code>AbstractOperation</code></a>. |
| This <code>FeatureOperations</code> class provides a more convenient way to get a few commonly-used operations.</p> |
| |
| <h2 id="operation-name-designation-and-description-heading">Operation name, designation and description</h2> |
| All operations are identified by a programmatic name, but can also have a more human-readable designation |
| for Graphical User Interfaces (GUI). Those identification information are specified in a <code>Map<String,?></code>. |
| The recognized entries are the same than the ones documented in <a href="AbstractIdentifiedType.html" title="class in org.apache.sis.feature"><code>AbstractIdentifiedType</code></a>, augmented with |
| entries that describe the operation <em>result</em>. Those entries are summarized below: |
| |
| <table class="sis"> |
| <caption>Recognized map entries</caption> |
| <tr> |
| <th>Map key</th> |
| <th>Value type</th> |
| <th>Returned by</th> |
| </tr> |
| <tr> |
| <td><a href="AbstractIdentifiedType.html#NAME_KEY">"name"</a></td> |
| <td><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/GenericName.html" title="class or interface in org.opengis.util" class="external-link"><code>GenericName</code></a> or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><code>String</code></a></td> |
| <td><a href="AbstractIdentifiedType.html#getName()"><code>Operation.getName()</code></a> (mandatory)</td> |
| </tr> |
| <tr> |
| <td><a href="AbstractIdentifiedType.html#DEFINITION_KEY">"definition"</a></td> |
| <td><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link"><code>InternationalString</code></a> or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><code>String</code></a></td> |
| <td><a href="AbstractIdentifiedType.html#getDefinition()"><code>Operation.getDefinition()</code></a></td> |
| </tr> |
| <tr> |
| <td><a href="AbstractIdentifiedType.html#DESIGNATION_KEY">"designation"</a></td> |
| <td><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link"><code>InternationalString</code></a> or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><code>String</code></a></td> |
| <td><a href="AbstractIdentifiedType.html#getDesignation()"><code>Operation.getDesignation()</code></a></td> |
| </tr> |
| <tr> |
| <td><a href="AbstractIdentifiedType.html#DESCRIPTION_KEY">"description"</a></td> |
| <td><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link"><code>InternationalString</code></a> or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><code>String</code></a></td> |
| <td><a href="AbstractIdentifiedType.html#getDescription()"><code>Operation.getDescription()</code></a></td> |
| </tr> |
| <tr> |
| <td>"result.name"</td> |
| <td><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/GenericName.html" title="class or interface in org.opengis.util" class="external-link"><code>GenericName</code></a> or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><code>String</code></a></td> |
| <td><a href="AbstractAttribute.html#getName()"><code>Attribute.getName()</code></a> on the <a href="AbstractOperation.html#getResult()">result</a></td> |
| </tr> |
| <tr> |
| <td>"result.definition"</td> |
| <td><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link"><code>InternationalString</code></a> or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><code>String</code></a></td> |
| <td><a href="AbstractIdentifiedType.html#getDefinition()"><code>Attribute.getDefinition()</code></a> on the <a href="AbstractOperation.html#getResult()">result</a></td> |
| </tr> |
| <tr> |
| <td>"result.designation"</td> |
| <td><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link"><code>InternationalString</code></a> or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><code>String</code></a></td> |
| <td><a href="AbstractIdentifiedType.html#getDesignation()"><code>Attribute.getDesignation()</code></a> on the <a href="AbstractOperation.html#getResult()">result</a></td> |
| </tr> |
| <tr> |
| <td>"result.description"</td> |
| <td><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/InternationalString.html" title="class or interface in org.opengis.util" class="external-link"><code>InternationalString</code></a> or <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><code>String</code></a></td> |
| <td><a href="AbstractIdentifiedType.html#getDescription()"><code>Attribute.getDescription()</code></a> on the <a href="AbstractOperation.html#getResult()">result</a></td> |
| </tr> |
| <tr> |
| <td><a href="../../../../../org.apache.sis.referencing/org/apache/sis/referencing/AbstractIdentifiedObject.html#LOCALE_KEY">"locale"</a></td> |
| <td><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Locale.html" title="class or interface in java.util" class="external-link"><code>Locale</code></a></td> |
| <td>(none)</td> |
| </tr> |
| </table> |
| |
| If no <code>"result.*"</code> entry is provided, then the methods in this class will use some default name, designation |
| and other information for the result type. Those defaults are operation specific; they are often, but not necessarily, |
| the same than the operation name, designation, <i>etc.</i></div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>0.7</dd> |
| </dl> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method-summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="AbstractOperation.html" title="class in org.apache.sis.feature">AbstractOperation</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#compound(java.util.Map,java.lang.String,java.lang.String,java.lang.String,org.apache.sis.feature.AbstractIdentifiedType...)" class="member-name-link">compound</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> identification, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> delimiter, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> prefix, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> suffix, |
| <a href="AbstractIdentifiedType.html" title="class in org.apache.sis.feature">AbstractIdentifiedType</a>... singleAttributes)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Creates an operation concatenating the string representations of the values of multiple properties.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="AbstractOperation.html" title="class in org.apache.sis.feature">AbstractOperation</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#envelope(java.util.Map,org.opengis.referencing.crs.CoordinateReferenceSystem,org.apache.sis.feature.AbstractIdentifiedType...)" class="member-name-link">envelope</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> identification, |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/CoordinateReferenceSystem.html" title="class or interface in org.opengis.referencing.crs" class="external-link">CoordinateReferenceSystem</a> crs, |
| <a href="AbstractIdentifiedType.html" title="class in org.apache.sis.feature">AbstractIdentifiedType</a>... geometryAttributes)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Creates an operation computing the envelope that encompass all geometries found in the given attributes.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <V> <a href="AbstractOperation.html" title="class in org.apache.sis.feature">AbstractOperation</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#expression(java.util.Map,org.apache.sis.filter.Expression,org.apache.sis.feature.DefaultAttributeType)" class="member-name-link">expression</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> identification, |
| <a href="../filter/Expression.html" title="interface in org.apache.sis.filter">Expression</a><? super <a href="AbstractFeature.html" title="class in org.apache.sis.feature">AbstractFeature</a>,<wbr>?> expression, |
| <a href="DefaultAttributeType.html" title="class in org.apache.sis.feature">DefaultAttributeType</a><V> resultType)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Creates an operation which delegates the computation to a given expression producing values of unknown type.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <V> <a href="AbstractOperation.html" title="class in org.apache.sis.feature">AbstractOperation</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#function(java.util.Map,java.util.function.Function,org.apache.sis.feature.DefaultAttributeType)" class="member-name-link">function</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> identification, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Function.html" title="class or interface in java.util.function" class="external-link">Function</a><? super <a href="AbstractFeature.html" title="class in org.apache.sis.feature">AbstractFeature</a>,<wbr>? extends V> expression, |
| <a href="DefaultAttributeType.html" title="class in org.apache.sis.feature">DefaultAttributeType</a><? super V> resultType)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Creates an operation which delegates the computation to a given expression.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="AbstractOperation.html" title="class in org.apache.sis.feature">AbstractOperation</a></code></div> |
| <div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#groupAsPolyline(java.util.Map,org.apache.sis.setup.GeometryLibrary,org.apache.sis.feature.AbstractIdentifiedType)" class="member-name-link">groupAsPolyline</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> identification, |
| <a href="../../../../../org.apache.sis.util/org/apache/sis/setup/GeometryLibrary.html" title="enum class in org.apache.sis.setup">GeometryLibrary</a> library, |
| <a href="AbstractIdentifiedType.html" title="class in org.apache.sis.feature">AbstractIdentifiedType</a> components)</code></div> |
| <div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Creates a single geometry from a sequence of points or polylines stored in another property.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="AbstractOperation.html" title="class in org.apache.sis.feature">AbstractOperation</a></code></div> |
| <div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#link(java.util.Map,org.apache.sis.feature.AbstractIdentifiedType)" class="member-name-link">link</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> identification, |
| <a href="AbstractIdentifiedType.html" title="class in org.apache.sis.feature">AbstractIdentifiedType</a> referent)</code></div> |
| <div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"> |
| <div class="block">Creates an operation which is only an alias for another property.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods-inherited-from-class-Object">Methods inherited from class <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method-detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="link(java.util.Map,org.apache.sis.feature.AbstractIdentifiedType)"> |
| <h3>link</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="AbstractOperation.html" title="class in org.apache.sis.feature">AbstractOperation</a></span> <span class="element-name">link</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> identification, |
| <a href="AbstractIdentifiedType.html" title="class in org.apache.sis.feature">AbstractIdentifiedType</a> referent)</span></div> |
| <div class="block">Creates an operation which is only an alias for another property. |
| |
| <h4 id="example-heading">Example</h4> |
| Features often have a property that can be used as identifier or primary key. |
| But the name of that property may vary between features of different types. |
| For example, features of type <b>Country</b> may have identifiers named “ISO country code” |
| while features of type <b>Car</b> may have identifiers named “license plate number”. |
| In order to simplify identifier usages regardless of their name, |
| an application could choose to add in all features a virtual property named <code>"identifier"</code> |
| which links to whatever property is used as an identifier in an arbitrary feature. |
| So the definition of the <b>Car</b> feature could contain the following code: |
| |
| |
| <div class="snippet-container"><button class="copy snippet-copy" aria-label="Copy snippet" onclick="copySnippet(this)"><span data-copied="Copied!">Copy</span><img src="../../../../../copy.svg" alt="Copy snippet"></button> |
| <pre class="snippet"><code class="language-java">AttributeType licensePlateNumber = ...; // Attribute creation omitted for brevity |
| FeatureType car = new DefaultFeatureType(..., // Arguments omitted for brevity |
| licensePlateNumber, model, owner, |
| FeatureOperations.link(Map.of(NAME_KEY, "identifier"), licensePlateNumber); |
| </code></pre> |
| </div> |
| |
| |
| Since this method does not create new property (it only redirects to an existing property), |
| this method ignores all <code>"result.*"</code> entries in the given <code>identification</code> map. |
| |
| <h4 id="read-write-behavior-heading">Read/write behavior</h4> |
| Since the <a href="AbstractOperation.html#apply(org.apache.sis.feature.AbstractFeature,org.opengis.parameter.ParameterValueGroup)"><code>Operation.apply(…)</code></a> method returns directly the property |
| identified by the <code>referent</code> argument, the returned property is writable if the referenced |
| property is also writable. |
| |
| <div class="warning"><b>Warning:</b> |
| The type of <code>referent</code> parameter will be changed to <code>PropertyType</code> |
| if and when such interface will be defined in GeoAPI.</div></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>identification</code> - the name and other information to be given to the operation.</dd> |
| <dd><code>referent</code> - the referenced attribute or feature association.</dd> |
| <dt>Returns:</dt> |
| <dd>an operation which is an alias for the <code>referent</code> property.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list-long"> |
| <li><a href="Features.html#getLinkTarget(org.apache.sis.feature.AbstractIdentifiedType)"><code>Features.getLinkTarget(PropertyType)</code></a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="compound(java.util.Map,java.lang.String,java.lang.String,java.lang.String,org.apache.sis.feature.AbstractIdentifiedType...)"> |
| <h3>compound</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="AbstractOperation.html" title="class in org.apache.sis.feature">AbstractOperation</a></span> <span class="element-name">compound</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> identification, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> delimiter, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> prefix, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a> suffix, |
| <a href="AbstractIdentifiedType.html" title="class in org.apache.sis.feature">AbstractIdentifiedType</a>... singleAttributes)</span> |
| throws <span class="exceptions"><a href="../../../../../org.apache.sis.util/org/apache/sis/util/UnconvertibleObjectException.html" title="class in org.apache.sis.util">UnconvertibleObjectException</a></span></div> |
| <div class="block">Creates an operation concatenating the string representations of the values of multiple properties. |
| This operation can be used for creating a <cite>compound key</cite> as a <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><code>String</code></a> that consists |
| of two or more attribute values that uniquely identify a feature instance. |
| |
| <p>The <code>delimiter</code>, <code>prefix</code> and <code>suffix</code> arguments given to this method |
| are used in the same way than <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/StringJoiner.html" title="class or interface in java.util" class="external-link"><code>StringJoiner</code></a>, except for null values. |
| Null prefix, suffix and property values are handled as if they were empty strings.</p> |
| |
| <p>If the same character sequences than the given delimiter appears in a property value, |
| the <code>'\'</code> escape character will be inserted before that sequence. |
| If the <code>'\'</code> character appears in a property value, it will be doubled.</p> |
| |
| <h4 id="restrictions-heading">Restrictions</h4> |
| <ul> |
| <li>The single properties can be either attributes or operations that produce attributes; |
| feature associations are not allowed, unless they have an <code>"sis:identifier"</code> property.</li> |
| <li>Each attribute shall contain at most one value; multi-valued attributes are not allowed.</li> |
| <li>The delimiter cannot contain the <code>'\'</code> escape character.</li> |
| </ul> |
| |
| <h4 id="read-write-behavior-heading1">Read/write behavior</h4> |
| This operation supports both reading and writing. When setting a value on the attribute created by this |
| operation, the given string value will be split around the <code>delimiter</code> and each substring will be |
| forwarded to the corresponding single property. |
| |
| <div class="warning"><b>Warning:</b> |
| The type of <code>singleAttributes</code> elements will be changed to <code>PropertyType</code> |
| if and when such interface will be defined in GeoAPI.</div></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>identification</code> - the name and other information to be given to the operation.</dd> |
| <dd><code>delimiter</code> - the characters to use as delimiter between each single property value.</dd> |
| <dd><code>prefix</code> - characters to use at the beginning of the concatenated string, or <code>null</code> if none.</dd> |
| <dd><code>suffix</code> - characters to use at the end of the concatenated string, or <code>null</code> if none.</dd> |
| <dd><code>singleAttributes</code> - identification of the single attributes (or operations producing attributes) to concatenate.</dd> |
| <dt>Returns:</dt> |
| <dd>an operation which concatenates the string representations of all referenced single property values.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="../../../../../org.apache.sis.util/org/apache/sis/util/UnconvertibleObjectException.html" title="class in org.apache.sis.util">UnconvertibleObjectException</a></code> - if at least one of the given <code>singleAttributes</code> uses a |
| <a href="DefaultAttributeType.html#getValueClass()">value class</a> which is not convertible from a <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link"><code>String</code></a>.</dd> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></code> - if <code>singleAttributes</code> is an empty sequence, or contains a property which |
| is neither an <code>AttributeType</code> or an <code>Operation</code> computing an attribute, or an attribute has |
| a <a href="DefaultAttributeType.html#getMaximumOccurs()">maximum number of occurrences</a> greater than 1.</dd> |
| <dt>See Also:</dt> |
| <dd> |
| <ul class="tag-list"> |
| <li><a href="https://en.wikipedia.org/wiki/Compound_key">Compound key on Wikipedia</a></li> |
| </ul> |
| </dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="envelope(java.util.Map,org.opengis.referencing.crs.CoordinateReferenceSystem,org.apache.sis.feature.AbstractIdentifiedType...)"> |
| <h3>envelope</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="AbstractOperation.html" title="class in org.apache.sis.feature">AbstractOperation</a></span> <span class="element-name">envelope</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> identification, |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/CoordinateReferenceSystem.html" title="class or interface in org.opengis.referencing.crs" class="external-link">CoordinateReferenceSystem</a> crs, |
| <a href="AbstractIdentifiedType.html" title="class in org.apache.sis.feature">AbstractIdentifiedType</a>... geometryAttributes)</span> |
| throws <span class="exceptions"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/FactoryException.html" title="class or interface in org.opengis.util" class="external-link">FactoryException</a></span></div> |
| <div class="block">Creates an operation computing the envelope that encompass all geometries found in the given attributes. |
| Geometries can be in different coordinate reference systems; they will be transformed to the first non-null |
| CRS in the following choices: |
| |
| <ol> |
| <li>the CRS specified to this method,</li> |
| <li>the CRS of the default geometry, or</li> |
| <li>the CRS of the first non-empty geometry.</li> |
| </ol> |
| |
| The <a href="AbstractOperation.html#getResult()">result</a> of this operation is an <code>Attribute</code> |
| with values of type <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html" title="class or interface in org.opengis.geometry" class="external-link"><code>Envelope</code></a>. If the <code>crs</code> argument given to |
| this method is non-null, then the |
| <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/Envelope.html#getCoordinateReferenceSystem()" title="class or interface in org.opengis.geometry" class="external-link">envelope CRS</a> |
| will be that CRS. |
| |
| <h4 id="limitations-heading">Limitations</h4> |
| If a geometry contains other geometries, this operation queries only the envelope of the root geometry. |
| It is the root geometry responsibility to take in account the envelope of all its children. |
| |
| <h4 id="read-write-behavior-heading2">Read/write behavior</h4> |
| This operation is read-only. Calls to <code>Attribute.setValue(Envelope)</code> will result in an |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link"><code>UnsupportedOperationException</code></a> to be thrown. |
| |
| <div class="warning"><b>Warning:</b> |
| The type of <code>geometryAttributes</code> elements will be changed to <code>PropertyType</code> |
| if and when such interface will be defined in GeoAPI.</div></div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>identification</code> - the name and other information to be given to the operation.</dd> |
| <dd><code>crs</code> - the Coordinate Reference System in which to express the envelope, or <code>null</code>.</dd> |
| <dd><code>geometryAttributes</code> - the operation or attribute type from which to get geometry values. |
| Any element which is <code>null</code> or has a non-geometric value class will be ignored.</dd> |
| <dt>Returns:</dt> |
| <dd>an operation which will compute the envelope encompassing all geometries in the given attributes.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/util/FactoryException.html" title="class or interface in org.opengis.util" class="external-link">FactoryException</a></code> - if a coordinate operation to the target CRS cannot be created.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="groupAsPolyline(java.util.Map,org.apache.sis.setup.GeometryLibrary,org.apache.sis.feature.AbstractIdentifiedType)"> |
| <h3>groupAsPolyline</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="AbstractOperation.html" title="class in org.apache.sis.feature">AbstractOperation</a></span> <span class="element-name">groupAsPolyline</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> identification, |
| <a href="../../../../../org.apache.sis.util/org/apache/sis/setup/GeometryLibrary.html" title="enum class in org.apache.sis.setup">GeometryLibrary</a> library, |
| <a href="AbstractIdentifiedType.html" title="class in org.apache.sis.feature">AbstractIdentifiedType</a> components)</span></div> |
| <div class="block">Creates a single geometry from a sequence of points or polylines stored in another property. |
| When evaluated, this operation reads a feature property containing a sequence of <code>Point</code>s or <code>Polyline</code>s. |
| Those geometries shall be instances of the specified geometry library (e.g. JTS or ESRI). |
| The merged geometry is usually a <code>Polyline</code>, |
| unless the sequence of source geometries is empty or contains a single element. |
| The merged geometry is re-computed every time that the operation is evaluated. |
| |
| <h4 id="examples-heading">Examples</h4> |
| <p><i>Polylines created from points:</i> |
| a boat that record it's position every hour. |
| The input is a list of all positions stored in an attribute with [0 … ∞] multiplicity. |
| This operation will extract each position and create a line as a new attribute.</p> |
| |
| <p><i>Polylines created from other polylines:</i> |
| a boat that record track every hour. |
| The input is a list of all tracks stored in an attribute with [0 … ∞] multiplicity. |
| This operation will extract each track and create a polyline as a new attribute.</p> |
| |
| <h4 id="read-write-behavior-heading3">Read/write behavior</h4> |
| This operation is read-only. Calls to <code>Attribute.setValue(…)</code> |
| will result in an <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link"><code>UnsupportedOperationException</code></a> to be thrown.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>identification</code> - the name of the operation, together with optional information.</dd> |
| <dd><code>library</code> - the library providing the implementations of geometry objects to read and write.</dd> |
| <dd><code>components</code> - attribute, association or operation providing the geometries to group as a polyline.</dd> |
| <dt>Returns:</dt> |
| <dd>a feature operation which computes its values by merging points or polylines.</dd> |
| <dt>Since:</dt> |
| <dd>1.4</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="function(java.util.Map,java.util.function.Function,org.apache.sis.feature.DefaultAttributeType)"> |
| <h3>function</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="type-parameters"><V></span> <span class="return-type"><a href="AbstractOperation.html" title="class in org.apache.sis.feature">AbstractOperation</a></span> <span class="element-name">function</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> identification, |
| <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Function.html" title="class or interface in java.util.function" class="external-link">Function</a><? super <a href="AbstractFeature.html" title="class in org.apache.sis.feature">AbstractFeature</a>,<wbr>? extends V> expression, |
| <a href="DefaultAttributeType.html" title="class in org.apache.sis.feature">DefaultAttributeType</a><? super V> resultType)</span></div> |
| <div class="block">Creates an operation which delegates the computation to a given expression. |
| The <code>expression</code> argument should generally be an instance of |
| <a href="../filter/Expression.html" title="interface in org.apache.sis.filter"><code>Expression</code></a>, |
| but more generic functions are accepted as well. |
| |
| <h4 id="read-write-behavior-heading4">Read/write behavior</h4> |
| This operation is read-only. Calls to <code>Attribute.setValue(…)</code> |
| will result in an <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link"><code>UnsupportedOperationException</code></a> to be thrown.</div> |
| <dl class="notes"> |
| <dt>Type Parameters:</dt> |
| <dd><code>V</code> - the type of values computed by the expression and assigned to the feature property.</dd> |
| <dt>Parameters:</dt> |
| <dd><code>identification</code> - the name of the operation, together with optional information.</dd> |
| <dd><code>expression</code> - the expression to evaluate on feature instances.</dd> |
| <dd><code>resultType</code> - type of values computed by the expression and assigned to the feature property.</dd> |
| <dt>Returns:</dt> |
| <dd>a feature operation which computes its values using the given expression.</dd> |
| <dt>Since:</dt> |
| <dd>1.4</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="expression(java.util.Map,org.apache.sis.filter.Expression,org.apache.sis.feature.DefaultAttributeType)"> |
| <h3>expression</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="type-parameters"><V></span> <span class="return-type"><a href="AbstractOperation.html" title="class in org.apache.sis.feature">AbstractOperation</a></span> <span class="element-name">expression</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/Map.html" title="class or interface in java.util" class="external-link">Map</a><<a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>,<wbr>?> identification, |
| <a href="../filter/Expression.html" title="interface in org.apache.sis.filter">Expression</a><? super <a href="AbstractFeature.html" title="class in org.apache.sis.feature">AbstractFeature</a>,<wbr>?> expression, |
| <a href="DefaultAttributeType.html" title="class in org.apache.sis.feature">DefaultAttributeType</a><V> resultType)</span></div> |
| <div class="block">Creates an operation which delegates the computation to a given expression producing values of unknown type. |
| This method can be used as an alternative to <a href="#function(java.util.Map,java.util.function.Function,org.apache.sis.feature.DefaultAttributeType)"><code>function(…)</code></a> when the constraint on the |
| parameterized type <code><V></code> between <code>expression</code> and <code>result</code> cannot be enforced at compile time. |
| This method casts or converts the expression to the expected type by a call to |
| <a href="../filter/Expression.html#toValueType(java.lang.Class)"><code>Expression.toValueType(Class)</code></a>. |
| |
| <h4 id="read-write-behavior-heading5">Read/write behavior</h4> |
| This operation is read-only. Calls to <code>Attribute.setValue(…)</code> |
| will result in an <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang" class="external-link"><code>UnsupportedOperationException</code></a> to be thrown.</div> |
| <dl class="notes"> |
| <dt>Type Parameters:</dt> |
| <dd><code>V</code> - the type of values computed by the expression and assigned to the feature property.</dd> |
| <dt>Parameters:</dt> |
| <dd><code>identification</code> - the name of the operation, together with optional information.</dd> |
| <dd><code>expression</code> - the expression to evaluate on feature instances.</dd> |
| <dd><code>resultType</code> - type of values computed by the expression and assigned to the feature property.</dd> |
| <dt>Returns:</dt> |
| <dd>a feature operation which computes its values using the given expression.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/lang/ClassCastException.html" title="class or interface in java.lang" class="external-link">ClassCastException</a></code> - if the result type is not a target type supported by the expression.</dd> |
| <dt>Since:</dt> |
| <dd>1.4</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| </div> |
| </div> |
| </body> |
| </html> |