This is an automated email from the ASF dual-hosted git repository.
desruisseaux pushed a commit to branch asf-staging
in repository https://gitbox.apache.org/repos/asf/sis-site.git
The following commit(s) were added to refs/heads/asf-staging by this push:
new e47b80ed Move "How to" items from the FAQ to new pages in the "How to"
directory.
e47b80ed is described below
commit e47b80ed297be0e12ef8208a50d7841009d36f8d
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Sat Jan 21 13:22:25 2023 +0100
Move "How to" items from the FAQ to new pages in the "How to" directory.
---
en/sitemap.xml | 22 ++-
faq.html | 141 +++----------
howto.html | 19 +-
howto/crs_equality.html | 194 ++++++++++++++++++
howto/index.xml | 39 ++++
howto/instantiate_UTM_projection.html | 215 ++++++++++++++++++++
howto/instantiate_utm_projection.html | 215 ++++++++++++++++++++
howto/lookup_crs_urn.html | 220 +++++++++++++++++++++
howto/raster_values_at_geographic_coordinates.html | 6 +-
howto/rasters_bigger_than_memory.html | 6 +-
howto/resample_and_save_raster.html | 15 +-
howto/transform_coordinates.html | 210 ++++++++++++++++++++
index.xml | 41 +++-
sitemap.xml | 2 +-
14 files changed, 1215 insertions(+), 130 deletions(-)
diff --git a/en/sitemap.xml b/en/sitemap.xml
index 38f46fd4..54241706 100644
--- a/en/sitemap.xml
+++ b/en/sitemap.xml
@@ -19,9 +19,12 @@
</url><url>
<loc>https://sis.apache.org/formats.html</loc>
<lastmod>2022-12-26T23:26:50+01:00</lastmod>
+ </url><url>
+ <loc>https://sis.apache.org/howto/crs_equality.html</loc>
+ <lastmod>2023-01-21T00:15:54+01:00</lastmod>
</url><url>
<loc>https://sis.apache.org/faq.html</loc>
- <lastmod>2022-12-08T22:07:22+01:00</lastmod>
+ <lastmod>2023-01-21T00:15:54+01:00</lastmod>
<xhtml:link
rel="alternate"
hreflang="fr"
@@ -34,16 +37,22 @@
/>
</url><url>
<loc>https://sis.apache.org/howto/raster_values_at_geographic_coordinates.html</loc>
- <lastmod>2023-01-18T11:09:36+01:00</lastmod>
+ <lastmod>2023-01-21T00:15:54+01:00</lastmod>
+ </url><url>
+ <loc>https://sis.apache.org/howto/lookup_crs_urn.html</loc>
+ <lastmod>2023-01-21T00:15:54+01:00</lastmod>
</url><url>
<loc>https://sis.apache.org/howto/rasters_bigger_than_memory.html</loc>
- <lastmod>2023-01-18T11:09:36+01:00</lastmod>
+ <lastmod>2023-01-21T00:15:54+01:00</lastmod>
</url><url>
<loc>https://sis.apache.org/howto.html</loc>
- <lastmod>2023-01-18T11:09:36+01:00</lastmod>
+ <lastmod>2023-01-21T00:15:54+01:00</lastmod>
</url><url>
<loc>https://sis.apache.org/epsg.html</loc>
<lastmod>2022-12-08T22:07:22+01:00</lastmod>
+ </url><url>
+ <loc>https://sis.apache.org/howto/instantiate_utm_projection.html</loc>
+ <lastmod>2023-01-21T00:15:54+01:00</lastmod>
</url><url>
<loc>https://sis.apache.org/javafx.html</loc>
<lastmod>2022-12-08T22:07:22+01:00</lastmod>
@@ -73,7 +82,7 @@
<lastmod>2022-12-08T22:07:22+01:00</lastmod>
</url><url>
<loc>https://sis.apache.org/howto/resample_and_save_raster.html</loc>
- <lastmod>2023-01-18T11:09:36+01:00</lastmod>
+ <lastmod>2023-01-21T00:15:54+01:00</lastmod>
</url><url>
<loc>https://sis.apache.org/release-notes/0.1.html</loc>
<lastmod>2022-12-12T22:21:04+01:00</lastmod>
@@ -129,5 +138,8 @@
hreflang="en"
href="https://sis.apache.org/"
/>
+ </url><url>
+ <loc>https://sis.apache.org/howto/transform_coordinates.html</loc>
+ <lastmod>2023-01-21T00:15:54+01:00</lastmod>
</url>
</urlset>
diff --git a/faq.html b/faq.html
index fc21c478..8a91498d 100644
--- a/faq.html
+++ b/faq.html
@@ -112,20 +112,16 @@
<ul>
<li><a href="#referencing-intro">Getting started </a>
<ul>
+ <li><a href="#getCRS">How do I get a Coordinate Reference System?
</a></li>
<li><a href="#transform-point">How do I transform a coordinate?
</a></li>
<li><a href="#operation-methods">Which map projections are
supported? </a></li>
- <li><a href="#axisOrder">What is the axis order issue and how is
it addressed? </a></li>
</ul>
</li>
<li><a href="#crs">Coordinate Reference Systems </a>
<ul>
- <li><a href="#UTM">How do I instantiate a Universal Transverse
Mercator (UTM) projection? </a></li>
- <li><a href="#google">How do I instantiate a Google projection?
</a></li>
- <li><a href="#projectionKind">How can I identify the projection
kind of a CRS? </a></li>
- <li><a href="#lookupEPSG">How do I get the EPSG code of an
existing CRS? </a></li>
- <li><a href="#lookupURN">How do I get the
“urn:ogc:def:crs:…” URN of an existing CRS? </a></li>
+ <li><a href="#google">What is the Google projection? </a></li>
+ <li><a href="#axisOrder">What is the axis order issue and how is
it addressed? </a></li>
<li><a href="#lookupReliability">Is
IdentifiedObjects.lookupEPSG(…) a reliable inverse of CRS.forCode(…)? </a></li>
- <li><a href="#equalsIgnoreMetadata">How can I determine if two CRS
are “functionally” equal? </a></li>
<li><a href="#crsHashCode">Are CRS objects safe for use as keys in
HashMap? </a></li>
</ul>
</li>
@@ -155,37 +151,19 @@
</nav>
<h1 id="referencing">Referencing </h1>
<h2 id="referencing-intro">Getting started </h2>
+<h3 id="getCRS">How do I get a Coordinate Reference System? </h3>
+<p>The <code>CRS</code> class in the
<code>org.apache.sis.referencing.crs</code> package provides static convenience
methods.
+The most notable methods are:</p>
+<ul>
+<li><code>CRS.forCode(String)</code> for fetching a <abbr title="Coordinate
Reference System">CRS</abbr> from an authority code in a database.
+Some supported authorities are <a href="epsg.html">EPSG</a>, AUTO, AUTO2 and
CRS.</li>
+<li><code>CRS.fromWKT(String)</code> for parsing a <abbr title="Coordinate
Reference System">CRS</abbr> definition from a character string in Well-Known
Text (WKT) format.</li>
+<li><code>CRS.fromXML(String)</code> for parsing a <abbr title="Coordinate
Reference System">CRS</abbr> definition from a character string in Geographic
Markup Language (GML) format.</li>
+</ul>
<h3 id="transform-point">How do I transform a coordinate? </h3>
-<p>The following Java code projects a geographic coordinate from the <em>World
Geodetic System 1984</em> (WGS84) to <em>WGS 84 / UTM zone 33N</em>.
-In order to make the example a little bit simpler, this code uses predefined
constants given by the <code>CommonCRS</code> convenience class.
-But more advanced applications will typically use EPSG codes instead.
-Note that all geographic coordinates below express latitude <em>before</em>
longitude.</p>
-<div class="highlight"><pre tabindex="0" class="chroma"><code
class="language-java" data-lang="java"><span class="line"><span
class="cl"><span class="kn">import</span> <span
class="nn">org.opengis.geometry.DirectPosition</span><span class="o">;</span>
-</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.opengis.referencing.crs.CoordinateReferenceSystem</span><span
class="o">;</span>
-</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.opengis.referencing.operation.CoordinateOperation</span><span
class="o">;</span>
-</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.opengis.referencing.operation.TransformException</span><span
class="o">;</span>
-</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.opengis.util.FactoryException</span><span class="o">;</span>
-</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.apache.sis.referencing.CRS</span><span class="o">;</span>
-</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.apache.sis.referencing.CommonCRS</span><span class="o">;</span>
-</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.apache.sis.geometry.DirectPosition2D</span><span
class="o">;</span>
-</span></span><span class="line"><span class="cl">
-</span></span><span class="line"><span class="cl"><span
class="kd">public</span> <span class="kd">class</span> <span
class="nc">MyApp</span> <span class="o">{</span>
-</span></span><span class="line"><span class="cl"> <span
class="kd">public</span> <span class="kd">static</span> <span
class="kt">void</span> <span class="nf">main</span><span
class="o">(</span><span class="n">String</span><span class="o">[]</span> <span
class="n">args</span><span class="o">)</span> <span class="kd">throws</span>
<span class="n">FactoryException</span><span class="o">,</span> <span
class="n">TransformException</span> <span class="o">{</span>
-</span></span><span class="line"><span class="cl"> <span
class="n">CoordinateReferenceSystem</span> <span class="n">sourceCRS</span>
<span class="o">=</span> <span class="n">CommonCRS</span><span
class="o">.</span><span class="na">WGS84</span><span class="o">.</span><span
class="na">geographic</span><span class="o">();</span>
-</span></span><span class="line"><span class="cl"> <span
class="n">CoordinateReferenceSystem</span> <span class="n">targetCRS</span>
<span class="o">=</span> <span class="n">CommonCRS</span><span
class="o">.</span><span class="na">WGS84</span><span class="o">.</span><span
class="na">universal</span><span class="o">(</span><span
class="n">40</span><span class="o">,</span> <span class="n">14</span><span
class="o">);</span> <span class="c1">// Get whatever zone is valid for 14°E.
-</span></span></span><span class="line"><span class="cl"><span
class="c1"></span> <span class="n">CoordinateOperation</span> <span
class="n">operation</span> <span class="o">=</span> <span
class="n">CRS</span><span class="o">.</span><span
class="na">findOperation</span><span class="o">(</span><span
class="n">sourceCRS</span><span class="o">,</span> <span
class="n">targetCRS</span><span class="o">,</span> <span
class="kc">null</span><span class="o">);</span>
-</span></span><span class="line"><span class="cl"> <span class="cm">/*
-</span></span></span><span class="line"><span class="cl"><span class="cm">
* The above lines are costly and should be performed only once before to
project many points.
-</span></span></span><span class="line"><span class="cl"><span class="cm">
* In this example, the operation that we got is valid for coordinates in
geographic area from
-</span></span></span><span class="line"><span class="cl"><span class="cm">
* 12°E to 18°E (UTM zone 33) and 0°N to 84°N.
-</span></span></span><span class="line"><span class="cl"><span class="cm">
*/</span>
-</span></span><span class="line"><span class="cl"> <span
class="n">DirectPosition</span> <span class="n">ptSrc</span> <span
class="o">=</span> <span class="k">new</span> <span
class="n">DirectPosition2D</span><span class="o">(</span><span
class="n">40</span><span class="o">,</span> <span class="n">14</span><span
class="o">);</span> <span class="c1">// 40°N 14°E
-</span></span></span><span class="line"><span class="cl"><span
class="c1"></span> <span class="n">DirectPosition</span> <span
class="n">ptDst</span> <span class="o">=</span> <span
class="n">operation</span><span class="o">.</span><span
class="na">getMathTransform</span><span class="o">().</span><span
class="na">transform</span><span class="o">(</span><span
class="n">ptSrc</span><span class="o">,</span> <span
class="kc">null</span><span class="o">);</span>
-</span></span><span class="line"><span class="cl">
-</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">println</span><span class="o">(</span><span
class="s">"Source: "</span> <span class="o">+</span> <span
class="n">ptSrc</span><span class="o">);</span>
-</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">println</span><span class="o">(</span><span
class="s">"Target: "</span> <span class="o">+</span> <span
class="n">ptDst</span><span class="o">);</span>
-</span></span><span class="line"><span class="cl"> <span class="o">}</span>
-</span></span><span class="line"><span class="cl"><span
class="o">}</span></span></span></code></pre></div>
+<p>See the <a href="howto.html#referencing">“How to…”</a> page for
Java code examples.
+Those examples get Coordinate Reference Systems (CRS) instances in various ways
+and apply coordinate operations between two reference systems.</p>
<h3 id="operation-methods">Which map projections are supported? </h3>
<p>The operation <em>methods</em> (including, but not limited to, map
projections) supported by
Apache <abbr title="Spatial Information System">SIS</abbr> are listed in the
<a href="tables/CoordinateOperationMethods.html">Coordinate Operation
Methods</a> page.
@@ -198,6 +176,22 @@ For convenience, thousands of projected <abbr
title="Coordinate Reference System
A well-known source of such definitions is the EPSG geodetic dataset, but
other authorities also exist.
The predefined <abbr title="Coordinate Reference System">CRS</abbr> known to
Apache <abbr title="Spatial Information System">SIS</abbr> are listed in the
<a href="tables/CoordinateReferenceSystems.html">Coordinate Reference
Systems</a> page.</p>
+<h2 id="crs">Coordinate Reference Systems </h2>
+<h3 id="google">What is the Google projection? </h3>
+<p>The Google projection is a Mercator projection that pretends to be defined
on the WGS84 datum,
+but actually ignores the ellipsoidal nature of that datum and uses the simpler
spherical formulas instead.
+Since version 6.15 of EPSG geodetic dataset, the preferred way to get that
projection is to invoke <code>CRS.forCode("EPSG:3857")</code>.
+Note that the use of that projection is <strong>not</strong> recommended,
unless needed for compatibility with other data.</p>
+<p>The EPSG:3857 definition uses a map projection method named
<em>“Popular Visualisation Pseudo Mercator”</em>.
+The EPSG geodetic dataset provides also some other map projections that use
spherical formulas.
+Those methods have “(Spherical)” in their name, for example
<em>“Mercator (Spherical)”</em>,
+and differs from <em>“Popular Visualisation Pseudo Mercator”</em>
by the use of a more appropriate sphere radius.
+Those projection methods can be used in Well Known Text (WKT) definitions.</p>
+<p>If there is a need to use spherical formulas with a projection that does
not have a spherical counterpart,
+this can be done with explicit declarations of
<code>"semi_major"</code> and <code>"semi_minor"</code>
parameter values in the <abbr title="Well Known Text">WKT</abbr> definition.
+Those parameter values are usually inferred from the datum, but Apache <abbr
title="Spatial Information System">SIS</abbr> allows explicit declarations to
override the inferred values.
+This hack is provided for making possible to use data that ignore the
ellipsoid flattening factor
+(which are unfortunately not uncommon), but it should be used in last resort
only.</p>
<h3 id="axisOrder">What is the axis order issue and how is it addressed?
</h3>
<p>The axis order is specified by the authority (typically a national agency)
defining the Coordinate Reference System (CRS).
The order depends on the <abbr title="Coordinate Reference System">CRS</abbr>
type and the country defining the <abbr title="Coordinate Reference
System">CRS</abbr>.
@@ -226,75 +220,6 @@ but allows changing axis order to the (<em>x</em>,
<em>y</em>) order after <abbr
This change can be done with the following code:</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code
class="language-java" data-lang="java"><span class="line"><span
class="cl"><span class="n">CoordinateReferenceSystem</span> <span
class="n">crs</span> <span class="o">=</span> <span class="o">...;</span> <span
class="c1">// CRS obtained by any means.
</span></span></span><span class="line"><span class="cl"><span
class="c1"></span><span class="n">crs</span> <span class="o">=</span> <span
class="n">AbstractCRS</span><span class="o">.</span><span
class="na">castOrCopy</span><span class="o">(</span><span
class="n">crs</span><span class="o">).</span><span
class="na">forConvention</span><span class="o">(</span><span
class="n">AxesConvention</span><span class="o">.</span><span
class="na">RIGHT_HANDED</span><span class="o">)</span></span></s [...]
-<h2 id="crs">Coordinate Reference Systems </h2>
-<h3 id="UTM">How do I instantiate a Universal Transverse Mercator (UTM)
projection? </h3>
-<p>If the UTM zone is unknown, an easy way is to invoke the
<code>universal(…)</code> method on one of the <code>CommonCRS</code>
predefined constants.
-That method receives in argument a geographic coordinate in
(<em>latitude</em>, <em>longitude</em>) order and computes the UTM zone from it.
-See the <a href="#transform-point">above Java code example</a>.</p>
-<p>If the UTM zone is know, one way is to use the “EPSG” or
“AUTO” authority factory.
-The EPSG code of some UTM projections can be determined as below, where
<em>zone</em> is a number from 1 to 60 inclusive (unless otherwise
specified):</p>
-<ul>
-<li>WGS 84 (northern hemisphere): 32600 + <em>zone</em></li>
-<li>WGS 84 (southern hemisphere): 32700 + <em>zone</em></li>
-<li>WGS 72 (northern hemisphere): 32200 + <em>zone</em></li>
-<li>WGS 72 (southern hemisphere): 32300 + <em>zone</em></li>
-<li>NAD 83 (northern hemisphere): 26900 + <em>zone</em> (zone 1 to 23
only)</li>
-<li>NAD 27 (northern hemisphere): 26700 + <em>zone</em> (zone 1 to 22
only)</li>
-</ul>
-<p>Note that the above list is incomplete. See the EPSG database for
additional UTM definitions
-(WGS 72BE, SIRGAS 2000, SIRGAS 1995, SAD 69, ETRS 89, <em>etc.</em>, most of
them defined only for a few zones).
-Once the EPSG code of the UTM projection has been determined, the <abbr
title="Coordinate Reference System">CRS</abbr> can be obtained as in the
example below:</p>
-<div class="highlight"><pre tabindex="0" class="chroma"><code
class="language-java" data-lang="java"><span class="line"><span
class="cl"><span class="kt">int</span> <span class="n">code</span> <span
class="o">=</span> <span class="n">32600</span> <span class="o">+</span> <span
class="n">zone</span><span class="o">;</span> <span class="c1">// For WGS84
northern hemisphere
-</span></span></span><span class="line"><span class="cl"><span
class="c1"></span><span class="n">CoordinateReferenceSystem</span> <span
class="n">crs</span> <span class="o">=</span> <span class="n">CRS</span><span
class="o">.</span><span class="na">forCode</span><span class="o">(</span><span
class="s">"EPSG:"</span> <span class="o">+</span> <span
class="n">code</span><span class="o">);</span></span></span></code></pre></div>
-<h3 id="google">How do I instantiate a Google projection? </h3>
-<p>The Google projection is a Mercator projection that pretends to be defined
on the WGS84 datum,
-but actually ignores the ellipsoidal nature of that datum and uses the simpler
spherical formulas instead.
-Since version 6.15 of EPSG geodetic dataset, the preferred way to get that
projection is to invoke <code>CRS.forCode("EPSG:3857")</code>.
-Note that the use of that projection is <strong>not</strong> recommended,
unless needed for compatibility with other data.</p>
-<p>The EPSG:3857 definition uses a map projection method named
<em>“Popular Visualisation Pseudo Mercator”</em>.
-The EPSG geodetic dataset provides also some other map projections that use
spherical formulas.
-Those methods have “(Spherical)” in their name, for example
<em>“Mercator (Spherical)”</em>
-(which differs from <em>“Popular Visualisation Pseudo
Mercator”</em> by the use of a more appropriate sphere radius).
-Those projection methods can be used in Well Known Text (WKT) definitions.</p>
-<p>If there is a need to use spherical formulas with a projection that does
not have a “(Spherical)” counterpart,
-this can be done with explicit declarations of
<code>"semi_major"</code> and <code>"semi_minor"</code>
parameter values in the <abbr title="Well Known Text">WKT</abbr> definition.
-Those parameter values are usually inferred from the datum, but Apache <abbr
title="Spatial Information System">SIS</abbr> allows explicit declarations to
override the inferred values.</p>
-<h3 id="projectionKind">How can I identify the projection kind of a CRS?
</h3>
-<p>The “kind of projection” (Mercator, Lambert Conformal,
<em>etc.</em>) is called <em>Operation Method</em> in <abbr
title="International Organization for Standardization">ISO</abbr> 19111
terminology.
-One approach is to check the value of <code>OperationMethod.getName()</code>
and compare them against the <abbr title="Open Geospatial
Consortium">OGC</abbr> or EPSG names
-listed in the <a href="tables/CoordinateOperationMethods.html">Coordinate
Operation Methods</a> page.</p>
-<h3 id="lookupEPSG">How do I get the EPSG code of an existing CRS? </h3>
-<p>The <em>identifier</em> of a Coordinate Reference System (CRS) object can
be obtained by the <code>getIdentifiers()</code> method,
-which usually return a collection of zero or one element.
-If the <abbr title="Coordinate Reference System">CRS</abbr> has been created
from a Well Known Text (WKT) parsing
-and the <abbr title="Well Known Text">WKT</abbr> ends with an
<code>AUTHORITY["EPSG", "xxxx"]</code> (<abbr title="Well
Known Text">WKT</abbr> version 1)
-or <code>ID["EPSG", xxxx]</code> (<abbr title="Well Known
Text">WKT</abbr> version 2) element,
-then the identifier (an EPSG numerical code in this example) is the
<em>xxxx</em> value in that element.
-If the <abbr title="Coordinate Reference System">CRS</abbr> has been created
from the EPSG geodetic dataset (for example by a call to
<code>CRS.forCode("EPSG:xxxx")</code>),
-then the identifier is the <em>xxxx</em> code given to that method.
-If the <abbr title="Coordinate Reference System">CRS</abbr> has been created
in another way, then the collection returned by the
<code>getIdentifiers()</code> method
-may or may not be empty depending if the program that created the <abbr
title="Coordinate Reference System">CRS</abbr> took the responsibility of
providing identifiers.</p>
-<p>If the collection of identifiers is empty, the most effective fix is to
make sure that the <abbr title="Well Known Text">WKT</abbr>
-contains an <code>AUTHORITY</code> or <code>ID</code> element (assuming that
the <abbr title="Coordinate Reference System">CRS</abbr> was parsed from a
<abbr title="Well Known Text">WKT</abbr>).
-If this is not possible, then the
<code>org.apache.sis.referencing.IdentifiedObjects</code> class contains some
convenience methods which may help.
-In the following example, the call to <code>lookupEPSG(…)</code> will scan the
EPSG database for a <abbr title="Coordinate Reference System">CRS</abbr> equals
-(ignoring metadata) to the given one. <em>Note that this scan is sensitive to
axis order.</em>
-Most geographic <abbr title="Coordinate Reference System">CRS</abbr> in the
EPSG database are declared with (<em>latitude</em>, <em>longitude</em>) axis
order.
-Consequently if the given <abbr title="Coordinate Reference System">CRS</abbr>
has (<em>longitude</em>, <em>latitude</em>) axis order, then the scan is likely
to find no match.</p>
-<div class="highlight"><pre tabindex="0" class="chroma"><code
class="language-java" data-lang="java"><span class="line"><span
class="cl"><span class="n">CoordinateReferenceSystem</span> <span
class="n">myCRS</span> <span class="o">=</span> <span class="o">...;</span>
-</span></span><span class="line"><span class="cl"><span
class="n">Integer</span> <span class="n">identifier</span> <span
class="o">=</span> <span class="n">IdentifiedObjects</span><span
class="o">.</span><span class="na">lookupEPSG</span><span
class="o">(</span><span class="n">myCRS</span><span class="o">);</span>
-</span></span><span class="line"><span class="cl"><span class="k">if</span>
<span class="o">(</span><span class="n">identifier</span> <span
class="o">!=</span> <span class="kc">null</span><span class="o">)</span> <span
class="o">{</span>
-</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">println</span><span class="o">(</span><span
class="s">"The EPSG code has been found: "</span> <span
class="o">+</span> <span class="n">identifier</span><span class="o">);</span>
-</span></span><span class="line"><span class="cl"><span
class="o">}</span></span></span></code></pre></div>
-<h3 id="lookupURN">How do I get the “urn:ogc:def:crs:…” URN of an
existing CRS? </h3>
-<p><abbr title="Open Geospatial Consortium">OGC</abbr> defines URN for <abbr
title="Coordinate Reference System">CRS</abbr> identifiers, for example
<code>"urn:ogc:def:crs:epsg:7.1:4326"</code>
-where <code>"7.1"</code> is the version of the EPSG database used.
-URN may or may not be present in the set of identifiers returned by
<code>crs.getIdentifiers()</code>.
-In many cases (especially if the <abbr title="Coordinate Reference
System">CRS</abbr> was parsed from a Well Known Text), only simple identifiers
like <code>"EPSG:4326"</code> are provided.
-An easy way to build the full URN is to use the code below.
-That example may scan the EPSG database for finding the information if it was
not explicitly provided in the given <abbr title="Coordinate Reference
System">CRS</abbr>.</p>
-<div class="highlight"><pre tabindex="0" class="chroma"><code
class="language-java" data-lang="java"><span class="line"><span
class="cl"><span class="n">CoordinateReferenceSystem</span> <span
class="n">myCRS</span> <span class="o">=</span> <span class="o">...;</span>
-</span></span><span class="line"><span class="cl"><span
class="n">String</span> <span class="n">urn</span> <span class="o">=</span>
<span class="n">IdentifiedObjects</span><span class="o">.</span><span
class="na">lookupURN</span><span class="o">(</span><span
class="n">myCRS</span><span class="o">);</span></span></span></code></pre></div>
<h3 id="lookupReliability">Is IdentifiedObjects.lookupEPSG(…) a reliable
inverse of CRS.forCode(…)? </h3>
<p>For <abbr title="Coordinate Reference System">CRS</abbr> created from the
EPSG geodetic dataset, usually yes.
Note however that <code>IdentifiedObjects.getIdentifier(…)</code> is cheaper
and insensitive to the details of <abbr title="Coordinate Reference
System">CRS</abbr> definition,
@@ -304,10 +229,6 @@ The <code>lookupEPSG(…)</code> method on the other hand is
robust to erroneous
since it always compares the <abbr title="Coordinate Reference
System">CRS</abbr> with the database content.
But it may fail if there is slight mismatch (for example rounding errors in
projection parameters)
between the supplied <abbr title="Coordinate Reference System">CRS</abbr> and
the <abbr title="Coordinate Reference System">CRS</abbr> found in the
database.</p>
-<h3 id="equalsIgnoreMetadata">How can I determine if two CRS are
“functionally” equal? </h3>
-<p>Two Coordinate Reference Systems may not be considered equal if they are
associated to different metadata
-(name, identifiers, scope, domain of validity, remarks), even though they
represent the same logical <abbr title="Coordinate Reference System">CRS</abbr>.
-In order to test if two <abbr title="Coordinate Reference System">CRS</abbr>
are functionally equivalent, use
<code>Utilities.equalsIgnoreMetadata(myFirstCRS, mySecondCRS)</code>.</p>
<h3 id="crsHashCode">Are CRS objects safe for use as keys in HashMap? </h3>
<p>Yes, every classes defined in the
<code>org.apache.sis.referencing.crs</code>, <code>cs</code> and
<code>datum</code> packages
define properly their <code>equals(Object)</code> and <code>hashCode()</code>
methods.
diff --git a/howto.html b/howto.html
index e86dfc1b..4fb233c1 100644
--- a/howto.html
+++ b/howto.html
@@ -105,8 +105,23 @@
<img src="./images/logo.png" class="sis-logo" align="left"/>
<p class="page-title">How to</p>
- <p>Java code examples for performing some tasks with Apache <abbr
title="Spatial Information System">SIS</abbr>.</p>
-<h1 id="rasters">Rasters</h1>
+ <p>Java code examples for performing some tasks with Apache <abbr
title="Spatial Information System">SIS</abbr>.
+The examples are grouped in the following sections:</p>
+<nav id="TableOfContents">
+ <ul>
+ <li><a href="#referencing">Referencing by coordinates </a></li>
+ <li><a href="#raster">Grid coverages (rasters) </a></li>
+ </ul>
+</nav>
+<h1 id="referencing">Referencing by coordinates </h1>
+<ul>
+<li><a href="howto/instantiate_utm_projection.html">Instantiate a Universal
Transverse Mercator (UTM) projection</a></li>
+<li><a href="faq.html#google">Instantiate a Pseudo Mercator (a.k.a. Google)
projection</a></li>
+<li><a href="howto/transform_coordinates.html">Transform coordinates between
two reference systems</a></li>
+<li><a href="howto/lookup_crs_urn.html">Get the EPSG code or URN of an
existing <abbr title="Coordinate Reference System">CRS</abbr></a></li>
+<li><a href="howto/crs_equality.html">Determine if two <abbr title="Coordinate
Reference System">CRS</abbr> are functionally equal</a></li>
+</ul>
+<h1 id="raster">Grid coverages (rasters) </h1>
<ul>
<li><a href="howto/raster_values_at_geographic_coordinates.html">Get raster
values at geographic coordinates</a></li>
<li><a href="howto/rasters_bigger_than_memory.html">Handle rasters bigger than
memory</a></li>
diff --git a/howto/crs_equality.html b/howto/crs_equality.html
new file mode 100644
index 00000000..297302d0
--- /dev/null
+++ b/howto/crs_equality.html
@@ -0,0 +1,194 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+
+
+ <title>Apache SIS - Determine if two CRS are functionally equal</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
+ rel="stylesheet"
integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU"
crossorigin="anonymous">
+ <link rel="stylesheet" type="text/css" media="screen" href="../syntax.css">
+ <link rel="stylesheet" type="text/css" media="screen" href="../sis.css">
+</head>
+
+<body>
+
+<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
+ <div class="container-fluid">
+ <a class="navbar-brand" href="../index.html"> Apache SIS™</a>
+ <ul class="navbar-nav me-auto mb-2 mb-md-0">
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuAbout"
data-bs-toggle="dropdown" aria-expanded="false">About</a>
+ <ul class="dropdown-menu" aria-labelledby="menuAbout">
+ <li><a class="dropdown-item"
href="http://www.apache.org/licenses/">License</a></li>
+ <li><a class="dropdown-item" href="../mail-lists.html">Mailing
Lists</a></li>
+ <li><a class="dropdown-item" href="../team-list.html">Project
Team</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuDownload"
data-bs-toggle="dropdown" aria-expanded="false">Download</a>
+ <ul class="dropdown-menu" aria-labelledby="menuDownload">
+ <li><a class="dropdown-item"
href="../downloads.html">Downloads</a></li>
+ <li><a class="dropdown-item" href="../source.html">Checkout
Sources</a></li>
+ <li><a class="dropdown-item" href="../build.html">Build from
Sources</a></li>
+ <li><a class="dropdown-item" href="../epsg.html">EPSG
Database</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuDocumentation"
data-bs-toggle="dropdown" aria-expanded="false">Documentation</a>
+ <ul class="dropdown-menu" aria-labelledby="menuDocumentation">
+ <li><a class="dropdown-item" href="../apidocs/index.html">Online
Javadoc</a></li>
+ <li><a class="dropdown-item"
href="../book/en/developer-guide.html">Developer Guide</a></li>
+ <li><a class="dropdown-item" href="../howto.html">How to…</a></li>
+ <li><a class="dropdown-item" href="../formats.html">Supported
formats</a></li>
+ <li><a class="dropdown-item"
href="../tables/CoordinateReferenceSystems.html">Supported CRS</a></li>
+ <li><a class="dropdown-item"
href="../tables/CoordinateOperationMethods.html">Map Projections</a></li>
+ <li><a class="dropdown-item" href="../code-patterns.html">Code
Patterns</a></li>
+ <li><a class="dropdown-item" href="../faq.html">FAQ</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuContribute"
data-bs-toggle="dropdown" aria-expanded="false">Contribute</a>
+ <ul class="dropdown-menu" aria-labelledby="menuContribute">
+ <li><a class="dropdown-item" href="../contributor.html">New
Contributor</a></li>
+ <li><a class="dropdown-item"
href="../coding-conventions.html">Coding Conventions</a></li>
+ <li><a class="dropdown-item" href="../mail-lists.html">Mailing
Lists</a></li>
+ <li><a class="dropdown-item"
href="https://issues.apache.org/jira/browse/SIS">Issue Tracker</a></li>
+ <li><a class="dropdown-item"
href="https://github.com/apache/sis">GitHub mirror</a></li>
+ <li><a class="dropdown-item"
href="https://cwiki.apache.org/confluence/display/SIS">Wiki</a></li>
+ <li><hr class="dropdown-divider"></li>
+ <li><a class="dropdown-item"
href="../release-management.html">Release management</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuASF"
data-bs-toggle="dropdown" aria-expanded="false">The Foundation</a>
+ <ul class="dropdown-menu" aria-labelledby="menuASF">
+ <li><a class="dropdown-item" href="http://www.apache.org">The
Foundation</a></li>
+ <li><a class="dropdown-item"
href="http://www.apache.org/foundation/sponsorship.html">Donate</a></li>
+ <li><a class="dropdown-item"
href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+ <li><a class="dropdown-item"
href="http://www.apache.org/security/">Security</a></li>
+ </ul>
+ </li>
+ </ul>
+ <ul class="navbar-nav ml-auto mb-2 mb-md-0">
+ <li class="nav-item">
+ <a href="https://www.apache.org/events/current-event.html">
+ <img class="apache-con"
src="https://www.apache.org/events/current-event-234x60.png" alt="ApacheCon"/>
+ </a>
+ </li>
+ </ul>
+ </div>
+</nav>
+
+
+<div class="row flex-nowrap">
+ <div class="d-flex flex-column flex-shrink-0 p-3 text-white bg-dark"
style="width:13rem; min-height:40rem">
+ <ul class="nav nav-pills flex-column mb-auto position-fixed">
+ <li><a class="nav-link text-white " href="../index.html">Home</a></li>
+ <li><a class="nav-link text-white"
href="http://www.apache.org/licenses/">License</a></li>
+ <li><a class="nav-link text-white "
href="../downloads.html">Downloads</a></li>
+ <li><a class="nav-link active " href="../howto.html">How to…</a></li>
+ <li><a class="nav-link text-white "
href="../standards.html">Standards</a></li>
+ <li><a class="nav-link text-white " href="../formats.html">Data
formats</a></li>
+ <li><a class="nav-link text-white " href="../epsg.html">EPSG
Database</a></li>
+ <li><a class="nav-link text-white " href="../javafx.html">Application
(demo)</a></li>
+ <li><a class="nav-link text-white" href="../apidocs/index.html">Online
Javadoc</a></li>
+ <li><a class="nav-link text-white"
href="../book/en/developer-guide.html">Developer Guide</a></li>
+ <li><a class="nav-link text-white " href="../code-patterns.html">Code
patterns</a></li>
+ <li><a class="nav-link text-white " href="../faq.html">FAQ</a></li>
+ </ul>
+ </div>
+ <div class="col">
+ <main class="container">
+ <article>
+ <img src="../images/logo.png" class="sis-logo" align="left"/>
+ <p class="page-title">Determine if two CRS are functionally equal</p>
+
+ <p>Two Coordinate Reference Systems may not be considered equal if they are
associated to different metadata
+(name, identifiers, scope, domain of validity, remarks), even though they
represent the same logical <abbr title="Coordinate Reference System">CRS</abbr>.
+In order to test if two <abbr title="Coordinate Reference System">CRS</abbr>
are functionally equivalent,
+<code>Utilities.equalsIgnoreMetadata(myFirstCRS, mySecondCRS)</code> can be
used.</p>
+<p>In some cases, <code>equalsIgnoreMetadata(…)</code> may fail to see that
two reference systems are equal.
+It may happen for example when two map projections are defined with different
parameters,
+but are mathematically equivalent.
+A more reliable but more costly way to check if two <abbr title="Coordinate
Reference System">CRS</abbr> are functionally equivalent
+is to request the coordinate operation between them, and check if that
operation is identity.</p>
+<h1 id="direct-dependencies">Direct dependencies</h1>
+<table>
+<thead>
+<tr>
+<th>Maven coordinates</th>
+<th>Module info</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td><code>org.apache.sis.storage:sis-referencing</code></td>
+<td><code>org.apache.sis.referencing</code></td>
+</tr>
+</tbody>
+</table>
+<h1 id="code-example">Code example</h1>
+<div class="highlight"><pre tabindex="0" class="chroma"><code
class="language-java" data-lang="java"><span class="line"><span
class="cl"><span class="kn">import</span> <span
class="nn">org.opengis.referencing.crs.CoordinateReferenceSystem</span><span
class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.opengis.util.FactoryException</span><span class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.apache.sis.referencing.CRS</span><span class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.apache.sis.referencing.CommonCRS</span><span class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.apache.sis.util.Utilities</span><span class="o">;</span>
+</span></span><span class="line"><span class="cl">
+</span></span><span class="line"><span class="cl"><span
class="kd">public</span> <span class="kd">class</span> <span
class="nc">CrsEquality</span> <span class="o">{</span>
+</span></span><span class="line"><span class="cl"> <span class="cm">/**
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* Demo entry point.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
*
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* @param args ignored.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* @throws FactoryException if an error occurred while creating the CRS
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* or searching for a coordinate operation.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
*/</span>
+</span></span><span class="line"><span class="cl"> <span
class="kd">public</span> <span class="kd">static</span> <span
class="kt">void</span> <span class="nf">main</span><span
class="o">(</span><span class="n">String</span><span class="o">[]</span> <span
class="n">args</span><span class="o">)</span> <span class="kd">throws</span>
<span class="n">FactoryException</span> <span class="o">{</span>
+</span></span><span class="line"><span class="cl"> <span
class="n">CoordinateReferenceSystem</span> <span class="n">crs1</span> <span
class="o">=</span> <span class="n">CommonCRS</span><span
class="o">.</span><span class="na">WGS84</span><span class="o">.</span><span
class="na">geographic</span><span class="o">();</span>
+</span></span><span class="line"><span class="cl"> <span
class="n">CoordinateReferenceSystem</span> <span class="n">crs2</span> <span
class="o">=</span> <span class="n">CRS</span><span class="o">.</span><span
class="na">fromWKT</span><span class="o">(</span>
+</span></span><span class="line"><span class="cl"> <span
class="s">"""
+</span></span></span><span class="line"><span class="cl"><span class="s">
GeodeticCRS["</span><span class="n">WGS84</span> <span
class="n">with</span> <span class="n">a</span> <span class="n">different</span>
<span class="n">name</span><span class="s">",
+</span></span></span><span class="line"><span class="cl"><span class="s">
Datum["</span><span class="n">World</span> <span
class="n">Geodetic</span> <span class="n">System</span> <span
class="n">1984</span><span class="s">",
+</span></span></span><span class="line"><span class="cl"><span class="s">
Ellipsoid["</span><span class="n">A</span> <span
class="n">different</span> <span class="n">name</span><span class="s">",
6378137.0, 298.257223563]],
+</span></span></span><span class="line"><span class="cl"><span class="s">
CS[ellipsoidal, 2],
+</span></span></span><span class="line"><span class="cl"><span class="s">
Axis["</span><span class="n">Latitude</span> <span
class="o">(</span><span class="n">B</span><span class="o">)</span><span
class="s">", north],
+</span></span></span><span class="line"><span class="cl"><span class="s">
Axis["</span><span class="n">Longitude</span> <span
class="o">(</span><span class="n">L</span><span class="o">)</span><span
class="s">", east],
+</span></span></span><span class="line"><span class="cl"><span class="s">
Unit["</span><span class="n">degree</span><span class="s">",
0.017453292519943295]]
+</span></span></span><span class="line"><span class="cl"><span class="s">
"""</span><span class="o">);</span>
+</span></span><span class="line"><span class="cl">
+</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">println</span><span class="o">(</span><span
class="s">"equals: "</span>
+</span></span><span class="line"><span class="cl"> <span
class="o">+</span> <span class="n">crs1</span><span class="o">.</span><span
class="na">equals</span><span class="o">(</span><span
class="n">crs2</span><span class="o">));</span>
+</span></span><span class="line"><span class="cl">
+</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">println</span><span class="o">(</span><span
class="s">"equalsIgnoreMetadata: "</span>
+</span></span><span class="line"><span class="cl"> <span
class="o">+</span> <span class="n">Utilities</span><span
class="o">.</span><span class="na">equalsIgnoreMetadata</span><span
class="o">(</span><span class="n">crs1</span><span class="o">,</span> <span
class="n">crs2</span><span class="o">));</span>
+</span></span><span class="line"><span class="cl">
+</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">println</span><span class="o">(</span><span
class="s">"Identity transform: "</span>
+</span></span><span class="line"><span class="cl"> <span
class="o">+</span> <span class="n">CRS</span><span class="o">.</span><span
class="na">findOperation</span><span class="o">(</span><span
class="n">crs2</span><span class="o">,</span> <span class="n">crs2</span><span
class="o">,</span> <span class="kc">null</span><span class="o">).</span><span
class="na">getMathTransform</span><span class="o">().</span><span
class="na">isIdentity</span><span class="o">());</span>
+</span></span><span class="line"><span class="cl"> <span class="o">}</span>
+</span></span><span class="line"><span class="cl"><span
class="o">}</span></span></span></code></pre></div>
+<h1 id="output">Output</h1>
+<pre tabindex="0"><code>equals: false
+equalsIgnoreMetadata: true
+Identity transform: true
+</code></pre>
+
+ </article>
+ </main>
+ <footer class="footer">
+ <div class="container">
+ <p>
+ Copyright © 2013-2023 The Apache Software Foundation, Licensed
under the
+ <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License,
Version 2.0</a>.<br/>
+ Apache SIS, Apache, the Apache feather logo are trademarks of The
Apache Software Foundation.
+ </p>
+ </div>
+</footer>
+ </div>
+</div>
+
+<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
+
integrity="sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ"
crossorigin="anonymous"></script>
+
+</body>
+</html>
diff --git a/howto/index.xml b/howto/index.xml
index f0c6f341..4eb4e7e9 100644
--- a/howto/index.xml
+++ b/howto/index.xml
@@ -6,6 +6,16 @@
<description>Recent content in How to on Apache SIS</description>
<generator>Hugo -- gohugo.io</generator>
<language>en</language><atom:link
href="https://sis.apache.org/howto/index.xml" rel="self"
type="application/rss+xml" />
+ <item>
+ <title>Determine if two CRS are functionally equal</title>
+ <link>https://sis.apache.org/howto/crs_equality.html</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://sis.apache.org/howto/crs_equality.html</guid>
+ <description>Two Coordinate Reference Systems may not be considered
equal if they are associated to different metadata (name, identifiers, scope,
domain of validity, remarks), even though they represent the same logical CRS.
In order to test if two CRS are functionally equivalent,
Utilities.equalsIgnoreMetadata(myFirstCRS, mySecondCRS) can be used.
+In some cases, equalsIgnoreMetadata(…) may fail to see that two reference
systems are equal. It may happen for example when two map projections are
defined with different parameters, but are mathematically
equivalent.</description>
+ </item>
+
<item>
<title>Get raster values at geographic coordinates</title>
<link>https://sis.apache.org/howto/raster_values_at_geographic_coordinates.html</link>
@@ -16,6 +26,15 @@
This example uses data in netCDF format. A netCDF file can contain an
arbitrary amount of variables.</description>
</item>
+ <item>
+ <title>Get the EPSG code or URN of an existing CRS</title>
+ <link>https://sis.apache.org/howto/lookup_crs_urn.html</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://sis.apache.org/howto/lookup_crs_urn.html</guid>
+ <description>The identifier of a Coordinate Reference System (CRS)
object can be obtained by the getIdentifiers() method, which usually return a
collection of zero or one element. If the CRS has been created from a Well
Known Text (WKT) parsing and the WKT ends with an
AUTHORITY[&quot;EPSG&quot;, &quot;xxxx&quot;] (WKT version 1)
or ID[&quot;EPSG&quot;, xxxx] (WKT version 2) element, then the
identifier (an EPSG numerical code in this example) is the xxxx va [...]
+ </item>
+
<item>
<title>Handle rasters bigger than memory</title>
<link>https://sis.apache.org/howto/rasters_bigger_than_memory.html</link>
@@ -25,6 +44,16 @@ This example uses data in netCDF format. A netCDF file can
contain an arbitrary
<description>This example opens a big GeoTIFF file without reading the
tiles immediately. Instead, tiles will be read only when requested by a call to
the Java2D RenderedImage.getTile(int, int) method. Loaded tiles are cached by
soft references, i.e. they may be discarted and reloaded when needed again.
This approach allows processing of raster data larger than memory, provided
that the application does not request all tiles at once. It integrates well
with operations provided by A [...]
</item>
+ <item>
+ <title>Instantiate a UTM projection</title>
+ <link>https://sis.apache.org/howto/instantiate_utm_projection.html</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://sis.apache.org/howto/instantiate_utm_projection.html</guid>
+ <description>The Universal Transverse Mercator (UTM) projection divides
the world in 60 zones. If the UTM zone is unknown, an easy way to instantiate
the projection is to invoke the universal(…) method on one of the CommonCRS
predefined constants. That method receives in argument a geographic coordinate
in (latitude, longitude) order and computes the UTM zone from it. It takes in
account the special cases of Norway and Svalbard.
+An alternative, more standard, way using geographic coordinates is to format
an &ldquo;AUTO&rdquo; authority code.</description>
+ </item>
+
<item>
<title>Resample a raster and write to a file</title>
<link>https://sis.apache.org/howto/resample_and_save_raster.html</link>
@@ -35,5 +64,15 @@ This example uses data in netCDF format. A netCDF file can
contain an arbitrary
Direct dependencies Maven coordinates Module info Remarks
org.apache.sis.storage:sis-geotiff org.apache.sis.storage.geotiff
org.apache.sis.non-free:sis-embedded-data org.apache.sis.referencing.database
Non-Apache license. The EPSG dependency is necessary for this example
because a Coordinate Reference System (CRS) is instantiated from its EPSG
code.</description>
</item>
+ <item>
+ <title>Transform coordinates</title>
+ <link>https://sis.apache.org/howto/transform_coordinates.html</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://sis.apache.org/howto/transform_coordinates.html</guid>
+ <description>The following Java code projects geographic coordinates
from the World Geodetic System 1984 (WGS84) to WGS 84 / UTM zone 33N. In order
to make the example a little bit simpler, this code uses predefined constants
given by the CommonCRS convenience class. But more advanced applications may
use EPSG codes or definitions in Well-Known Text (WKT) instead.
+Note: if the result of a coordinate transformation seems wrong, see the FAQ
page.</description>
+ </item>
+
</channel>
</rss>
diff --git a/howto/instantiate_UTM_projection.html
b/howto/instantiate_UTM_projection.html
new file mode 100644
index 00000000..3cf1e732
--- /dev/null
+++ b/howto/instantiate_UTM_projection.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+
+
+ <title>Apache SIS - Instantiate a UTM projection</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
+ rel="stylesheet"
integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU"
crossorigin="anonymous">
+ <link rel="stylesheet" type="text/css" media="screen" href="../syntax.css">
+ <link rel="stylesheet" type="text/css" media="screen" href="../sis.css">
+</head>
+
+<body>
+
+<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
+ <div class="container-fluid">
+ <a class="navbar-brand" href="../index.html"> Apache SIS™</a>
+ <ul class="navbar-nav me-auto mb-2 mb-md-0">
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuAbout"
data-bs-toggle="dropdown" aria-expanded="false">About</a>
+ <ul class="dropdown-menu" aria-labelledby="menuAbout">
+ <li><a class="dropdown-item"
href="http://www.apache.org/licenses/">License</a></li>
+ <li><a class="dropdown-item" href="../mail-lists.html">Mailing
Lists</a></li>
+ <li><a class="dropdown-item" href="../team-list.html">Project
Team</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuDownload"
data-bs-toggle="dropdown" aria-expanded="false">Download</a>
+ <ul class="dropdown-menu" aria-labelledby="menuDownload">
+ <li><a class="dropdown-item"
href="../downloads.html">Downloads</a></li>
+ <li><a class="dropdown-item" href="../source.html">Checkout
Sources</a></li>
+ <li><a class="dropdown-item" href="../build.html">Build from
Sources</a></li>
+ <li><a class="dropdown-item" href="../epsg.html">EPSG
Database</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuDocumentation"
data-bs-toggle="dropdown" aria-expanded="false">Documentation</a>
+ <ul class="dropdown-menu" aria-labelledby="menuDocumentation">
+ <li><a class="dropdown-item" href="../apidocs/index.html">Online
Javadoc</a></li>
+ <li><a class="dropdown-item"
href="../book/en/developer-guide.html">Developer Guide</a></li>
+ <li><a class="dropdown-item" href="../howto.html">How to…</a></li>
+ <li><a class="dropdown-item" href="../formats.html">Supported
formats</a></li>
+ <li><a class="dropdown-item"
href="../tables/CoordinateReferenceSystems.html">Supported CRS</a></li>
+ <li><a class="dropdown-item"
href="../tables/CoordinateOperationMethods.html">Map Projections</a></li>
+ <li><a class="dropdown-item" href="../code-patterns.html">Code
Patterns</a></li>
+ <li><a class="dropdown-item" href="../faq.html">FAQ</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuContribute"
data-bs-toggle="dropdown" aria-expanded="false">Contribute</a>
+ <ul class="dropdown-menu" aria-labelledby="menuContribute">
+ <li><a class="dropdown-item" href="../contributor.html">New
Contributor</a></li>
+ <li><a class="dropdown-item"
href="../coding-conventions.html">Coding Conventions</a></li>
+ <li><a class="dropdown-item" href="../mail-lists.html">Mailing
Lists</a></li>
+ <li><a class="dropdown-item"
href="https://issues.apache.org/jira/browse/SIS">Issue Tracker</a></li>
+ <li><a class="dropdown-item"
href="https://github.com/apache/sis">GitHub mirror</a></li>
+ <li><a class="dropdown-item"
href="https://cwiki.apache.org/confluence/display/SIS">Wiki</a></li>
+ <li><hr class="dropdown-divider"></li>
+ <li><a class="dropdown-item"
href="../release-management.html">Release management</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuASF"
data-bs-toggle="dropdown" aria-expanded="false">The Foundation</a>
+ <ul class="dropdown-menu" aria-labelledby="menuASF">
+ <li><a class="dropdown-item" href="http://www.apache.org">The
Foundation</a></li>
+ <li><a class="dropdown-item"
href="http://www.apache.org/foundation/sponsorship.html">Donate</a></li>
+ <li><a class="dropdown-item"
href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+ <li><a class="dropdown-item"
href="http://www.apache.org/security/">Security</a></li>
+ </ul>
+ </li>
+ </ul>
+ <ul class="navbar-nav ml-auto mb-2 mb-md-0">
+ <li class="nav-item">
+ <a href="https://www.apache.org/events/current-event.html">
+ <img class="apache-con"
src="https://www.apache.org/events/current-event-234x60.png" alt="ApacheCon"/>
+ </a>
+ </li>
+ </ul>
+ </div>
+</nav>
+
+
+<div class="row flex-nowrap">
+ <div class="d-flex flex-column flex-shrink-0 p-3 text-white bg-dark"
style="width:13rem; min-height:40rem">
+ <ul class="nav nav-pills flex-column mb-auto position-fixed">
+ <li><a class="nav-link text-white " href="../index.html">Home</a></li>
+ <li><a class="nav-link text-white"
href="http://www.apache.org/licenses/">License</a></li>
+ <li><a class="nav-link text-white "
href="../downloads.html">Downloads</a></li>
+ <li><a class="nav-link active " href="../howto.html">How to…</a></li>
+ <li><a class="nav-link text-white "
href="../standards.html">Standards</a></li>
+ <li><a class="nav-link text-white " href="../formats.html">Data
formats</a></li>
+ <li><a class="nav-link text-white " href="../epsg.html">EPSG
Database</a></li>
+ <li><a class="nav-link text-white " href="../javafx.html">Application
(demo)</a></li>
+ <li><a class="nav-link text-white" href="../apidocs/index.html">Online
Javadoc</a></li>
+ <li><a class="nav-link text-white"
href="../book/en/developer-guide.html">Developer Guide</a></li>
+ <li><a class="nav-link text-white " href="../code-patterns.html">Code
patterns</a></li>
+ <li><a class="nav-link text-white " href="../faq.html">FAQ</a></li>
+ </ul>
+ </div>
+ <div class="col">
+ <main class="container">
+ <article>
+ <img src="../images/logo.png" class="sis-logo" align="left"/>
+ <p class="page-title">Instantiate a UTM projection</p>
+
+ <p>The Universal Transverse Mercator (UTM) projection divides the world in
60 zones.
+If the UTM zone is unknown, an easy way to instantiate the projection
+is to invoke the <code>universal(…)</code> method on one of the
<code>CommonCRS</code> predefined constants.
+That method receives in argument a geographic coordinate in
(<em>latitude</em>, <em>longitude</em>) order and computes the UTM zone from it.
+It takes in account the special cases of Norway and Svalbard.</p>
+<p>An alternative, more standard, way using geographic coordinates is to
format an “AUTO” authority code.
+The syntax is
<code>"AUTO2:42001,1,<longitude>,<latitude>"</code>.
+However this approach works only for the WGS84 datum.</p>
+<p>If the UTM zone is known, another way is to use the “EPSG”
authority factory.
+The EPSG code of some UTM projections can be determined as below, where
<em>zone</em> is a number from 1 to 60 inclusive (unless otherwise
specified):</p>
+<ul>
+<li>WGS 84 (northern hemisphere): 32600 + <em>zone</em></li>
+<li>WGS 84 (southern hemisphere): 32700 + <em>zone</em></li>
+<li>WGS 72 (northern hemisphere): 32200 + <em>zone</em></li>
+<li>WGS 72 (southern hemisphere): 32300 + <em>zone</em></li>
+<li>NAD 83 (northern hemisphere): 26900 + <em>zone</em> (zone 1 to 23
only)</li>
+<li>NAD 27 (northern hemisphere): 26700 + <em>zone</em> (zone 1 to 22
only)</li>
+<li>See the EPSG dataset for additional UTM definitions
+(WGS 72BE, SIRGAS 2000, SIRGAS 1995, SAD 69, ETRS 89, <em>etc.</em>).</li>
+</ul>
+<p>The code example below instantiates the same <abbr title="Coordinate
Reference System">CRS</abbr> using the three approaches.</p>
+<h1 id="direct-dependencies">Direct dependencies</h1>
+<table>
+<thead>
+<tr>
+<th>Maven coordinates</th>
+<th>Module info</th>
+<th>Remarks</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td><code>org.apache.sis.storage:sis-referencing</code></td>
+<td><code>org.apache.sis.referencing</code></td>
+<td></td>
+</tr>
+<tr>
+<td><code>org.apache.sis.non-free:sis-embedded-data</code></td>
+<td><code>org.apache.sis.referencing.database</code></td>
+<td>Optional. Non-Apache license.</td>
+</tr>
+</tbody>
+</table>
+<p>The <a href="../epsg.html">EPSG dependency</a> is optional for examples
using the <code>CommonCRS</code> enumeration
+or the “AUTO” authority, but is required for examples using the
“EPSG” authority.</p>
+<h1 id="code-example">Code example</h1>
+<p>Note that all geographic coordinates below express latitude <em>before</em>
longitude,
+except in “AUTO2” authority code.</p>
+<div class="highlight"><pre tabindex="0" class="chroma"><code
class="language-java" data-lang="java"><span class="line"><span
class="cl"><span class="kn">import</span> <span
class="nn">org.opengis.referencing.crs.CoordinateReferenceSystem</span><span
class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.opengis.util.FactoryException</span><span class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.apache.sis.referencing.CRS</span><span class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.apache.sis.referencing.CommonCRS</span><span class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.apache.sis.util.Utilities</span><span class="o">;</span>
+</span></span><span class="line"><span class="cl">
+</span></span><span class="line"><span class="cl"><span
class="kd">public</span> <span class="kd">class</span> <span
class="nc">InstantiateUTM</span> <span class="o">{</span>
+</span></span><span class="line"><span class="cl"> <span class="cm">/**
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* Demo entry point.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
*
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* @param args ignored.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* @throws FactoryException if an error occurred while creating the Coordinate
Reference System (CRS).
+</span></span></span><span class="line"><span class="cl"><span class="cm">
*/</span>
+</span></span><span class="line"><span class="cl"> <span
class="kd">public</span> <span class="kd">static</span> <span
class="kt">void</span> <span class="nf">main</span><span
class="o">(</span><span class="n">String</span><span class="o">[]</span> <span
class="n">args</span><span class="o">)</span> <span class="kd">throws</span>
<span class="n">FactoryException</span> <span class="o">{</span>
+</span></span><span class="line"><span class="cl"> <span class="cm">/*
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* Get UTM projection for whatever zone is valid for 40°N 14°E.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
*/</span>
+</span></span><span class="line"><span class="cl"> <span
class="kt">double</span> <span class="n">latitude</span> <span
class="o">=</span> <span class="n">40</span><span class="o">;</span> <span
class="c1">// Will determine the hemisphere.
+</span></span></span><span class="line"><span class="cl"><span
class="c1"></span> <span class="kt">double</span> <span
class="n">longitude</span> <span class="o">=</span> <span
class="n">14</span><span class="o">;</span> <span class="c1">// Will
determine the UTM zone.
+</span></span></span><span class="line"><span class="cl"><span
class="c1"></span> <span class="n">CoordinateReferenceSystem</span>
<span class="n">crsFromPoint</span> <span class="o">=</span> <span
class="n">CommonCRS</span><span class="o">.</span><span
class="na">WGS84</span><span class="o">.</span><span
class="na">universal</span><span class="o">(</span><span
class="n">latitude</span><span class="o">,</span> <span
class="n">longitude</span><span class="o">);</span>
+</span></span><span class="line"><span class="cl"> <span
class="n">CoordinateReferenceSystem</span> <span class="n">crsFromAUTO2</span>
<span class="o">=</span> <span class="n">CRS</span><span
class="o">.</span><span class="na">forCode</span><span class="o">(</span><span
class="s">"AUTO2:42001,1,"</span> <span class="o">+</span> <span
class="n">longitude</span> <span class="o">+</span> <span
class="s">","</span> <span class="o">+</span> <span
class="n">latitude</sp [...]
+</span></span><span class="line"><span class="cl"> <span class="cm">/*
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* Get the UTM projection for a specific zone.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
*/</span>
+</span></span><span class="line"><span class="cl"> <span
class="kt">int</span> <span class="n">zone</span> <span class="o">=</span>
<span class="n">33</span><span class="o">;</span> <span
class="c1">// UTM zone 33.
+</span></span></span><span class="line"><span class="cl"><span
class="c1"></span> <span class="kt">int</span> <span
class="n">code</span> <span class="o">=</span> <span class="n">32600</span>
<span class="o">+</span> <span class="n">zone</span><span class="o">;</span>
<span class="c1">// For WGS84 northern hemisphere
+</span></span></span><span class="line"><span class="cl"><span
class="c1"></span> <span class="n">CoordinateReferenceSystem</span>
<span class="n">crsFromCode</span> <span class="o">=</span> <span
class="n">CRS</span><span class="o">.</span><span
class="na">forCode</span><span class="o">(</span><span
class="s">"EPSG:"</span> <span class="o">+</span> <span
class="n">code</span><span class="o">);</span>
+</span></span><span class="line"><span class="cl"> <span class="cm">/*
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* Compare the results.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
*/</span>
+</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">println</span><span class="o">(</span><span
class="s">"Are the CRS equivalent?"</span><span class="o">);</span>
+</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">println</span><span class="o">(</span><span
class="s">"AUTO2: "</span> <span class="o">+</span> <span
class="n">Utilities</span><span class="o">.</span><span
class="na">equalsIgnoreMetadata</span><span class="o">(</span><span
class="n">crsFromPoint</span><span class="o">,</span> <span class="n">crsFromAU
[...]
+</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">println</span><span class="o">(</span><span
class="s">"EPSG: "</span> <span class="o">+</span> <span
class="n">Utilities</span><span class="o">.</span><span
class="na">equalsIgnoreMetadata</span><span class="o">(</span><span
class="n">crsFromPoint</span><span class="o">,</span> <span class="n">crsFromCo
[...]
+</span></span><span class="line"><span class="cl"> <span class="o">}</span>
+</span></span><span class="line"><span class="cl"><span
class="o">}</span></span></span></code></pre></div>
+<h1 id="output">Output</h1>
+<pre tabindex="0"><code>Are the CRS equivalent?
+AUTO2: true
+EPSG: true
+</code></pre>
+
+ </article>
+ </main>
+ <footer class="footer">
+ <div class="container">
+ <p>
+ Copyright © 2013-2023 The Apache Software Foundation, Licensed
under the
+ <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License,
Version 2.0</a>.<br/>
+ Apache SIS, Apache, the Apache feather logo are trademarks of The
Apache Software Foundation.
+ </p>
+ </div>
+</footer>
+ </div>
+</div>
+
+<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
+
integrity="sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ"
crossorigin="anonymous"></script>
+
+</body>
+</html>
diff --git a/howto/instantiate_utm_projection.html
b/howto/instantiate_utm_projection.html
new file mode 100644
index 00000000..3cf1e732
--- /dev/null
+++ b/howto/instantiate_utm_projection.html
@@ -0,0 +1,215 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+
+
+ <title>Apache SIS - Instantiate a UTM projection</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
+ rel="stylesheet"
integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU"
crossorigin="anonymous">
+ <link rel="stylesheet" type="text/css" media="screen" href="../syntax.css">
+ <link rel="stylesheet" type="text/css" media="screen" href="../sis.css">
+</head>
+
+<body>
+
+<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
+ <div class="container-fluid">
+ <a class="navbar-brand" href="../index.html"> Apache SIS™</a>
+ <ul class="navbar-nav me-auto mb-2 mb-md-0">
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuAbout"
data-bs-toggle="dropdown" aria-expanded="false">About</a>
+ <ul class="dropdown-menu" aria-labelledby="menuAbout">
+ <li><a class="dropdown-item"
href="http://www.apache.org/licenses/">License</a></li>
+ <li><a class="dropdown-item" href="../mail-lists.html">Mailing
Lists</a></li>
+ <li><a class="dropdown-item" href="../team-list.html">Project
Team</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuDownload"
data-bs-toggle="dropdown" aria-expanded="false">Download</a>
+ <ul class="dropdown-menu" aria-labelledby="menuDownload">
+ <li><a class="dropdown-item"
href="../downloads.html">Downloads</a></li>
+ <li><a class="dropdown-item" href="../source.html">Checkout
Sources</a></li>
+ <li><a class="dropdown-item" href="../build.html">Build from
Sources</a></li>
+ <li><a class="dropdown-item" href="../epsg.html">EPSG
Database</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuDocumentation"
data-bs-toggle="dropdown" aria-expanded="false">Documentation</a>
+ <ul class="dropdown-menu" aria-labelledby="menuDocumentation">
+ <li><a class="dropdown-item" href="../apidocs/index.html">Online
Javadoc</a></li>
+ <li><a class="dropdown-item"
href="../book/en/developer-guide.html">Developer Guide</a></li>
+ <li><a class="dropdown-item" href="../howto.html">How to…</a></li>
+ <li><a class="dropdown-item" href="../formats.html">Supported
formats</a></li>
+ <li><a class="dropdown-item"
href="../tables/CoordinateReferenceSystems.html">Supported CRS</a></li>
+ <li><a class="dropdown-item"
href="../tables/CoordinateOperationMethods.html">Map Projections</a></li>
+ <li><a class="dropdown-item" href="../code-patterns.html">Code
Patterns</a></li>
+ <li><a class="dropdown-item" href="../faq.html">FAQ</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuContribute"
data-bs-toggle="dropdown" aria-expanded="false">Contribute</a>
+ <ul class="dropdown-menu" aria-labelledby="menuContribute">
+ <li><a class="dropdown-item" href="../contributor.html">New
Contributor</a></li>
+ <li><a class="dropdown-item"
href="../coding-conventions.html">Coding Conventions</a></li>
+ <li><a class="dropdown-item" href="../mail-lists.html">Mailing
Lists</a></li>
+ <li><a class="dropdown-item"
href="https://issues.apache.org/jira/browse/SIS">Issue Tracker</a></li>
+ <li><a class="dropdown-item"
href="https://github.com/apache/sis">GitHub mirror</a></li>
+ <li><a class="dropdown-item"
href="https://cwiki.apache.org/confluence/display/SIS">Wiki</a></li>
+ <li><hr class="dropdown-divider"></li>
+ <li><a class="dropdown-item"
href="../release-management.html">Release management</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuASF"
data-bs-toggle="dropdown" aria-expanded="false">The Foundation</a>
+ <ul class="dropdown-menu" aria-labelledby="menuASF">
+ <li><a class="dropdown-item" href="http://www.apache.org">The
Foundation</a></li>
+ <li><a class="dropdown-item"
href="http://www.apache.org/foundation/sponsorship.html">Donate</a></li>
+ <li><a class="dropdown-item"
href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+ <li><a class="dropdown-item"
href="http://www.apache.org/security/">Security</a></li>
+ </ul>
+ </li>
+ </ul>
+ <ul class="navbar-nav ml-auto mb-2 mb-md-0">
+ <li class="nav-item">
+ <a href="https://www.apache.org/events/current-event.html">
+ <img class="apache-con"
src="https://www.apache.org/events/current-event-234x60.png" alt="ApacheCon"/>
+ </a>
+ </li>
+ </ul>
+ </div>
+</nav>
+
+
+<div class="row flex-nowrap">
+ <div class="d-flex flex-column flex-shrink-0 p-3 text-white bg-dark"
style="width:13rem; min-height:40rem">
+ <ul class="nav nav-pills flex-column mb-auto position-fixed">
+ <li><a class="nav-link text-white " href="../index.html">Home</a></li>
+ <li><a class="nav-link text-white"
href="http://www.apache.org/licenses/">License</a></li>
+ <li><a class="nav-link text-white "
href="../downloads.html">Downloads</a></li>
+ <li><a class="nav-link active " href="../howto.html">How to…</a></li>
+ <li><a class="nav-link text-white "
href="../standards.html">Standards</a></li>
+ <li><a class="nav-link text-white " href="../formats.html">Data
formats</a></li>
+ <li><a class="nav-link text-white " href="../epsg.html">EPSG
Database</a></li>
+ <li><a class="nav-link text-white " href="../javafx.html">Application
(demo)</a></li>
+ <li><a class="nav-link text-white" href="../apidocs/index.html">Online
Javadoc</a></li>
+ <li><a class="nav-link text-white"
href="../book/en/developer-guide.html">Developer Guide</a></li>
+ <li><a class="nav-link text-white " href="../code-patterns.html">Code
patterns</a></li>
+ <li><a class="nav-link text-white " href="../faq.html">FAQ</a></li>
+ </ul>
+ </div>
+ <div class="col">
+ <main class="container">
+ <article>
+ <img src="../images/logo.png" class="sis-logo" align="left"/>
+ <p class="page-title">Instantiate a UTM projection</p>
+
+ <p>The Universal Transverse Mercator (UTM) projection divides the world in
60 zones.
+If the UTM zone is unknown, an easy way to instantiate the projection
+is to invoke the <code>universal(…)</code> method on one of the
<code>CommonCRS</code> predefined constants.
+That method receives in argument a geographic coordinate in
(<em>latitude</em>, <em>longitude</em>) order and computes the UTM zone from it.
+It takes in account the special cases of Norway and Svalbard.</p>
+<p>An alternative, more standard, way using geographic coordinates is to
format an “AUTO” authority code.
+The syntax is
<code>"AUTO2:42001,1,<longitude>,<latitude>"</code>.
+However this approach works only for the WGS84 datum.</p>
+<p>If the UTM zone is known, another way is to use the “EPSG”
authority factory.
+The EPSG code of some UTM projections can be determined as below, where
<em>zone</em> is a number from 1 to 60 inclusive (unless otherwise
specified):</p>
+<ul>
+<li>WGS 84 (northern hemisphere): 32600 + <em>zone</em></li>
+<li>WGS 84 (southern hemisphere): 32700 + <em>zone</em></li>
+<li>WGS 72 (northern hemisphere): 32200 + <em>zone</em></li>
+<li>WGS 72 (southern hemisphere): 32300 + <em>zone</em></li>
+<li>NAD 83 (northern hemisphere): 26900 + <em>zone</em> (zone 1 to 23
only)</li>
+<li>NAD 27 (northern hemisphere): 26700 + <em>zone</em> (zone 1 to 22
only)</li>
+<li>See the EPSG dataset for additional UTM definitions
+(WGS 72BE, SIRGAS 2000, SIRGAS 1995, SAD 69, ETRS 89, <em>etc.</em>).</li>
+</ul>
+<p>The code example below instantiates the same <abbr title="Coordinate
Reference System">CRS</abbr> using the three approaches.</p>
+<h1 id="direct-dependencies">Direct dependencies</h1>
+<table>
+<thead>
+<tr>
+<th>Maven coordinates</th>
+<th>Module info</th>
+<th>Remarks</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td><code>org.apache.sis.storage:sis-referencing</code></td>
+<td><code>org.apache.sis.referencing</code></td>
+<td></td>
+</tr>
+<tr>
+<td><code>org.apache.sis.non-free:sis-embedded-data</code></td>
+<td><code>org.apache.sis.referencing.database</code></td>
+<td>Optional. Non-Apache license.</td>
+</tr>
+</tbody>
+</table>
+<p>The <a href="../epsg.html">EPSG dependency</a> is optional for examples
using the <code>CommonCRS</code> enumeration
+or the “AUTO” authority, but is required for examples using the
“EPSG” authority.</p>
+<h1 id="code-example">Code example</h1>
+<p>Note that all geographic coordinates below express latitude <em>before</em>
longitude,
+except in “AUTO2” authority code.</p>
+<div class="highlight"><pre tabindex="0" class="chroma"><code
class="language-java" data-lang="java"><span class="line"><span
class="cl"><span class="kn">import</span> <span
class="nn">org.opengis.referencing.crs.CoordinateReferenceSystem</span><span
class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.opengis.util.FactoryException</span><span class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.apache.sis.referencing.CRS</span><span class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.apache.sis.referencing.CommonCRS</span><span class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.apache.sis.util.Utilities</span><span class="o">;</span>
+</span></span><span class="line"><span class="cl">
+</span></span><span class="line"><span class="cl"><span
class="kd">public</span> <span class="kd">class</span> <span
class="nc">InstantiateUTM</span> <span class="o">{</span>
+</span></span><span class="line"><span class="cl"> <span class="cm">/**
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* Demo entry point.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
*
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* @param args ignored.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* @throws FactoryException if an error occurred while creating the Coordinate
Reference System (CRS).
+</span></span></span><span class="line"><span class="cl"><span class="cm">
*/</span>
+</span></span><span class="line"><span class="cl"> <span
class="kd">public</span> <span class="kd">static</span> <span
class="kt">void</span> <span class="nf">main</span><span
class="o">(</span><span class="n">String</span><span class="o">[]</span> <span
class="n">args</span><span class="o">)</span> <span class="kd">throws</span>
<span class="n">FactoryException</span> <span class="o">{</span>
+</span></span><span class="line"><span class="cl"> <span class="cm">/*
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* Get UTM projection for whatever zone is valid for 40°N 14°E.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
*/</span>
+</span></span><span class="line"><span class="cl"> <span
class="kt">double</span> <span class="n">latitude</span> <span
class="o">=</span> <span class="n">40</span><span class="o">;</span> <span
class="c1">// Will determine the hemisphere.
+</span></span></span><span class="line"><span class="cl"><span
class="c1"></span> <span class="kt">double</span> <span
class="n">longitude</span> <span class="o">=</span> <span
class="n">14</span><span class="o">;</span> <span class="c1">// Will
determine the UTM zone.
+</span></span></span><span class="line"><span class="cl"><span
class="c1"></span> <span class="n">CoordinateReferenceSystem</span>
<span class="n">crsFromPoint</span> <span class="o">=</span> <span
class="n">CommonCRS</span><span class="o">.</span><span
class="na">WGS84</span><span class="o">.</span><span
class="na">universal</span><span class="o">(</span><span
class="n">latitude</span><span class="o">,</span> <span
class="n">longitude</span><span class="o">);</span>
+</span></span><span class="line"><span class="cl"> <span
class="n">CoordinateReferenceSystem</span> <span class="n">crsFromAUTO2</span>
<span class="o">=</span> <span class="n">CRS</span><span
class="o">.</span><span class="na">forCode</span><span class="o">(</span><span
class="s">"AUTO2:42001,1,"</span> <span class="o">+</span> <span
class="n">longitude</span> <span class="o">+</span> <span
class="s">","</span> <span class="o">+</span> <span
class="n">latitude</sp [...]
+</span></span><span class="line"><span class="cl"> <span class="cm">/*
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* Get the UTM projection for a specific zone.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
*/</span>
+</span></span><span class="line"><span class="cl"> <span
class="kt">int</span> <span class="n">zone</span> <span class="o">=</span>
<span class="n">33</span><span class="o">;</span> <span
class="c1">// UTM zone 33.
+</span></span></span><span class="line"><span class="cl"><span
class="c1"></span> <span class="kt">int</span> <span
class="n">code</span> <span class="o">=</span> <span class="n">32600</span>
<span class="o">+</span> <span class="n">zone</span><span class="o">;</span>
<span class="c1">// For WGS84 northern hemisphere
+</span></span></span><span class="line"><span class="cl"><span
class="c1"></span> <span class="n">CoordinateReferenceSystem</span>
<span class="n">crsFromCode</span> <span class="o">=</span> <span
class="n">CRS</span><span class="o">.</span><span
class="na">forCode</span><span class="o">(</span><span
class="s">"EPSG:"</span> <span class="o">+</span> <span
class="n">code</span><span class="o">);</span>
+</span></span><span class="line"><span class="cl"> <span class="cm">/*
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* Compare the results.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
*/</span>
+</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">println</span><span class="o">(</span><span
class="s">"Are the CRS equivalent?"</span><span class="o">);</span>
+</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">println</span><span class="o">(</span><span
class="s">"AUTO2: "</span> <span class="o">+</span> <span
class="n">Utilities</span><span class="o">.</span><span
class="na">equalsIgnoreMetadata</span><span class="o">(</span><span
class="n">crsFromPoint</span><span class="o">,</span> <span class="n">crsFromAU
[...]
+</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">println</span><span class="o">(</span><span
class="s">"EPSG: "</span> <span class="o">+</span> <span
class="n">Utilities</span><span class="o">.</span><span
class="na">equalsIgnoreMetadata</span><span class="o">(</span><span
class="n">crsFromPoint</span><span class="o">,</span> <span class="n">crsFromCo
[...]
+</span></span><span class="line"><span class="cl"> <span class="o">}</span>
+</span></span><span class="line"><span class="cl"><span
class="o">}</span></span></span></code></pre></div>
+<h1 id="output">Output</h1>
+<pre tabindex="0"><code>Are the CRS equivalent?
+AUTO2: true
+EPSG: true
+</code></pre>
+
+ </article>
+ </main>
+ <footer class="footer">
+ <div class="container">
+ <p>
+ Copyright © 2013-2023 The Apache Software Foundation, Licensed
under the
+ <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License,
Version 2.0</a>.<br/>
+ Apache SIS, Apache, the Apache feather logo are trademarks of The
Apache Software Foundation.
+ </p>
+ </div>
+</footer>
+ </div>
+</div>
+
+<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
+
integrity="sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ"
crossorigin="anonymous"></script>
+
+</body>
+</html>
diff --git a/howto/lookup_crs_urn.html b/howto/lookup_crs_urn.html
new file mode 100644
index 00000000..43060363
--- /dev/null
+++ b/howto/lookup_crs_urn.html
@@ -0,0 +1,220 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+
+
+ <title>Apache SIS - Get the EPSG code or URN of an existing CRS</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
+ rel="stylesheet"
integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU"
crossorigin="anonymous">
+ <link rel="stylesheet" type="text/css" media="screen" href="../syntax.css">
+ <link rel="stylesheet" type="text/css" media="screen" href="../sis.css">
+</head>
+
+<body>
+
+<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
+ <div class="container-fluid">
+ <a class="navbar-brand" href="../index.html"> Apache SIS™</a>
+ <ul class="navbar-nav me-auto mb-2 mb-md-0">
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuAbout"
data-bs-toggle="dropdown" aria-expanded="false">About</a>
+ <ul class="dropdown-menu" aria-labelledby="menuAbout">
+ <li><a class="dropdown-item"
href="http://www.apache.org/licenses/">License</a></li>
+ <li><a class="dropdown-item" href="../mail-lists.html">Mailing
Lists</a></li>
+ <li><a class="dropdown-item" href="../team-list.html">Project
Team</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuDownload"
data-bs-toggle="dropdown" aria-expanded="false">Download</a>
+ <ul class="dropdown-menu" aria-labelledby="menuDownload">
+ <li><a class="dropdown-item"
href="../downloads.html">Downloads</a></li>
+ <li><a class="dropdown-item" href="../source.html">Checkout
Sources</a></li>
+ <li><a class="dropdown-item" href="../build.html">Build from
Sources</a></li>
+ <li><a class="dropdown-item" href="../epsg.html">EPSG
Database</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuDocumentation"
data-bs-toggle="dropdown" aria-expanded="false">Documentation</a>
+ <ul class="dropdown-menu" aria-labelledby="menuDocumentation">
+ <li><a class="dropdown-item" href="../apidocs/index.html">Online
Javadoc</a></li>
+ <li><a class="dropdown-item"
href="../book/en/developer-guide.html">Developer Guide</a></li>
+ <li><a class="dropdown-item" href="../howto.html">How to…</a></li>
+ <li><a class="dropdown-item" href="../formats.html">Supported
formats</a></li>
+ <li><a class="dropdown-item"
href="../tables/CoordinateReferenceSystems.html">Supported CRS</a></li>
+ <li><a class="dropdown-item"
href="../tables/CoordinateOperationMethods.html">Map Projections</a></li>
+ <li><a class="dropdown-item" href="../code-patterns.html">Code
Patterns</a></li>
+ <li><a class="dropdown-item" href="../faq.html">FAQ</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuContribute"
data-bs-toggle="dropdown" aria-expanded="false">Contribute</a>
+ <ul class="dropdown-menu" aria-labelledby="menuContribute">
+ <li><a class="dropdown-item" href="../contributor.html">New
Contributor</a></li>
+ <li><a class="dropdown-item"
href="../coding-conventions.html">Coding Conventions</a></li>
+ <li><a class="dropdown-item" href="../mail-lists.html">Mailing
Lists</a></li>
+ <li><a class="dropdown-item"
href="https://issues.apache.org/jira/browse/SIS">Issue Tracker</a></li>
+ <li><a class="dropdown-item"
href="https://github.com/apache/sis">GitHub mirror</a></li>
+ <li><a class="dropdown-item"
href="https://cwiki.apache.org/confluence/display/SIS">Wiki</a></li>
+ <li><hr class="dropdown-divider"></li>
+ <li><a class="dropdown-item"
href="../release-management.html">Release management</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuASF"
data-bs-toggle="dropdown" aria-expanded="false">The Foundation</a>
+ <ul class="dropdown-menu" aria-labelledby="menuASF">
+ <li><a class="dropdown-item" href="http://www.apache.org">The
Foundation</a></li>
+ <li><a class="dropdown-item"
href="http://www.apache.org/foundation/sponsorship.html">Donate</a></li>
+ <li><a class="dropdown-item"
href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+ <li><a class="dropdown-item"
href="http://www.apache.org/security/">Security</a></li>
+ </ul>
+ </li>
+ </ul>
+ <ul class="navbar-nav ml-auto mb-2 mb-md-0">
+ <li class="nav-item">
+ <a href="https://www.apache.org/events/current-event.html">
+ <img class="apache-con"
src="https://www.apache.org/events/current-event-234x60.png" alt="ApacheCon"/>
+ </a>
+ </li>
+ </ul>
+ </div>
+</nav>
+
+
+<div class="row flex-nowrap">
+ <div class="d-flex flex-column flex-shrink-0 p-3 text-white bg-dark"
style="width:13rem; min-height:40rem">
+ <ul class="nav nav-pills flex-column mb-auto position-fixed">
+ <li><a class="nav-link text-white " href="../index.html">Home</a></li>
+ <li><a class="nav-link text-white"
href="http://www.apache.org/licenses/">License</a></li>
+ <li><a class="nav-link text-white "
href="../downloads.html">Downloads</a></li>
+ <li><a class="nav-link active " href="../howto.html">How to…</a></li>
+ <li><a class="nav-link text-white "
href="../standards.html">Standards</a></li>
+ <li><a class="nav-link text-white " href="../formats.html">Data
formats</a></li>
+ <li><a class="nav-link text-white " href="../epsg.html">EPSG
Database</a></li>
+ <li><a class="nav-link text-white " href="../javafx.html">Application
(demo)</a></li>
+ <li><a class="nav-link text-white" href="../apidocs/index.html">Online
Javadoc</a></li>
+ <li><a class="nav-link text-white"
href="../book/en/developer-guide.html">Developer Guide</a></li>
+ <li><a class="nav-link text-white " href="../code-patterns.html">Code
patterns</a></li>
+ <li><a class="nav-link text-white " href="../faq.html">FAQ</a></li>
+ </ul>
+ </div>
+ <div class="col">
+ <main class="container">
+ <article>
+ <img src="../images/logo.png" class="sis-logo" align="left"/>
+ <p class="page-title">Get the EPSG code or URN of an existing CRS</p>
+
+ <p>The <em>identifier</em> of a Coordinate Reference System (CRS) object can
be obtained by the <code>getIdentifiers()</code> method,
+which usually return a collection of zero or one element.
+If the <abbr title="Coordinate Reference System">CRS</abbr> has been created
from a Well Known Text (WKT) parsing
+and the <abbr title="Well Known Text">WKT</abbr> ends with an
<code>AUTHORITY["EPSG", "xxxx"]</code> (<abbr title="Well
Known Text">WKT</abbr> version 1)
+or <code>ID["EPSG", xxxx]</code> (<abbr title="Well Known
Text">WKT</abbr> version 2) element,
+then the identifier (an EPSG numerical code in this example) is the
<em>xxxx</em> value in that element.
+If the <abbr title="Coordinate Reference System">CRS</abbr> has been created
from the EPSG geodetic dataset (for example by a call to
<code>CRS.forCode("EPSG:xxxx")</code>),
+then the identifier is the <em>xxxx</em> code given to that method.
+If the <abbr title="Coordinate Reference System">CRS</abbr> has been created
in another way, then the collection returned by the
<code>getIdentifiers()</code> method
+may or may not be empty depending if the program that created the <abbr
title="Coordinate Reference System">CRS</abbr> took the responsibility of
providing identifiers.</p>
+<p>If the collection of identifiers is empty, the most effective fix is to
make sure that the <abbr title="Well Known Text">WKT</abbr>
+contains an <code>AUTHORITY</code> or <code>ID</code> element (assuming that
the <abbr title="Coordinate Reference System">CRS</abbr> was parsed from a
<abbr title="Well Known Text">WKT</abbr>).
+If this is not possible, then the
<code>org.apache.sis.referencing.IdentifiedObjects</code> class contains some
convenience methods which may help.
+In the following example, the call to <code>lookupEPSG(…)</code> will scan the
EPSG database for a <abbr title="Coordinate Reference System">CRS</abbr> equals
+(ignoring metadata) to the given one. <em>Note that this scan is sensitive to
axis order.</em>
+Most geographic <abbr title="Coordinate Reference System">CRS</abbr> in the
EPSG database are declared with (<em>latitude</em>, <em>longitude</em>) axis
order.
+Consequently if the given <abbr title="Coordinate Reference System">CRS</abbr>
has (<em>longitude</em>, <em>latitude</em>) axis order, then the scan is likely
to find no match.</p>
+<h1 id="direct-dependencies">Direct dependencies</h1>
+<table>
+<thead>
+<tr>
+<th>Maven coordinates</th>
+<th>Module info</th>
+<th>Remarks</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td><code>org.apache.sis.storage:sis-referencing</code></td>
+<td><code>org.apache.sis.referencing</code></td>
+<td></td>
+</tr>
+<tr>
+<td><code>org.apache.sis.non-free:sis-embedded-data</code></td>
+<td><code>org.apache.sis.referencing.database</code></td>
+<td>Optional. Non-Apache license.</td>
+</tr>
+</tbody>
+</table>
+<p>The <a href="../epsg.html">EPSG dependency</a> is not needed if the <abbr
title="Well Known Text">WKT</abbr> string declares an <code>AUTHORITY</code>
element.
+But it is required if the <code>AUTHORITY</code> element is absent and Apache
<abbr title="Spatial Information System">SIS</abbr> needs to scan the EPSG
database
+for finding its value.</p>
+<h1 id="code-example">Code example</h1>
+<div class="highlight"><pre tabindex="0" class="chroma"><code
class="language-java" data-lang="java"><span class="line"><span
class="cl"><span class="kn">import</span> <span
class="nn">org.opengis.referencing.crs.CoordinateReferenceSystem</span><span
class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.opengis.util.FactoryException</span><span class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.apache.sis.referencing.CRS</span><span class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.apache.sis.referencing.IdentifiedObjects</span><span
class="o">;</span>
+</span></span><span class="line"><span class="cl">
+</span></span><span class="line"><span class="cl"><span
class="kd">public</span> <span class="kd">class</span> <span
class="nc">LookupAuthorityCode</span> <span class="o">{</span>
+</span></span><span class="line"><span class="cl"> <span class="cm">/**
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* Demo entry point.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
*
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* @param args ignored.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* @throws FactoryException if an error occurred while creating the CRS or
searching in EPSG database.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
*/</span>
+</span></span><span class="line"><span class="cl"> <span
class="kd">public</span> <span class="kd">static</span> <span
class="kt">void</span> <span class="nf">main</span><span
class="o">(</span><span class="n">String</span><span class="o">[]</span> <span
class="n">args</span><span class="o">)</span> <span class="kd">throws</span>
<span class="n">FactoryException</span> <span class="o">{</span>
+</span></span><span class="line"><span class="cl"> <span
class="n">CoordinateReferenceSystem</span> <span class="n">crs</span> <span
class="o">=</span> <span class="n">CRS</span><span class="o">.</span><span
class="na">fromWKT</span><span class="o">(</span>
+</span></span><span class="line"><span class="cl"> <span
class="s">"""
+</span></span></span><span class="line"><span class="cl"><span class="s">
PROJCRS["</span><span class="n">NTF</span> <span class="o">(</span><span
class="n">Paris</span><span class="o">)</span> <span class="o">/</span> <span
class="n">zone</span> <span class="n">to</span> <span class="n">be</span> <span
class="n">discovered</span> <span class="n">by</span> <span
class="n">the</span> <span class="n">demo</span><span class="s">",
+</span></span></span><span class="line"><span class="cl"><span class="s">
BASEGEODCRS["</span><span class="n">NTF</span> <span
class="o">(</span><span class="n">Paris</span><span class="o">)</span><span
class="s">",
+</span></span></span><span class="line"><span class="cl"><span class="s">
DATUM["</span><span class="n">Nouvelle</span> <span
class="n">Triangulation</span> <span class="n">Francaise</span><span
class="s">",
+</span></span></span><span class="line"><span class="cl"><span class="s">
ELLIPSOID["</span><span class="n">Clarke</span> <span
class="nf">1880</span> <span class="o">(</span><span class="n">IGN</span><span
class="o">)</span><span class="s">", 6378249.2, 293.4660212936269]],
+</span></span></span><span class="line"><span class="cl"><span class="s">
PRIMEM["</span><span class="n">Paris</span><span class="s">",
2.5969213],
+</span></span></span><span class="line"><span class="cl"><span class="s">
UNIT["</span><span class="n">grade</span><span class="s">",
0.015707963267948967]],
+</span></span></span><span class="line"><span class="cl"><span class="s">
CONVERSION["</span><span class="n">Lambert</span> <span
class="n">zone</span> <span class="n">II</span><span class="s">",
+</span></span></span><span class="line"><span class="cl"><span class="s">
METHOD["</span><span class="n">Lambert</span> <span
class="n">Conic</span> <span class="nf">Conformal</span> <span
class="o">(</span><span class="n">1SP</span><span class="o">)</span><span
class="s">"],
+</span></span></span><span class="line"><span class="cl"><span class="s">
PARAMETER["</span><span class="n">Latitude</span> <span
class="n">of</span> <span class="n">natural</span> <span
class="n">origin</span><span class="s">", 52.0],
+</span></span></span><span class="line"><span class="cl"><span class="s">
PARAMETER["</span><span class="n">Longitude</span> <span
class="n">of</span> <span class="n">natural</span> <span
class="n">origin</span><span class="s">", 0.0],
+</span></span></span><span class="line"><span class="cl"><span class="s">
PARAMETER["</span><span class="n">Scale</span> <span
class="n">factor</span> <span class="n">at</span> <span
class="n">natural</span> <span class="n">origin</span><span class="s">",
0.99987742],
+</span></span></span><span class="line"><span class="cl"><span class="s">
PARAMETER["</span><span class="n">False</span> <span
class="n">easting</span><span class="s">", 600000.0],
+</span></span></span><span class="line"><span class="cl"><span class="s">
PARAMETER["</span><span class="n">False</span> <span
class="n">northing</span><span class="s">", 2200000.0]],
+</span></span></span><span class="line"><span class="cl"><span class="s">
CS[Cartesian, 2],
+</span></span></span><span class="line"><span class="cl"><span class="s">
AXIS["</span><span class="n">Easting</span> <span
class="o">(</span><span class="n">E</span><span class="o">)</span><span
class="s">", east],
+</span></span></span><span class="line"><span class="cl"><span class="s">
AXIS["</span><span class="n">Northing</span> <span
class="o">(</span><span class="n">N</span><span class="o">)</span><span
class="s">", north],
+</span></span></span><span class="line"><span class="cl"><span class="s">
LENGTHUNIT["</span><span class="n">metre</span><span class="s">",
1],
+</span></span></span><span class="line"><span class="cl"><span class="s">
REMARK["</span><span class="n">EPSG</span><span class="o">:</span><span
class="n">27572</span> <span class="n">identifier</span> <span
class="n">intentionally</span> <span class="n">omitted</span><span
class="o">.</span><span class="s">"]]
+</span></span></span><span class="line"><span class="cl"><span class="s">
"""</span><span class="o">);</span>
+</span></span><span class="line"><span class="cl">
+</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">println</span><span class="o">(</span><span
class="s">"Identifier declared in the CRS: "</span>
+</span></span><span class="line"><span class="cl"> <span
class="o">+</span> <span class="n">IdentifiedObjects</span><span
class="o">.</span><span class="na">getIdentifier</span><span
class="o">(</span><span class="n">crs</span><span class="o">,</span> <span
class="kc">null</span><span class="o">));</span>
+</span></span><span class="line"><span class="cl">
+</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">println</span><span class="o">(</span><span
class="s">"Searching in EPSG database: "</span>
+</span></span><span class="line"><span class="cl"> <span
class="o">+</span> <span class="n">IdentifiedObjects</span><span
class="o">.</span><span class="na">lookupEPSG</span><span
class="o">(</span><span class="n">crs</span><span class="o">));</span>
+</span></span><span class="line"><span class="cl">
+</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">println</span><span class="o">(</span><span
class="s">"Same, but more generic: "</span>
+</span></span><span class="line"><span class="cl"> <span
class="o">+</span> <span class="n">IdentifiedObjects</span><span
class="o">.</span><span class="na">lookupURN</span><span
class="o">(</span><span class="n">crs</span><span class="o">,</span> <span
class="kc">null</span><span class="o">));</span>
+</span></span><span class="line"><span class="cl"> <span class="o">}</span>
+</span></span><span class="line"><span class="cl"><span
class="o">}</span></span></span></code></pre></div>
+<h1 id="output">Output</h1>
+<pre tabindex="0"><code>Identifier declared in the CRS: null
+Searching in EPSG database: 27572
+Same, but more generic: urn:ogc:def:crs:EPSG:9.9.1:27572
+</code></pre>
+
+ </article>
+ </main>
+ <footer class="footer">
+ <div class="container">
+ <p>
+ Copyright © 2013-2023 The Apache Software Foundation, Licensed
under the
+ <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License,
Version 2.0</a>.<br/>
+ Apache SIS, Apache, the Apache feather logo are trademarks of The
Apache Software Foundation.
+ </p>
+ </div>
+</footer>
+ </div>
+</div>
+
+<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
+
integrity="sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ"
crossorigin="anonymous"></script>
+
+</body>
+</html>
diff --git a/howto/raster_values_at_geographic_coordinates.html
b/howto/raster_values_at_geographic_coordinates.html
index 1c5ccd55..5455cd19 100644
--- a/howto/raster_values_at_geographic_coordinates.html
+++ b/howto/raster_values_at_geographic_coordinates.html
@@ -145,10 +145,10 @@ the <code>GridCoverageResource</code> interface instead
of <code>Aggregate</code
<p>The <code>cdm-core</code> dependency can be omitted for netCDF-3 (a.k.a.
“classic”),
GeoTIFF or any other <a href="../formats.html">formats supported by Apache
SIS</a>.
For the dependencies required for reading GeoTIFF instead of netCDF files,
-see the <a href="rasters_bigger_than_memory.html">rasters bigger than
memory</a> snippet.</p>
-<h1 id="code-snippet">Code snippet</h1>
+see the <a href="rasters_bigger_than_memory.html">rasters bigger than
memory</a> code example.</p>
+<h1 id="code-example">Code example</h1>
<p>The file name, resource name and geographic coordinates
-in following snippet need to be updated for yours data.</p>
+in following code need to be updated for yours data.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code
class="language-java" data-lang="java"><span class="line"><span
class="cl"><span class="kn">import</span> <span
class="nn">java.io.File</span><span class="o">;</span>
</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span class="nn">java.util.Map</span><span
class="o">;</span>
</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span class="nn">javax.measure.Unit</span><span
class="o">;</span>
diff --git a/howto/rasters_bigger_than_memory.html
b/howto/rasters_bigger_than_memory.html
index 4cd710c6..4aeeea55 100644
--- a/howto/rasters_bigger_than_memory.html
+++ b/howto/rasters_bigger_than_memory.html
@@ -115,7 +115,7 @@ It integrates well with operations provided by Apache <abbr
title="Spatial Infor
<a href="raster_values_at_geographic_coordinates.html">getting values at
geographic coordinates</a>.</p>
<p>The example in this page works with pixel coordinates.
For working with geographic coordinates, see
-<a href="raster_values_at_geographic_coordinates.html">values at geographic
coordinates</a> snippet.</p>
+<a href="raster_values_at_geographic_coordinates.html">values at geographic
coordinates</a> code example.</p>
<h1 id="direct-dependencies">Direct dependencies</h1>
<table>
<thead>
@@ -140,8 +140,8 @@ For working with geographic coordinates, see
</table>
<p>The <a href="../epsg.html">EPSG dependency</a> may or may not be needed,
depending how the Coordinate Reference System (CRS) is encoded in the GeoTIFF
file.</p>
-<h1 id="code-snippet">Code snippet</h1>
-<p>The file name in following snippet need to be updated for yours data.</p>
+<h1 id="code-example">Code example</h1>
+<p>The file name in following code need to be updated for yours data.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code
class="language-java" data-lang="java"><span class="line"><span
class="cl"><span class="kn">import</span> <span
class="nn">java.io.File</span><span class="o">;</span>
</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span class="nn">java.util.Collection</span><span
class="o">;</span>
</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span class="nn">java.awt.Rectangle</span><span
class="o">;</span>
diff --git a/howto/resample_and_save_raster.html
b/howto/resample_and_save_raster.html
index b67393a5..b3cd378f 100644
--- a/howto/resample_and_save_raster.html
+++ b/howto/resample_and_save_raster.html
@@ -134,10 +134,13 @@ The result is saved as a World File in PNG format.</p>
because a Coordinate Reference System (CRS) is instantiated from its EPSG code.
But it would also be possible to specify a CRS without EPSG code,
for example using Well Known Text (WKT) format.</p>
-<h1 id="code-snippet">Code snippet</h1>
-<p>The file name in following snippet need to be updated for yours data.</p>
-<div class="highlight"><pre tabindex="0" class="chroma"><code
class="language-java" data-lang="java"><span class="line"><span
class="cl"><span class="kn">import</span> <span
class="nn">java.nio.file.Paths</span><span class="o">;</span>
+<h1 id="code-example">Code example</h1>
+<p>The file name in following code need to be updated for yours data.</p>
+<div class="highlight"><pre tabindex="0" class="chroma"><code
class="language-java" data-lang="java"><span class="line"><span
class="cl"><span class="kn">import</span> <span
class="nn">java.io.File</span><span class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span class="nn">java.io.IOException</span><span
class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span class="nn">java.nio.file.Paths</span><span
class="o">;</span>
</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span class="nn">java.util.Collection</span><span
class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span class="nn">javax.imageio.ImageIO</span><span
class="o">;</span>
</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">java.awt.image.ImagingOpException</span><span class="o">;</span>
</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.apache.sis.storage.Resource</span><span class="o">;</span>
</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.apache.sis.storage.Aggregate</span><span class="o">;</span>
@@ -162,7 +165,7 @@ for example using Well Known Text (WKT) format.</p>
</span></span></span><span class="line"><span class="cl"><span class="cm">
* @throws TransformException if an error occurred while transforming
coordinates to the target CRS.
</span></span></span><span class="line"><span class="cl"><span class="cm">
* @throws ImagingOpException unchecked exception thrown if an error occurred
while resampling a tile.
</span></span></span><span class="line"><span class="cl"><span class="cm">
*/</span>
-</span></span><span class="line"><span class="cl"> <span
class="kd">public</span> <span class="kd">static</span> <span
class="kt">void</span> <span class="nf">main</span><span
class="o">(</span><span class="n">String</span><span class="o">[]</span> <span
class="n">args</span><span class="o">)</span> <span class="kd">throws</span>
<span class="n">DataStoreException</span><span class="o">,</span> <span
class="n">FactoryException</span><span class="o">,</span> <span
class="n">TransformEx [...]
+</span></span><span class="line"><span class="cl"> <span
class="kd">public</span> <span class="kd">static</span> <span
class="kt">void</span> <span class="nf">main</span><span
class="o">(</span><span class="n">String</span><span class="o">[]</span> <span
class="n">args</span><span class="o">)</span> <span class="kd">throws</span>
<span class="n">DataStoreException</span><span class="o">,</span> <span
class="n">FactoryException</span><span class="o">,</span> <span
class="n">TransformEx [...]
</span></span><span class="line"><span class="cl"> <span
class="k">try</span> <span class="o">(</span><span class="n">DataStore</span>
<span class="n">store</span> <span class="o">=</span> <span
class="n">DataStores</span><span class="o">.</span><span
class="na">open</span><span class="o">(</span><span class="n">Paths</span><span
class="o">.</span><span class="na">get</span><span class="o">(</span><span
class="s">"Airport.tiff"</span><span class="o">)))</span> <span class=
[...]
</span></span><span class="line"><span class="cl"> <span
class="cm">/*
</span></span></span><span class="line"><span class="cl"><span class="cm">
* This data store is an aggregate because a GeoTIFF file may contain
many images.
@@ -188,10 +191,12 @@ for example using Well Known Text (WKT) format.</p>
</span></span><span class="line"><span class="cl"> <span
class="n">data</span> <span class="o">=</span> <span
class="n">processor</span><span class="o">.</span><span
class="na">resample</span><span class="o">(</span><span
class="n">data</span><span class="o">,</span> <span class="n">CRS</span><span
class="o">.</span><span class="na">forCode</span><span class="o">(</span><span
class="s">"EPSG::3395"</span><span class="o">));</span>
</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">printf</span><span class="o">(</span><span
class="s">"Information about the image after
reprojection:%n%s%n"</span><span class="o">,</span> <span
class="n">data</span><span class="o">);</span>
</span></span><span class="line"><span class="cl"> <span
class="cm">/*
-</span></span></span><span class="line"><span class="cl"><span class="cm">
* TODO: Apache SIS is missing an `DataStores.write(…)` convenience
method.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* TODO: Apache SIS is missing a `DataStores.write(…)` convenience
method.
</span></span></span><span class="line"><span class="cl"><span class="cm">
* Writing a TIFF World File is possible but requires use of internal
API.
</span></span></span><span class="line"><span class="cl"><span class="cm">
* A public convenience method will be added in next version.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* For now we use Java I/O API.
</span></span></span><span class="line"><span class="cl"><span class="cm">
*/</span>
+</span></span><span class="line"><span class="cl"> <span
class="n">ImageIO</span><span class="o">.</span><span
class="na">write</span><span class="o">(</span><span class="n">data</span><span
class="o">.</span><span class="na">render</span><span class="o">(</span><span
class="kc">null</span><span class="o">),</span> <span
class="s">"png"</span><span class="o">,</span> <span
class="k">new</span> <span class="n">File</span><span class="o">(</span><span
class="s">"test [...]
</span></span><span class="line"><span class="cl"> <span
class="o">}</span>
</span></span><span class="line"><span class="cl"> <span class="o">}</span>
</span></span><span class="line"><span class="cl"><span
class="o">}</span></span></span></code></pre></div>
diff --git a/howto/transform_coordinates.html b/howto/transform_coordinates.html
new file mode 100644
index 00000000..442ef1e3
--- /dev/null
+++ b/howto/transform_coordinates.html
@@ -0,0 +1,210 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+
+
+ <title>Apache SIS - Transform coordinates</title>
+ <meta charset="utf-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
+ rel="stylesheet"
integrity="sha384-F3w7mX95PdgyTmZZMECAngseQB83DfGTowi0iMjiWaeVhAn4FJkqJByhZMI3AhiU"
crossorigin="anonymous">
+ <link rel="stylesheet" type="text/css" media="screen" href="../syntax.css">
+ <link rel="stylesheet" type="text/css" media="screen" href="../sis.css">
+</head>
+
+<body>
+
+<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
+ <div class="container-fluid">
+ <a class="navbar-brand" href="../index.html"> Apache SIS™</a>
+ <ul class="navbar-nav me-auto mb-2 mb-md-0">
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuAbout"
data-bs-toggle="dropdown" aria-expanded="false">About</a>
+ <ul class="dropdown-menu" aria-labelledby="menuAbout">
+ <li><a class="dropdown-item"
href="http://www.apache.org/licenses/">License</a></li>
+ <li><a class="dropdown-item" href="../mail-lists.html">Mailing
Lists</a></li>
+ <li><a class="dropdown-item" href="../team-list.html">Project
Team</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuDownload"
data-bs-toggle="dropdown" aria-expanded="false">Download</a>
+ <ul class="dropdown-menu" aria-labelledby="menuDownload">
+ <li><a class="dropdown-item"
href="../downloads.html">Downloads</a></li>
+ <li><a class="dropdown-item" href="../source.html">Checkout
Sources</a></li>
+ <li><a class="dropdown-item" href="../build.html">Build from
Sources</a></li>
+ <li><a class="dropdown-item" href="../epsg.html">EPSG
Database</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuDocumentation"
data-bs-toggle="dropdown" aria-expanded="false">Documentation</a>
+ <ul class="dropdown-menu" aria-labelledby="menuDocumentation">
+ <li><a class="dropdown-item" href="../apidocs/index.html">Online
Javadoc</a></li>
+ <li><a class="dropdown-item"
href="../book/en/developer-guide.html">Developer Guide</a></li>
+ <li><a class="dropdown-item" href="../howto.html">How to…</a></li>
+ <li><a class="dropdown-item" href="../formats.html">Supported
formats</a></li>
+ <li><a class="dropdown-item"
href="../tables/CoordinateReferenceSystems.html">Supported CRS</a></li>
+ <li><a class="dropdown-item"
href="../tables/CoordinateOperationMethods.html">Map Projections</a></li>
+ <li><a class="dropdown-item" href="../code-patterns.html">Code
Patterns</a></li>
+ <li><a class="dropdown-item" href="../faq.html">FAQ</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuContribute"
data-bs-toggle="dropdown" aria-expanded="false">Contribute</a>
+ <ul class="dropdown-menu" aria-labelledby="menuContribute">
+ <li><a class="dropdown-item" href="../contributor.html">New
Contributor</a></li>
+ <li><a class="dropdown-item"
href="../coding-conventions.html">Coding Conventions</a></li>
+ <li><a class="dropdown-item" href="../mail-lists.html">Mailing
Lists</a></li>
+ <li><a class="dropdown-item"
href="https://issues.apache.org/jira/browse/SIS">Issue Tracker</a></li>
+ <li><a class="dropdown-item"
href="https://github.com/apache/sis">GitHub mirror</a></li>
+ <li><a class="dropdown-item"
href="https://cwiki.apache.org/confluence/display/SIS">Wiki</a></li>
+ <li><hr class="dropdown-divider"></li>
+ <li><a class="dropdown-item"
href="../release-management.html">Release management</a></li>
+ </ul>
+ </li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" id="menuASF"
data-bs-toggle="dropdown" aria-expanded="false">The Foundation</a>
+ <ul class="dropdown-menu" aria-labelledby="menuASF">
+ <li><a class="dropdown-item" href="http://www.apache.org">The
Foundation</a></li>
+ <li><a class="dropdown-item"
href="http://www.apache.org/foundation/sponsorship.html">Donate</a></li>
+ <li><a class="dropdown-item"
href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+ <li><a class="dropdown-item"
href="http://www.apache.org/security/">Security</a></li>
+ </ul>
+ </li>
+ </ul>
+ <ul class="navbar-nav ml-auto mb-2 mb-md-0">
+ <li class="nav-item">
+ <a href="https://www.apache.org/events/current-event.html">
+ <img class="apache-con"
src="https://www.apache.org/events/current-event-234x60.png" alt="ApacheCon"/>
+ </a>
+ </li>
+ </ul>
+ </div>
+</nav>
+
+
+<div class="row flex-nowrap">
+ <div class="d-flex flex-column flex-shrink-0 p-3 text-white bg-dark"
style="width:13rem; min-height:40rem">
+ <ul class="nav nav-pills flex-column mb-auto position-fixed">
+ <li><a class="nav-link text-white " href="../index.html">Home</a></li>
+ <li><a class="nav-link text-white"
href="http://www.apache.org/licenses/">License</a></li>
+ <li><a class="nav-link text-white "
href="../downloads.html">Downloads</a></li>
+ <li><a class="nav-link active " href="../howto.html">How to…</a></li>
+ <li><a class="nav-link text-white "
href="../standards.html">Standards</a></li>
+ <li><a class="nav-link text-white " href="../formats.html">Data
formats</a></li>
+ <li><a class="nav-link text-white " href="../epsg.html">EPSG
Database</a></li>
+ <li><a class="nav-link text-white " href="../javafx.html">Application
(demo)</a></li>
+ <li><a class="nav-link text-white" href="../apidocs/index.html">Online
Javadoc</a></li>
+ <li><a class="nav-link text-white"
href="../book/en/developer-guide.html">Developer Guide</a></li>
+ <li><a class="nav-link text-white " href="../code-patterns.html">Code
patterns</a></li>
+ <li><a class="nav-link text-white " href="../faq.html">FAQ</a></li>
+ </ul>
+ </div>
+ <div class="col">
+ <main class="container">
+ <article>
+ <img src="../images/logo.png" class="sis-logo" align="left"/>
+ <p class="page-title">Transform coordinates</p>
+
+ <p>The following Java code projects geographic coordinates from the
<em>World Geodetic System 1984</em> (WGS84) to <em>WGS 84 / UTM zone 33N</em>.
+In order to make the example a little bit simpler, this code uses predefined
constants given by the <code>CommonCRS</code> convenience class.
+But more advanced applications may use <a href="../epsg.html">EPSG codes</a>
or definitions in Well-Known Text (WKT) instead.</p>
+<p><strong>Note:</strong> if the result of a coordinate transformation seems
wrong, see the <a href="../faq.html">FAQ</a> page.
+Unexpected results are often caused by wrong axis order.</p>
+<h1 id="direct-dependencies">Direct dependencies</h1>
+<table>
+<thead>
+<tr>
+<th>Maven coordinates</th>
+<th>Module info</th>
+<th>Remarks</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td><code>org.apache.sis.storage:sis-referencing</code></td>
+<td><code>org.apache.sis.referencing</code></td>
+<td></td>
+</tr>
+<tr>
+<td><code>org.apache.sis.non-free:sis-embedded-data</code></td>
+<td><code>org.apache.sis.referencing.database</code></td>
+<td>Optional. Non-Apache license.</td>
+</tr>
+</tbody>
+</table>
+<p>The <a href="../epsg.html">EPSG dependency</a> is optional for this example.
+But if present, the Coordinate Reference Systems will have more metadata.
+Consequently, coordinate transformation results between some pairs of
reference systems
+may be different depending on whether the EPSG dataset is present or not.
+In general, results are more accurate and/or more reliable in presence of EPSG
dataset.</p>
+<h1 id="code-example">Code example</h1>
+<p>Note that all geographic coordinates below express latitude <em>before</em>
longitude.</p>
+<div class="highlight"><pre tabindex="0" class="chroma"><code
class="language-java" data-lang="java"><span class="line"><span
class="cl"><span class="kn">import</span> <span
class="nn">org.opengis.geometry.DirectPosition</span><span class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.opengis.referencing.crs.CoordinateReferenceSystem</span><span
class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.opengis.referencing.operation.CoordinateOperation</span><span
class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.opengis.referencing.operation.TransformException</span><span
class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.opengis.util.FactoryException</span><span class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.apache.sis.referencing.CRS</span><span class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.apache.sis.referencing.CommonCRS</span><span class="o">;</span>
+</span></span><span class="line"><span class="cl"><span
class="kn">import</span> <span
class="nn">org.apache.sis.geometry.DirectPosition2D</span><span
class="o">;</span>
+</span></span><span class="line"><span class="cl">
+</span></span><span class="line"><span class="cl"><span
class="kd">public</span> <span class="kd">class</span> <span
class="nc">TransformCoordinates</span> <span class="o">{</span>
+</span></span><span class="line"><span class="cl"> <span class="cm">/**
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* Demo entry point.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
*
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* @param args ignored.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* @throws FactoryException if an error occurred while creating the Coordinate
Reference System (CRS).
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* @throws TransformException if an error occurred while transforming
coordinates to the target CRS.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
*/</span>
+</span></span><span class="line"><span class="cl"> <span
class="kd">public</span> <span class="kd">static</span> <span
class="kt">void</span> <span class="nf">main</span><span
class="o">(</span><span class="n">String</span><span class="o">[]</span> <span
class="n">args</span><span class="o">)</span> <span class="kd">throws</span>
<span class="n">FactoryException</span><span class="o">,</span> <span
class="n">TransformException</span> <span class="o">{</span>
+</span></span><span class="line"><span class="cl"> <span
class="n">CoordinateReferenceSystem</span> <span class="n">sourceCRS</span>
<span class="o">=</span> <span class="n">CommonCRS</span><span
class="o">.</span><span class="na">WGS84</span><span class="o">.</span><span
class="na">geographic</span><span class="o">();</span>
+</span></span><span class="line"><span class="cl"> <span
class="n">CoordinateReferenceSystem</span> <span class="n">targetCRS</span>
<span class="o">=</span> <span class="n">CommonCRS</span><span
class="o">.</span><span class="na">WGS84</span><span class="o">.</span><span
class="na">universal</span><span class="o">(</span><span
class="n">40</span><span class="o">,</span> <span class="n">14</span><span
class="o">);</span> <span class="c1">// UTM zone for 40°N 14°E.
+</span></span></span><span class="line"><span class="cl"><span
class="c1"></span> <span class="n">CoordinateOperation</span> <span
class="n">operation</span> <span class="o">=</span> <span
class="n">CRS</span><span class="o">.</span><span
class="na">findOperation</span><span class="o">(</span><span
class="n">sourceCRS</span><span class="o">,</span> <span
class="n">targetCRS</span><span class="o">,</span> <span
class="kc">null</span><span class="o">);</span>
+</span></span><span class="line"><span class="cl"> <span class="cm">/*
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* The above lines are costly and should be performed only once before to
project many points.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* In this example, the operation that we got is valid for coordinates in
geographic area from
+</span></span></span><span class="line"><span class="cl"><span class="cm">
* 12°E to 18°E (UTM zone 33) and 0°N to 84°N.
+</span></span></span><span class="line"><span class="cl"><span class="cm">
*/</span>
+</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">println</span><span class="o">(</span><span
class="s">"Domain of validity:"</span><span class="o">);</span>
+</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">println</span><span class="o">(</span><span
class="n">CRS</span><span class="o">.</span><span
class="na">getGeographicBoundingBox</span><span class="o">(</span><span
class="n">operation</span><span class="o">));</span>
+</span></span><span class="line"><span class="cl">
+</span></span><span class="line"><span class="cl"> <span
class="n">DirectPosition</span> <span class="n">ptSrc</span> <span
class="o">=</span> <span class="k">new</span> <span
class="n">DirectPosition2D</span><span class="o">(</span><span
class="n">40</span><span class="o">,</span> <span class="n">14</span><span
class="o">);</span> <span class="c1">// 40°N 14°E
+</span></span></span><span class="line"><span class="cl"><span
class="c1"></span> <span class="n">DirectPosition</span> <span
class="n">ptDst</span> <span class="o">=</span> <span
class="n">operation</span><span class="o">.</span><span
class="na">getMathTransform</span><span class="o">().</span><span
class="na">transform</span><span class="o">(</span><span
class="n">ptSrc</span><span class="o">,</span> <span
class="kc">null</span><span class="o">);</span>
+</span></span><span class="line"><span class="cl">
+</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">println</span><span class="o">(</span><span
class="s">"Source: "</span> <span class="o">+</span> <span
class="n">ptSrc</span><span class="o">);</span>
+</span></span><span class="line"><span class="cl"> <span
class="n">System</span><span class="o">.</span><span class="na">out</span><span
class="o">.</span><span class="na">println</span><span class="o">(</span><span
class="s">"Target: "</span> <span class="o">+</span> <span
class="n">ptDst</span><span class="o">);</span>
+</span></span><span class="line"><span class="cl"> <span class="o">}</span>
+</span></span><span class="line"><span class="cl"><span
class="o">}</span></span></span></code></pre></div>
+<h1 id="output">Output</h1>
+<p>Note: for some pairs of Coordinate Reference Systems,
+the output may vary depending on whether the <a href="../epsg.html">EPSG
geodetic dataset</a> is present or not.</p>
+<pre tabindex="0"><code>Domain of validity:
+Geographic bounding box
+ ├─West bound longitude…… 12°E
+ ├─East bound longitude…… 18°E
+ ├─South bound latitude…… 0°N
+ └─North bound latitude…… 84°N
+
+Source: POINT(40 14)
+Target: POINT(414639.5381572213 4428236.064633072)
+</code></pre>
+
+ </article>
+ </main>
+ <footer class="footer">
+ <div class="container">
+ <p>
+ Copyright © 2013-2023 The Apache Software Foundation, Licensed
under the
+ <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License,
Version 2.0</a>.<br/>
+ Apache SIS, Apache, the Apache feather logo are trademarks of The
Apache Software Foundation.
+ </p>
+ </div>
+</footer>
+ </div>
+</div>
+
+<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
+
integrity="sha384-/bQdsTh/da6pkI1MST/rWKFNjaCP5gBSY4sEBT38Q/9RBh9AH40zEOg7Hlq2THRZ"
crossorigin="anonymous"></script>
+
+</body>
+</html>
diff --git a/index.xml b/index.xml
index e835b974..cefd1700 100644
--- a/index.xml
+++ b/index.xml
@@ -67,6 +67,16 @@ mvn install The JavaFX application is excluded by default
because it depends on
Format Capability Type of resource CSV Read FeatureSet ESRI ASCII Grid
Read/write GridCoverageResource ESRI BIL/BIQ/BSQ Read GridCoverageResource
Folder Read/write Aggregate, FeatureSet, GridCoverageResource (Big) GeoTIFF
Read Aggregate, GridCoverageResource GML (CRS only) Read/write⁽¹⁾ Resource
GPX Read/write FeatureSet ISO 19115 XML Read/write⁽¹⁾ Resource Landsat Read
Aggregate, GridCoverageResource NetCDF Read Aggregate, FeatureSet,
GridCoverageResource SQL⁽²⁾ Read Aggreg [...]
</item>
+ <item>
+ <title>Determine if two CRS are functionally equal</title>
+ <link>https://sis.apache.org/howto/crs_equality.html</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://sis.apache.org/howto/crs_equality.html</guid>
+ <description>Two Coordinate Reference Systems may not be considered
equal if they are associated to different metadata (name, identifiers, scope,
domain of validity, remarks), even though they represent the same logical CRS.
In order to test if two CRS are functionally equivalent,
Utilities.equalsIgnoreMetadata(myFirstCRS, mySecondCRS) can be used.
+In some cases, equalsIgnoreMetadata(…) may fail to see that two reference
systems are equal. It may happen for example when two map projections are
defined with different parameters, but are mathematically
equivalent.</description>
+ </item>
+
<item>
<title>Frequently asked questions</title>
<link>https://sis.apache.org/faq.html</link>
@@ -74,7 +84,7 @@ mvn install The JavaFX application is excluded by default
because it depends on
<guid>https://sis.apache.org/faq.html</guid>
<description>This page lists some Frequently Asked Questions (FAQ) when
using Apache SIS.
- Referencing Getting started How do I transform a coordinate? Which map
projections are supported? What is the axis order issue and how is it
addressed? Coordinate Reference Systems How do I instantiate a Universal
Transverse Mercator (UTM) projection? How do I instantiate a Google
projection? How can I identify the projection kind of a CRS?</description>
+ Referencing Getting started How do I get a Coordinate Reference System?
How do I transform a coordinate? Which map projections are supported?
Coordinate Reference Systems What is the Google projection? What is the axis
order issue and how is it addressed? Is IdentifiedObjects.lookupEPSG(…) a
reliable inverse of CRS.</description>
</item>
<item>
@@ -87,6 +97,15 @@ mvn install The JavaFX application is excluded by default
because it depends on
This example uses data in netCDF format. A netCDF file can contain an
arbitrary amount of variables.</description>
</item>
+ <item>
+ <title>Get the EPSG code or URN of an existing CRS</title>
+ <link>https://sis.apache.org/howto/lookup_crs_urn.html</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://sis.apache.org/howto/lookup_crs_urn.html</guid>
+ <description>The identifier of a Coordinate Reference System (CRS)
object can be obtained by the getIdentifiers() method, which usually return a
collection of zero or one element. If the CRS has been created from a Well
Known Text (WKT) parsing and the WKT ends with an
AUTHORITY[&quot;EPSG&quot;, &quot;xxxx&quot;] (WKT version 1)
or ID[&quot;EPSG&quot;, xxxx] (WKT version 2) element, then the
identifier (an EPSG numerical code in this example) is the xxxx va [...]
+ </item>
+
<item>
<title>Handle rasters bigger than memory</title>
<link>https://sis.apache.org/howto/rasters_bigger_than_memory.html</link>
@@ -105,6 +124,16 @@ This example uses data in netCDF format. A netCDF file can
contain an arbitrary
<description>The EPSG geodetic dataset is a de-facto standard providing
thousands of Coordinate Reference System (CRS) definitions together with
information about how to perform coordinate operations, their accuracies and
their domains of validity. The EPSG dataset is owned and maintained by the
International Association of Oil &amp; Gas producers. Usage of EPSG dataset
with Apache SIS is optional but strongly recommended: without that geodetic
dataset, only a small subset of C [...]
</item>
+ <item>
+ <title>Instantiate a UTM projection</title>
+ <link>https://sis.apache.org/howto/instantiate_utm_projection.html</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://sis.apache.org/howto/instantiate_utm_projection.html</guid>
+ <description>The Universal Transverse Mercator (UTM) projection divides
the world in 60 zones. If the UTM zone is unknown, an easy way to instantiate
the projection is to invoke the universal(…) method on one of the CommonCRS
predefined constants. That method receives in argument a geographic coordinate
in (latitude, longitude) order and computes the UTM zone from it. It takes in
account the special cases of Norway and Svalbard.
+An alternative, more standard, way using geographic coordinates is to format
an &ldquo;AUTO&rdquo; authority code.</description>
+ </item>
+
<item>
<title>JavaFX application</title>
<link>https://sis.apache.org/javafx.html</link>
@@ -327,5 +356,15 @@ Incompatible changes The following changes in Apache SIS
1.3 are incompatibles
<description>Apache SIS implements the following standards from the Open
Geospatial Consortium (OGC), the International Organization for Standardization
(ISO) or the Java Community Process (JCP). The same standard is sometimes
published jointly by both OGC and ISO organizations. Links to free versions of
the standards are given when available. The Upgrade needed column indicates
that a more recent version of the standard is available but that Apache SIS has
not yet been upgraded to [...]
</item>
+ <item>
+ <title>Transform coordinates</title>
+ <link>https://sis.apache.org/howto/transform_coordinates.html</link>
+ <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
+
+ <guid>https://sis.apache.org/howto/transform_coordinates.html</guid>
+ <description>The following Java code projects geographic coordinates
from the World Geodetic System 1984 (WGS84) to WGS 84 / UTM zone 33N. In order
to make the example a little bit simpler, this code uses predefined constants
given by the CommonCRS convenience class. But more advanced applications may
use EPSG codes or definitions in Well-Known Text (WKT) instead.
+Note: if the result of a coordinate transformation seems wrong, see the FAQ
page.</description>
+ </item>
+
</channel>
</rss>
diff --git a/sitemap.xml b/sitemap.xml
index 49111881..d78124c1 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -4,7 +4,7 @@
<sitemap>
<loc>https://sis.apache.org/en/sitemap.xml</loc>
- <lastmod>2023-01-18T11:09:36+01:00</lastmod>
+ <lastmod>2023-01-21T00:15:54+01:00</lastmod>
</sitemap>