blob: a9a818f4f349682d492f9244ab7a56dbbccc2f29 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (19) -->
<title>org.apache.sis.io.wkt (Apache SIS 1.3 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="description" content="declaration: package: org.apache.sis.io.wkt">
<meta name="generator" content="javadoc/PackageWriterImpl">
<meta name="keywords" content="org.apache.sis.io.wkt 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">
<link rel="stylesheet" type="text/css" href="../../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../script-dir/jquery-3.6.0.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">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</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 class="nav-bar-cell1-rev">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#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:&nbsp;</li>
<li><a href="#package-description">Description</a>&nbsp;|&nbsp;</li>
<li><a href="#related-package-summary">Related Packages</a>&nbsp;|&nbsp;</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">
<h1 title="Package org.apache.sis.io.wkt" class="title">Package org.apache.sis.io.wkt</h1>
</div>
<hr>
<div class="package-signature">package <span class="element-name">org.apache.sis.io.wkt</span></div>
<section class="package-description" id="package-description">
<div class="block"><cite>Well Known Text</cite> (WKT) parsing and formatting.
This package implements the services provided by various convenience methods:
<ul>
<li><a href="../../referencing/CRS.html#fromWKT(java.lang.String)"><code>CRS​.from­WKT(String)</code></a> (SIS parsing static method)</li>
<li><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/CRSFactory.html#createFromWKT(java.lang.String)" title="class or interface in org.opengis.referencing.crs" class="external-link"><code>CRSFactory​.create­From­WKT(String)</code></a> (GeoAPI parsing method)</li>
<li><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/operation/MathTransformFactory.html#createFromWKT(java.lang.String)" title="class or interface in org.opengis.referencing.operation" class="external-link"><code>Math­Transform­Factory​.create­From­WKT(String)</code></a> (GeoAPI parsing method)</li>
<li><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/IdentifiedObject.html#toWKT()" title="class or interface in org.opengis.referencing" class="external-link"><code>Identified­Object​.to­WKT()</code></a> (GeoAPI formatting method)</li>
</ul>
However, the <a href="WKTFormat.html" title="class in org.apache.sis.io.wkt"><code>WKTFormat</code></a> class provided in this package gives more control.
For example, this package allows to:
<ul>
<li>Format projection and parameters using the names of a chosen authority.
For example, the <cite>"Mercator (variant A)"</cite> projection is named
<code>"Mercator_1SP"</code> by OGC 01-009 and <code>"CT_Mercator"</code> by GeoTIFF.</li>
<li>Format the elements with different quote characters or brackets style.
For example, both <code>ID["EPSG",4326]</code> and <code>ID("EPSG",4326)</code> are legal WKT.</li>
<li>Format with a different indentation or format the whole WKT on a single line.</li>
<li>Apply syntactic coloring on terminal supporting <cite>ANSI escape codes</cite>
(a.k.a. ECMA-48, ISO/IEC 6429 and X3.64).</li>
<li>Alter the parsing in a way compatible with non-standard (but commonly used) WKT.
For example, some others software products ignore the <code>AXIS[…]</code> elements at parsing time.</li>
<li>Report warnings that occurred during parsing or formatting.</li>
</ul>
<h2>Referencing WKT</h2>
Referencing WKT is defined using Extended Backus Naur Form (EBNF) in two versions:
<ul>
<li>ISO 19162 defines the current format, also known as “WKT 2”. The specification is also made
<a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html">available online</a> by OGC.</li>
<li>The previous format — “WKT 1” — was defined in the <a href="https://www.ogc.org/standards/ct">OGC
document 01-009</a>. This definition is
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/doc-files/WKT.html">shown on GeoAPI</a>.</li>
</ul>
The WKT 1 format has been interpreted differently by various implementers.
One noticeable difference is the unit of measurement of prime meridians and projection parameters.
The WKT 2 format aims to solve the inter-operability problem caused by such mismatches,
but not all software products support this new format. Consequently, importing or exporting data from/to a software
with the WKT syntax require knowledge of the WKT variant used by that software. This variant can be specified by
the <a href="Convention.html" title="enum class in org.apache.sis.io.wkt"><code>Convention</code></a> enumeration.
<h2>Geometry WKT</h2>
The <a href="../../geometry/GeneralEnvelope.html" title="class in org.apache.sis.geometry"><code>General­Envelope</code></a> and <a href="../../geometry/GeneralDirectPosition.html" title="class in org.apache.sis.geometry"><code>General­Direct­Position</code></a> classes
provide their own, limited, WKT parsing and formatting services for the <code>BOX</code> and <code>POINT</code> elements.
A description for this WKT format can be found on
<a href="https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry">Wikipedia</a>.
<h2>Where to find WKT examples</h2>
An excellent source of well-formed WKT is the online <cite>EPSG Geodetic Parameter Registry</cite>.
The WKT of many Coordinate Reference System object can be viewed using the pattern below
(replace <code>3395</code> by the EPSG code of the desired CRS):
<blockquote><b>Example</b>: <cite>"WGS 84 / World Mercator"</cite>:
<a href="https://epsg.org/crs/wkt/id/3395">https://epsg.org/crs/wkt/id/3395</a>
</blockquote>
Readers should be aware that some popular other sources of WKT are actually invalid,
since many of them do not comply with EPSG definitions (especially on axis order).
The above-cited EPSG repository is <strong>the</strong> authoritative source
of CRS definitions in the EPSG namespace.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>0.4</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html">WKT 2 specification</a></li>
<li><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/doc-files/WKT.html">Legacy WKT 1</a></li>
</ul>
</dd>
<p><font size="-1">Defined in the <code>sis-referencing</code> module</font></p>
</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 two-column-summary">
<div class="table-header col-first">Package</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><a href="../package-summary.html">org.apache.sis.io</a></div>
<div class="col-last even-row-color">
<div class="block">Extensions to standard Java I/O (<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/Reader.html" title="class or interface in java.io" class="external-link"><code>Reader</code></a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/io/Writer.html" title="class or interface in java.io" class="external-link"><code>Writer</code></a>,
<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Appendable.html" title="class or interface in java.lang" class="external-link"><code>Appendable</code></a>) and <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/text/Format.html" title="class or interface in java.text" class="external-link"><code>Format</code></a>.</div>
</div>
</div>
</div>
</li>
<li>
<div id="class-summary">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="class-summary-tab0" role="tab" aria-selected="true" aria-controls="class-summary.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('class-summary', 'class-summary', 2)" class="active-table-tab">All Classes and Interfaces</button><button id="class-summary-tab1" role="tab" aria-selected="false" aria-controls="class-summary.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('class-summary', 'class-summary-tab1', 2)" class="table-tab">Interfaces</button><button id="class-summary-tab2" role="tab" aria-selected="false" aria-controls="class-summary.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('class-summary', 'class-summary-tab2', 2)" class="table-tab">Classes</button><button id="class-summary-tab3" role="tab" aria-selected="false" aria-controls="class-summary.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('class-summary', 'class-summary-tab3', 2)" class="table-tab">Enum Classes</button><button id="class-summary-tab5" role="tab" aria-selected="false" aria-controls="class-summary.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('class-summary', 'class-summary-tab5', 2)" class="table-tab">Exception Classes</button></div>
<div id="class-summary.tabpanel" role="tabpanel">
<div class="summary-table two-column-summary" aria-labelledby="class-summary-tab0">
<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="Colors.html" title="class in org.apache.sis.io.wkt">Colors</a></div>
<div class="col-last even-row-color class-summary class-summary-tab2">
<div class="block">The colors to use for formatting <cite>Well Known Text</cite> (WKT) objects.</div>
</div>
<div class="col-first odd-row-color class-summary class-summary-tab3"><a href="Convention.html" title="enum class in org.apache.sis.io.wkt">Convention</a></div>
<div class="col-last odd-row-color class-summary class-summary-tab3">
<div class="block">The convention to use for WKT formatting.</div>
</div>
<div class="col-first even-row-color class-summary class-summary-tab3"><a href="ElementKind.html" title="enum class in org.apache.sis.io.wkt">ElementKind</a></div>
<div class="col-last even-row-color class-summary class-summary-tab3">
<div class="block">Kind of an element in a <cite>Well Known Text</cite>.</div>
</div>
<div class="col-first odd-row-color class-summary class-summary-tab2"><a href="FormattableObject.html" title="class in org.apache.sis.io.wkt">FormattableObject</a></div>
<div class="col-last odd-row-color class-summary class-summary-tab2">
<div class="block">Base class for objects that can be formatted as <cite>Well Known Text</cite> (WKT).</div>
</div>
<div class="col-first even-row-color class-summary class-summary-tab2"><a href="Formatter.html" title="class in org.apache.sis.io.wkt">Formatter</a></div>
<div class="col-last even-row-color class-summary class-summary-tab2">
<div class="block">Provides support methods for formatting a <cite>Well Known Text</cite> (WKT).</div>
</div>
<div class="col-first odd-row-color class-summary class-summary-tab3"><a href="KeywordCase.html" title="enum class in org.apache.sis.io.wkt">KeywordCase</a></div>
<div class="col-last odd-row-color class-summary class-summary-tab3">
<div class="block">Whether WKT keywords shall be written with lower, upper or camel case styles.</div>
</div>
<div class="col-first even-row-color class-summary class-summary-tab3"><a href="KeywordStyle.html" title="enum class in org.apache.sis.io.wkt">KeywordStyle</a></div>
<div class="col-last even-row-color class-summary class-summary-tab3">
<div class="block">Whether to use short or long WKT keywords.</div>
</div>
<div class="col-first odd-row-color class-summary class-summary-tab1"><a href="Parser.html" title="interface in org.apache.sis.io.wkt">Parser</a></div>
<div class="col-last odd-row-color class-summary class-summary-tab1">
<div class="block">A parser or a factory capable to create an object from a string in the WKT format.</div>
</div>
<div class="col-first even-row-color class-summary class-summary-tab2"><a href="Symbols.html" title="class in org.apache.sis.io.wkt">Symbols</a></div>
<div class="col-last even-row-color class-summary class-summary-tab2">
<div class="block">The set of symbols to use for <cite>Well Known Text</cite> (WKT) parsing and formatting.</div>
</div>
<div class="col-first odd-row-color class-summary class-summary-tab2"><a href="Transliterator.html" title="class in org.apache.sis.io.wkt">Transliterator</a></div>
<div class="col-last odd-row-color class-summary class-summary-tab2">
<div class="block">Controls the replacement of characters, abbreviations and names between the objects in memory and their
WKT representations.</div>
</div>
<div class="col-first even-row-color class-summary class-summary-tab5"><a href="UnformattableObjectException.html" title="class in org.apache.sis.io.wkt">UnformattableObjectException</a></div>
<div class="col-last even-row-color class-summary class-summary-tab5">
<div class="block">Thrown by <a href="FormattableObject.html#toWKT()"><code>Formattable­Object​.to­WKT()</code></a> when an object cannot be formatted as WKT.</div>
</div>
<div class="col-first odd-row-color class-summary class-summary-tab5"><a href="UnparsableObjectException.html" title="class in org.apache.sis.io.wkt">UnparsableObjectException</a></div>
<div class="col-last odd-row-color class-summary class-summary-tab5">
<div class="block">Thrown when a <cite>Well Known Text</cite> (WKT) cannot be parsed.</div>
</div>
<div class="col-first even-row-color class-summary class-summary-tab2"><a href="Warnings.html" title="class in org.apache.sis.io.wkt">Warnings</a></div>
<div class="col-last even-row-color class-summary class-summary-tab2">
<div class="block">Warnings that occurred during a <cite>Well Known Text</cite> (WKT) parsing or formatting.</div>
</div>
<div class="col-first odd-row-color class-summary class-summary-tab2"><a href="WKTDictionary.html" title="class in org.apache.sis.io.wkt">WKTDictionary</a></div>
<div class="col-last odd-row-color class-summary class-summary-tab2">
<div class="block">A factory providing CRS objects parsed from WKT definitions associated to authority codes.</div>
</div>
<div class="col-first even-row-color class-summary class-summary-tab2"><a href="WKTFormat.html" title="class in org.apache.sis.io.wkt">WKTFormat</a></div>
<div class="col-last even-row-color class-summary class-summary-tab2">
<div class="block">Parser and formatter for <cite>Well Known Text</cite> (WKT) strings.</div>
</div>
</div>
</div>
</div>
</li>
</ul>
</section>
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 2010&#x2013;2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>