| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (11.0.4) on Fri Sep 20 12:10:30 CEST 2019 --> |
| <title>org.apache.sis.referencing.factory.sql (Apache SIS 1.0 API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="dc.created" content="2019-09-20"> |
| <meta name="keywords" content="org.apache.sis.referencing.factory.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="../../../../../../jquery/jquery-ui.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../../../jquery/jquery-3.3.1.js"></script> |
| <script type="text/javascript" src="../../../../../../jquery/jquery-migrate-3.0.1.js"></script> |
| <script type="text/javascript" src="../../../../../../jquery/jquery-ui.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="org.apache.sis.referencing.factory.sql (Apache SIS 1.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var pathtoroot = "../../../../../../"; |
| var useModuleDirectories = false; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../index.html">Overview</a></li> |
| <li class="navBarCell1Rev">Package</li> |
| <li>Class</li> |
| <li><a href="package-use.html">Use</a></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">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <main role="main"> |
| <div class="header"> |
| <h1 title="Package" class="title">Package org.apache.sis.referencing.factory.sql</h1> |
| </div> |
| <div class="contentContainer"> |
| <section role="region"><a id="package.description"> |
| <!-- --> |
| </a> |
| <div class="block">Factories for geodetic objects defined in a SQL database, typically the EPSG dataset. |
| This package provides support for all codes prefixed by <code>"EPSG:"</code> in the Apache SIS's |
| <a href="http://sis.apache.org/tables/CoordinateReferenceSystems.html">list of authority codes</a>. |
| The main class in this package is <a href="EPSGFactory.html" title="class in org.apache.sis.referencing.factory.sql"><code>EPSGFactory</code></a>, |
| which requires a <a href="https://docs.oracle.com/javase/8/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql" class="externalLink"><code>DataSource</code></a> providing connections to an EPSG database. |
| |
| |
| <div class="section">Connection to the database</div> |
| By default Apache SIS uses Apache Derby, |
| but the database can also be PostgreSQL or MS-Access. |
| The database connection is obtained by the first of the following data sources which is found: |
| |
| <ol> |
| <li>If a <a href="https://docs.oracle.com/javase/8/docs/api/javax/naming/InitialContext.html?is-external=true" title="class or interface in javax.naming" class="externalLink">JNDI context</a> exists, |
| the <a href="https://docs.oracle.com/javase/8/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql" class="externalLink"><code>DataSource</code></a> registered under the <code>"java:comp/env/jdbc/SpatialMetadata"</code> name.</li> |
| <li>If the <code>SIS_DATA</code> <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/System.html?is-external=true#getenv(java.lang.String)" title="class or interface in java.lang" class="externalLink">environment variable</a> is defined, |
| a JDBC connection for the <code>"jdbc:derby:$SIS_DATA/Databases/SpatialMetadata"</code> URL.</li> |
| <li>If the <code>"derby.system.home"</code> <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/System.html?is-external=true#getProperty(java.lang.String)" title="class or interface in java.lang" class="externalLink">property</a> is defined, |
| a JDBC connection for the <code>"jdbc:derby:SpatialMetadata"</code> URL.</li> |
| <li>If the <code>org.apache.sis.non-free:sis-embedded-data</code> module is present on the classpath, |
| a read-only connection to the database in the JAR file.</li> |
| </ol> |
| |
| In choice 1, the JDBC driver must be provided by the application container (e.g. Apache Tomcat). |
| With other choices, an Apache Derby driver should be available on the classpath. |
| |
| |
| <div class="section">The EPSG dataset</div> |
| A widely-used factory is the <a href="http://www.epsg.org">EPSG geodetic dataset</a>. |
| EPSG codes are numerical identifiers. |
| For example <code>"EPSG:4326"</code> is the EPSG identifier for the <cite>"WGS 84"</cite> geographic CRS. |
| As an extension, the Apache SIS implementation accepts names as well as numeric identifiers. |
| For example the two following method calls fetch the same object: |
| |
| <ul> |
| <li><code>createProjectedCRS("27572")</code></li> |
| <li><code>createProjectedCRS("NTF (Paris) / Lambert zone II")</code></li> |
| </ul> |
| |
| <div class="note"><b>Note:</b> names may be ambiguous since the same name may be used for more than one object. |
| This is the case of <cite>"WGS 84"</cite> for example. If such an ambiguity is found, an exception will be thrown. |
| For more determinism, the numerical codes are preferred.</div> |
| |
| |
| <div class="section">How deprecated entries are handled</div> |
| When an error is discovered in a Coordinate Reference System (CRS) definition, the EPSG group does not apply the |
| correction directly on the erroneous object (unless the correction is very minor). |
| Instead, the erroneous object is deprecated and a new one is created. |
| Apache SIS handles deprecated objects as below: |
| |
| <ul> |
| <li>Deprecated objects are not listed in the collection returned by the |
| <a href="EPSGDataAccess.html#getAuthorityCodes(java.lang.Class)"><code>EPSGDataAccess.getAuthorityCodes(…)</code></a> method.</li> |
| <li>All method expecting an EPSG code in argument accept also the codes of deprecated objects.</li> |
| <li>If a deprecated object is created by a call to <code>EPSGDataAccess.createFoo(…)</code>, |
| a warning will be logged with a message proposing a replacement.</li> |
| </ul></div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.7</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../metadata/sql/package-summary.html"><code>org.apache.sis.metadata.sql</code></a></dd> |
| |
| <p><font size="-1">Defined in the <code>sis-referencing</code> module</font></p> |
| </dl> |
| </section> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <table class="typeSummary"> |
| <caption><span>Class Summary</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Class</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tbody> |
| <tr class="altColor"> |
| <th class="colFirst" scope="row"><a href="EPSGDataAccess.html" title="class in org.apache.sis.referencing.factory.sql">EPSGDataAccess</a></th> |
| <td class="colLast"> |
| <div class="block"><cite>Data Access Object</cite> (DAO) creating geodetic objects from a JDBC connection to an EPSG database.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <th class="colFirst" scope="row"><a href="EPSGFactory.html" title="class in org.apache.sis.referencing.factory.sql">EPSGFactory</a></th> |
| <td class="colLast"> |
| <div class="block">A geodetic object factory backed by the EPSG database.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <th class="colFirst" scope="row"><a href="InstallationScriptProvider.html" title="class in org.apache.sis.referencing.factory.sql">InstallationScriptProvider</a></th> |
| <td class="colLast"> |
| <div class="block">Provides SQL scripts needed for creating a local copy of a dataset.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <th class="colFirst" scope="row"><a href="SQLTranslator.html" title="class in org.apache.sis.referencing.factory.sql">SQLTranslator</a></th> |
| <td class="colLast"> |
| <div class="block">Converts the SQL statements from MS-Access dialect to standard SQL.</div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </li> |
| </ul> |
| </div> |
| </main> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../index.html">Overview</a></li> |
| <li class="navBarCell1Rev">Package</li> |
| <li>Class</li> |
| <li><a href="package-use.html">Use</a></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">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2010–2019 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |