| <!DOCTYPE HTML> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (21) on Thu Oct 05 19:54:57 CEST 2023 --> |
| <title>org.apache.sis.storage.sql (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.storage.sql, package: org.apache.sis.storage.sql"> |
| <meta name="generator" content="javadoc/PackageWriterImpl"> |
| <meta name="keywords" content="org.apache.sis.storage.sql package"> |
| <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="package-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 class="nav-bar-cell1-rev">Package</li> |
| <li>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#package">Help</a></li> |
| </ul> |
| <ul class="sub-nav-list-small"> |
| <li> |
| <p>Package:</p> |
| <ul> |
| <li><a href="#package-description">Description</a></li> |
| <li><a href="#related-package-summary">Related Packages</a></li> |
| <li><a href="#class-summary">Classes and Interfaces</a></li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div id="navbar-sub-list"> |
| <ul class="sub-nav-list"> |
| <li>Package: </li> |
| <li><a href="#package-description">Description</a> | </li> |
| <li><a href="#related-package-summary">Related Packages</a> | </li> |
| <li><a href="#class-summary">Classes and Interfaces</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"> |
| <div class="header"> |
| <div class="sub-title"><span class="module-label-in-package">Module</span> <a href="../../../../../module-summary.html">org.apache.sis.storage.sql</a></div> |
| <h1 title="Package org.apache.sis.storage.sql" class="title">Package org.apache.sis.storage.sql</h1> |
| </div> |
| <hr> |
| <div class="package-signature">package <span class="element-name">org.apache.sis.storage.sql</span></div> |
| <section class="package-description" id="package-description"> |
| <div class="block">Data store capable to read and create features from a JDBC connection to a database. |
| <a href="SQLStore.html" title="class in org.apache.sis.storage.sql"><code>SQLStore</code></a> takes a one or more tables at construction time. |
| Each enumerated table is represented by a <code>FeatureType</code>. |
| Each row in those table represents a <code>Feature</code> instance. |
| Each relation defined by a foreigner key is represented by an <code>FeatureAssociationRole</code> |
| to another feature (with transitive dependencies automatically resolved), and the other columns are represented |
| by <code>AttributeType</code>. |
| |
| <p>The storage of spatial features in SQL databases is described by the |
| <a href="https://www.ogc.org/standards/sfs">OGC Simple feature access - Part 2: SQL option</a> |
| international standard, also known as ISO 19125-2. Implementation of geometric types and operations must |
| be provided by the database (sometimes through an extension, for example PostGIS on PostgreSQL databases). |
| This Java package uses those provided types and operations.</p> |
| |
| <h2 id="performance-tips-heading">Performance tips</h2> |
| <p>A subset of features can be obtained by applying filters on the stream returned by |
| <a href="../../../../../../org.apache.sis.storage/org/apache/sis/storage/FeatureSet.html#features(boolean)"><code>FeatureSet.features(boolean)</code></a>. |
| While the filter can be any <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/function/Predicate.html" title="class or interface in java.util.function" class="external-link"><code>Predicate</code></a>, |
| performances will be much better if they are instances of <a href="../../../../../../org.apache.sis.feature/org/apache/sis/filter/Filter.html" title="interface in org.apache.sis.filter"><code>Filter</code></a> |
| because Apache SIS will know how to translate some of them to SQL statements.</p> |
| |
| <p>In filter expressions like <code>ST_Intersects(A,B)</code> where the <var>A</var> and <var>B</var> parameters are |
| two sub-expressions evaluating to geometry values, if one of those expressions is a literal, then that literal |
| should be <var>B</var>. The reason is because the SQLMM standard requires us to project <var>B</var> in the |
| Coordinate Reference System of <var>A</var>. If <var>B</var> is a literal, Apache SIS can do this transformation |
| only once before to start the filtering process instead of every time that the filter needs to be evaluated.</p> |
| |
| <h2 id="limitations-heading">Limitations</h2> |
| <ul> |
| <li>Current implementation does not scan the <code>"GEOMETRY_COLUMNS"</code> (from Simple Feature Access) |
| or <code>"gpkg_content"</code> (from GeoPackage) tables for a default list of feature tables.</li> |
| <li>Current implementation does not yet map geometric objects (e.g. PostGIS types).</li> |
| <li>If a parent feature contains association to other features, those other features are created |
| at the same time than the parent feature (no lazy instantiation yet).</li> |
| </ul></div> |
| <dl class="notes"> |
| <dt>Since:</dt> |
| <dd>1.0</dd> |
| </dl> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <li> |
| <div id="related-package-summary"> |
| <div class="caption"><span>Related Packages</span></div> |
| <div class="summary-table three-column-summary"> |
| <div class="table-header col-first">Module</div> |
| <div class="table-header col-second">Package</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-plain even-row-color"><a href="../../../../../../org.apache.sis.storage/module-summary.html">org.apache.sis.storage</a></div> |
| <div class="col-first even-row-color"><a href="../../../../../../org.apache.sis.storage/org/apache/sis/storage/package-summary.html">org.apache.sis.storage</a></div> |
| <div class="col-last even-row-color"> |
| <div class="block"><a href="../../../../../../org.apache.sis.storage/org/apache/sis/storage/DataStore.html" title="class in org.apache.sis.storage">Data store</a> base types for retrieving and saving geospatial data |
| in various storage formats.</div> |
| </div> |
| </div> |
| </div> |
| </li> |
| <li> |
| <div id="class-summary"> |
| <div class="caption"><span>Classes</span></div> |
| <div class="summary-table two-column-summary"> |
| <div class="table-header col-first">Class</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color class-summary class-summary-tab2"><a href="ResourceDefinition.html" title="class in org.apache.sis.storage.sql">ResourceDefinition</a></div> |
| <div class="col-last even-row-color class-summary class-summary-tab2"> |
| <div class="block">Definition of a resource (table, view or query) to include in a <a href="SQLStore.html" title="class in org.apache.sis.storage.sql"><code>SQLStore</code></a>.</div> |
| </div> |
| <div class="col-first odd-row-color class-summary class-summary-tab2"><a href="SQLStore.html" title="class in org.apache.sis.storage.sql">SQLStore</a></div> |
| <div class="col-last odd-row-color class-summary class-summary-tab2"> |
| <div class="block">A data store capable to read and create features from a spatial database.</div> |
| </div> |
| <div class="col-first even-row-color class-summary class-summary-tab2"><a href="SQLStoreProvider.html" title="class in org.apache.sis.storage.sql">SQLStoreProvider</a></div> |
| <div class="col-last even-row-color class-summary class-summary-tab2"> |
| <div class="block">Provider of <code>SQLStore</code> instances.</div> |
| </div> |
| </div> |
| </div> |
| </li> |
| </ul> |
| </section> |
| </main> |
| </div> |
| </div> |
| </body> |
| </html> |