blob: e4148cb0e6ddd86471af7a6078149947bc245f7e [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (19) -->
<title>GeodeticCalculator (Apache SIS 1.3 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.sis.referencing, class: GeodeticCalculator">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="org.apache.sis.referencing.GeodeticCalculator class">
<meta name="keywords" content="create()">
<meta name="keywords" content="getPositionCRS()">
<meta name="keywords" content="getGeographicCRS()">
<meta name="keywords" content="getStartPoint()">
<meta name="keywords" content="setStartPoint()">
<meta name="keywords" content="setStartGeographicPoint()">
<meta name="keywords" content="getEndPoint()">
<meta name="keywords" content="setEndPoint()">
<meta name="keywords" content="setEndGeographicPoint()">
<meta name="keywords" content="getStartingAzimuth()">
<meta name="keywords" content="setStartingAzimuth()">
<meta name="keywords" content="getEndingAzimuth()">
<meta name="keywords" content="getConstantAzimuth()">
<meta name="keywords" content="getGeodesicDistance()">
<meta name="keywords" content="setGeodesicDistance()">
<meta name="keywords" content="getRhumblineLength()">
<meta name="keywords" content="getDistanceUnit()">
<meta name="keywords" content="moveToEndPoint()">
<meta name="keywords" content="createGeodesicPath2D()">
<meta name="keywords" content="createGeodesicCircle2D()">
<meta name="keywords" content="createProjectionAroundStart()">
<meta name="keywords" content="toString()">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../sis.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var pathtoroot = "../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span></button>
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/GeodeticCalculator.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html#class">Help</a></li>
</ul>
<ul class="sub-nav-list-small">
<li>
<p>Summary:</p>
<ul>
<li>Nested</li>
<li>Field</li>
<li>Constr</li>
<li><a href="#method-summary">Method</a></li>
</ul>
</li>
<li>
<p>Detail:</p>
<ul>
<li>Field</li>
<li>Constr</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</li>
</ul>
</div>
<div class="sub-nav">
<div id="navbar-sub-list">
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><a href="../../../../search.html">SEARCH</a>
<input type="text" id="search-input" disabled placeholder="Search">
<input type="reset" id="reset-button" disabled value="reset">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.sis.referencing</a></div>
<h1 title="Class GeodeticCalculator" class="title">Class GeodeticCalculator</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>
<div class="inheritance">GeodeticCalculator</div>
</div>
<section class="class-description" id="class-description">
<hr>
<div class="type-signature"><span class="modifiers">public class </span><span class="element-name type-name-label">GeodeticCalculator</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></span></div>
<div class="block">Performs geodetic calculations on a sphere or an ellipsoid. This class computes the distance between two points,
or conversely the point located at a given distance from another point when navigating in a given direction.
The distance depends on the path (or track) on Earth surface connecting the two points.
The track can be great circles (shortest path between two points) or rhumb lines (path with constant heading).
<p>This class uses the following information:</p>
<ul>
<li>The <a href="#setStartPoint(org.opengis.geometry.coordinate.Position)">start point</a>, which is always considered valid after the first call
to <code>set­Start­Point(…)</code>. Its value can only be changed by another call to <code>set­Start­Point(…)</code>.</li>
<li>One of the followings (the latest specified properties override other properties and determines what will be calculated):
<ul>
<li>the <a href="#setEndPoint(org.opengis.geometry.coordinate.Position)">end point</a>, or</li>
<li>the <a href="#setStartingAzimuth(double)">azimuth at start point</a> together with
the <a href="#setGeodesicDistance(double)">geodesic distance</a> from that point.</li>
</ul>
</li>
</ul>
<h2>Algorithms</h2>
<code>Geodetic­Calculator</code> uses two set of formulas, depending if the figure of the Earth
<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/datum/Ellipsoid.html#isSphere()" title="class or interface in org.opengis.referencing.datum" class="external-link">is a sphere</a> or an ellipsoid.
Publications relevant to this class are:
<ul>
<li>Wikipedia, <a href="https://en.wikipedia.org/wiki/Great-circle_navigation">Great-circle navigation</a>
for spherical formulas.</li>
<li>Wikipedia, <a href="https://en.wikipedia.org/wiki/Rhumb_line">Rhumb line</a>
for spherical formulas.</li>
<li>Charles F. F. Karney (2013), <a href="https://doi.org/10.1007/s00190-012-0578-z">Algorithms for geodesics</a>
for ellipsoidal formulas.</li>
<li>G.G. Bennett, 1996. <a href="https://doi.org/10.1017/S0373463300013151">Practical Rhumb Line Calculations
on the Spheroid</a> for ellipsoidal formulas.</li>
<li>Charles F. F. Karney (2010), <a href="http://doi.org/10.5281/zenodo.32156">Test set for geodesics</a>
for <code>Geodetic­Calculator</code> tests.</li>
<li>Charles F. F. Karney, <a href="https://geographiclib.sourceforge.io/">GeographicLib</a>
for the reference implementation.</li>
</ul>
<h2>Accuracy</h2>
<code>Geodetic­Calculator</code> aims for a positional accuracy of one centimetre.
The accuracy is often better (about one millimetre), but not everywhere.
Azimuthal accuracy corresponds to an error of one centimetre at a distance of one kilometer,
except for nearly antipodal points (less than 1° of longitude and latitude from antipode)
and points close to the poles where the azimuthal errors are larger.
Karney's GeographicLib should be used if better accuracy is desired.
Apache SIS accuracy does not go as far as GeographicLib because the rest of Apache SIS
library (map projections, <i>etc.</i>) aims for an one centimetre accuracy anyway.
<h2>Limitations</h2>
Current implementation cannot compute the geodesics in some cases.
In particular, calculation may fail for antipodal points on an ellipsoid.
Karney's algorithm should cover those cases,
but this <code>Geodetic­Calculator</code> implementation may not be sufficiently tuned.
See <a href="https://issues.apache.org/jira/browse/SIS-467">SIS-467</a> for more information.
<h2>Thread safety</h2>
This class is not thread-safe. If geodetic calculations are needed in a multi-threads environment,
then a distinct instance of <code>Geodetic­Calculator</code> needs to be created for each thread.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>1.0</dd>
<p><font size="-1">Defined in the <code>sis-referencing</code> module</font></p>
</dl>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="GeodeticCalculator.html" title="class in org.apache.sis.referencing">Geodetic­Calculator</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#create(org.opengis.referencing.crs.CoordinateReferenceSystem)" class="member-name-link">create</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/CoordinateReferenceSystem.html" title="class or interface in org.opengis.referencing.crs" class="external-link">Coordinate­Reference­System</a>&nbsp;crs)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Constructs a new geodetic calculator expecting coordinates in the supplied CRS.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Shape.html" title="class or interface in java.awt" class="external-link">Shape</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#createGeodesicCircle2D(double)" class="member-name-link">create­Geodesic­Circle2D</a><wbr>(double&nbsp;tolerance)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Creates an approximation of the curve at a constant geodesic distance around the start point.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Shape.html" title="class or interface in java.awt" class="external-link">Shape</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#createGeodesicPath2D(double)" class="member-name-link">create­Geodesic­Path2D</a><wbr>(double&nbsp;tolerance)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Creates an approximation of the geodesic track from start point to end point as a Java2D object.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/operation/MathTransform.html" title="class or interface in org.opengis.referencing.operation" class="external-link">Math­Transform</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#createProjectionAroundStart()" class="member-name-link">create­Projection­Around­Start</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Creates an <cite>Azimuthal Equidistant</cite> projection centered on current starting point.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getConstantAzimuth()" class="member-name-link">get­Constant­Azimuth</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Computes the angular heading of a rhumb line path.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/quantity/Length.html" title="class or interface in javax.measure.quantity" class="external-link">Length</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getDistanceUnit()" class="member-name-link">get­Distance­Unit</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the unit of measurement of all distance measurements.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getEndingAzimuth()" class="member-name-link">get­Ending­Azimuth</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Computes the angular heading at the ending point of a geodesic path.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html" title="class or interface in org.opengis.geometry" class="external-link">Direct­Position</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getEndPoint()" class="member-name-link">get­End­Point</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns or computes the destination in the CRS specified at construction time.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getGeodesicDistance()" class="member-name-link">get­Geodesic­Distance</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns or computes the shortest distance from start point to end point.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/GeographicCRS.html" title="class or interface in org.opengis.referencing.crs" class="external-link">Geographic­CRS</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getGeographicCRS()" class="member-name-link">get­Geographic­CRS</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the coordinate reference system for all methods expecting (φ,λ) as <code>double</code> values.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/CoordinateReferenceSystem.html" title="class or interface in org.opengis.referencing.crs" class="external-link">Coordinate­Reference­System</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPositionCRS()" class="member-name-link">get­Position­CRS</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the Coordinate Reference System (CRS) in which <code>Position</code>s are represented, unless otherwise specified.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRhumblineLength()" class="member-name-link">get­Rhumbline­Length</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns or computes the length of rhumb line (part of constant heading) from start point to end point.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getStartingAzimuth()" class="member-name-link">get­Starting­Azimuth</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns or computes the angular heading at the starting point of a geodesic path.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html" title="class or interface in org.opengis.geometry" class="external-link">Direct­Position</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getStartPoint()" class="member-name-link">get­Start­Point</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the starting point in the CRS specified at construction time.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#moveToEndPoint()" class="member-name-link">move­To­End­Point</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the start point and starting azimuth to the current end point and ending azimuth values.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setEndGeographicPoint(double,double)" class="member-name-link">set­End­Geographic­Point</a><wbr>(double&nbsp;latitude,
double&nbsp;longitude)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the destination as geographic (<var>latitude</var>, <var>longitude</var>) coordinates.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setEndPoint(org.opengis.geometry.coordinate.Position)" class="member-name-link">set­End­Point</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/coordinate/Position.html" title="class or interface in org.opengis.geometry.coordinate" class="external-link">Position</a>&nbsp;position)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the destination as coordinates in arbitrary reference system.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setGeodesicDistance(double)" class="member-name-link">set­Geodesic­Distance</a><wbr>(double&nbsp;distance)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the geodesic distance from the start point to the end point.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setStartGeographicPoint(double,double)" class="member-name-link">set­Start­Geographic­Point</a><wbr>(double&nbsp;latitude,
double&nbsp;longitude)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the starting point as geographic (<var>latitude</var>, <var>longitude</var>) coordinates.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setStartingAzimuth(double)" class="member-name-link">set­Starting­Azimuth</a><wbr>(double&nbsp;azimuth)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the angular heading at the starting point of a geodesic path.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#setStartPoint(org.opengis.geometry.coordinate.Position)" class="member-name-link">set­Start­Point</a><wbr>(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/coordinate/Position.html" title="class or interface in org.opengis.geometry.coordinate" class="external-link">Position</a>&nbsp;point)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Sets the starting point as coordinates in arbitrary reference system.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString()" class="member-name-link">to­String</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns a string representation of start point, end point, azimuths and distance.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Object">Methods inherited from class&nbsp;<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">get­Class</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hash­Code</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notify­All</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="create(org.opengis.referencing.crs.CoordinateReferenceSystem)">
<h3>create</h3>
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="GeodeticCalculator.html" title="class in org.apache.sis.referencing">GeodeticCalculator</a></span>&nbsp;<span class="element-name">create</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/CoordinateReferenceSystem.html" title="class or interface in org.opengis.referencing.crs" class="external-link">CoordinateReferenceSystem</a>&nbsp;crs)</span></div>
<div class="block">Constructs a new geodetic calculator expecting coordinates in the supplied CRS.
All <code>Geodetic­Calculator</code> methods having a <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/coordinate/Position.html" title="class or interface in org.opengis.geometry.coordinate" class="external-link"><code>Position</code></a> argument
or return value will use that specified CRS.
That CRS is the value returned by <a href="#getPositionCRS()"><code>get­Position­CRS()</code></a>.
<h4>Limitations</h4>
Current implementation uses only spherical formulas.
Implementation using ellipsoidal formulas will be provided in a future Apache SIS release.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>crs</code> - the reference system for the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/coordinate/Position.html" title="class or interface in org.opengis.geometry.coordinate" class="external-link"><code>Position</code></a> objects.</dd>
<dt>Returns:</dt>
<dd>a new geodetic calculator using the specified CRS.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getPositionCRS()">
<h3>getPositionCRS</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/CoordinateReferenceSystem.html" title="class or interface in org.opengis.referencing.crs" class="external-link">CoordinateReferenceSystem</a></span>&nbsp;<span class="element-name">getPositionCRS</span>()</div>
<div class="block">Returns the Coordinate Reference System (CRS) in which <code>Position</code>s are represented, unless otherwise specified.
This is the CRS of all <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/coordinate/Position.html" title="class or interface in org.opengis.geometry.coordinate" class="external-link"><code>Position</code></a> instances returned by methods in this class. This is also the default CRS
assumed by methods receiving a <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/coordinate/Position.html" title="class or interface in org.opengis.geometry.coordinate" class="external-link"><code>Position</code></a> argument when the given position does not specify its CRS.
This default CRS is specified at construction time.
It is not necessarily geographic; it may be projected or geocentric.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the default CRS for <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/coordinate/Position.html" title="class or interface in org.opengis.geometry.coordinate" class="external-link"><code>Position</code></a> instances.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getGeographicCRS()">
<h3>getGeographicCRS</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/GeographicCRS.html" title="class or interface in org.opengis.referencing.crs" class="external-link">GeographicCRS</a></span>&nbsp;<span class="element-name">getGeographicCRS</span>()</div>
<div class="block">Returns the coordinate reference system for all methods expecting (φ,λ) as <code>double</code> values.
This CRS always has (<var>latitude</var>, <var>longitude</var>) axes, in that order and in degrees.
The CRS may contain an additional axis for ellipsoidal height.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the coordinate reference system of (φ,λ) coordinates.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getStartPoint()">
<h3>getStartPoint</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html" title="class or interface in org.opengis.geometry" class="external-link">DirectPosition</a></span>&nbsp;<span class="element-name">getStartPoint</span>()</div>
<div class="block">Returns the starting point in the CRS specified at construction time.
This method returns the last point given to a <code>set­Start­Point(…)</code> method,
transformed to the <a href="#getPositionCRS()">position CRS</a>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the starting point represented in the CRS specified at construction time.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">Illegal­State­Exception</a></code> - if the start point has not yet been specified.</dd>
<dd><code><a href="GeodeticException.html" title="class in org.apache.sis.referencing">Geodetic­Exception</a></code> - if the coordinates cannot be transformed to <a href="#getPositionCRS()">position CRS</a>.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#getEndPoint()"><code>get­End­Point()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setStartPoint(org.opengis.geometry.coordinate.Position)">
<h3>setStartPoint</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setStartPoint</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/coordinate/Position.html" title="class or interface in org.opengis.geometry.coordinate" class="external-link">Position</a>&nbsp;point)</span></div>
<div class="block">Sets the starting point as coordinates in arbitrary reference system. This method transforms the given
coordinates to geographic coordinates, then delegates to <a href="#setStartGeographicPoint(double,double)"><code>set­Start­Geographic­Point(double, double)</code></a>.
If the given point is not associated to a Coordinate Reference System (CRS), then this method assumes
the CRS specified at construction time.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>point</code> - the starting point in any coordinate reference system.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">Illegal­Argument­Exception</a></code> - if the given coordinates cannot be transformed.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#setEndPoint(org.opengis.geometry.coordinate.Position)"><code>set­End­Point(Position)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setStartGeographicPoint(double,double)">
<h3>setStartGeographicPoint</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setStartGeographicPoint</span><wbr><span class="parameters">(double&nbsp;latitude,
double&nbsp;longitude)</span></div>
<div class="block">Sets the starting point as geographic (<var>latitude</var>, <var>longitude</var>) coordinates.
The <a href="#getStartingAzimuth()">starting</a> and <a href="#getEndingAzimuth()">ending azimuths</a>,
the <a href="#getEndPoint()">end point</a>, the <a href="#getGeodesicDistance()">geodesic distance</a>
and the <a href="#getRhumblineLength()">rhumb line length</a>
are discarded by this method call; some of them will need to be specified again.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>latitude</code> - the latitude in degrees between <a href="../measure/Latitude.html#MIN_VALUE">-90.0</a>° and <a href="../measure/Latitude.html#MAX_VALUE">90.0</a>°.</dd>
<dd><code>longitude</code> - the longitude in degrees.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="#setEndGeographicPoint(double,double)"><code>set­End­Geographic­Point(double, double)</code></a></li>
<li><a href="#moveToEndPoint()"><code>move­To­End­Point()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getEndPoint()">
<h3>getEndPoint</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/DirectPosition.html" title="class or interface in org.opengis.geometry" class="external-link">DirectPosition</a></span>&nbsp;<span class="element-name">getEndPoint</span>()</div>
<div class="block">Returns or computes the destination in the CRS specified at construction time. This method returns
the point specified in the last call to a <a href="#setEndPoint(org.opengis.geometry.coordinate.Position)"><code>set­End­Point(…)</code></a> method,
unless the <a href="#setStartingAzimuth(double)">starting azimuth</a> and
<a href="#setGeodesicDistance(double)">geodesic distance</a> have been set more recently.
In the latter case, the end point will be computed from the <a href="#getStartPoint()">start point</a>
and the current azimuth and distance.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the destination (end point) represented in the CRS specified at construction time.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">Illegal­State­Exception</a></code> - if the destination point, azimuth or distance have not been set.</dd>
<dd><code><a href="GeodeticException.html" title="class in org.apache.sis.referencing">Geodetic­Exception</a></code> - if the coordinates cannot be computed.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#getStartPoint()"><code>get­Start­Point()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setEndPoint(org.opengis.geometry.coordinate.Position)">
<h3>setEndPoint</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setEndPoint</span><wbr><span class="parameters">(<a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/geometry/coordinate/Position.html" title="class or interface in org.opengis.geometry.coordinate" class="external-link">Position</a>&nbsp;position)</span></div>
<div class="block">Sets the destination as coordinates in arbitrary reference system. This method transforms the given
coordinates to geographic coordinates, then delegates to <a href="#setEndGeographicPoint(double,double)"><code>set­End­Geographic­Point(double, double)</code></a>.
If the given point is not associated to a Coordinate Reference System (CRS), then this method assumes
the CRS specified at construction time.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>position</code> - the destination (end point) in any coordinate reference system.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">Illegal­Argument­Exception</a></code> - if the given coordinates cannot be transformed.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#setStartPoint(org.opengis.geometry.coordinate.Position)"><code>set­Start­Point(Position)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setEndGeographicPoint(double,double)">
<h3>setEndGeographicPoint</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setEndGeographicPoint</span><wbr><span class="parameters">(double&nbsp;latitude,
double&nbsp;longitude)</span></div>
<div class="block">Sets the destination as geographic (<var>latitude</var>, <var>longitude</var>) coordinates.
The <a href="#getStartingAzimuth()">starting azimuth</a>, <a href="#getEndingAzimuth()">ending azimuth</a>
<a href="#getGeodesicDistance()">geodesic distance</a> and <a href="#getRhumblineLength()">rhumb line length</a>
will be updated as an effect of this call.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>latitude</code> - the latitude in degrees between <a href="../measure/Latitude.html#MIN_VALUE">-90.0</a>° and <a href="../measure/Latitude.html#MAX_VALUE">90.0</a>°.</dd>
<dd><code>longitude</code> - the longitude in degrees.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="#setStartGeographicPoint(double,double)"><code>set­Start­Geographic­Point(double, double)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getStartingAzimuth()">
<h3>getStartingAzimuth</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getStartingAzimuth</span>()</div>
<div class="block">Returns or computes the angular heading at the starting point of a geodesic path.
Azimuth is relative to geographic North with values increasing clockwise.
This method returns the azimuth normalized to [-180 … +180]° range given in last call to
<a href="#setStartingAzimuth(double)"><code>set­Starting­Azimuth(double)</code></a> method, unless the <a href="#setEndPoint(org.opengis.geometry.coordinate.Position)"><code>set­End­Point(…)</code></a>
method has been invoked more recently. In the latter case, the azimuth will be computed from the
<a href="#getStartPoint()">start point</a> and the current end point.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the azimuth in degrees from -180° to +180°. 0° is toward North and values are increasing clockwise.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">Illegal­State­Exception</a></code> - if the end point, azimuth or distance have not been set.</dd>
<dd><code><a href="GeodeticException.html" title="class in org.apache.sis.referencing">Geodetic­Exception</a></code> - if the azimuth cannot be computed.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setStartingAzimuth(double)">
<h3>setStartingAzimuth</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setStartingAzimuth</span><wbr><span class="parameters">(double&nbsp;azimuth)</span></div>
<div class="block">Sets the angular heading at the starting point of a geodesic path.
Azimuth is relative to geographic North with values increasing clockwise.
The <a href="#getEndingAzimuth()">ending azimuth</a>, <a href="#getEndPoint()">end point</a>
and <a href="#getRhumblineLength()">rhumb line length</a>
will be updated as an effect of this method call.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>azimuth</code> - the starting azimuth in degrees, with 0° toward north and values increasing clockwise.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#setGeodesicDistance(double)"><code>set­Geodesic­Distance(double)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getEndingAzimuth()">
<h3>getEndingAzimuth</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getEndingAzimuth</span>()</div>
<div class="block">Computes the angular heading at the ending point of a geodesic path.
Azimuth is relative to geographic North with values increasing clockwise. This method computes the azimuth
from the current <a href="#setStartPoint(org.opengis.geometry.coordinate.Position)">start point</a> and <a href="#setEndPoint(org.opengis.geometry.coordinate.Position)">end point</a>,
or from start point and the current <a href="#setStartingAzimuth(double)">starting azimuth</a> and
<a href="#setGeodesicDistance(double)">geodesic distance</a>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the azimuth in degrees from -180° to +180°. 0° is toward North and values are increasing clockwise.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">Illegal­State­Exception</a></code> - if the destination point, azimuth or distance have not been set.</dd>
<dd><code><a href="GeodeticException.html" title="class in org.apache.sis.referencing">Geodetic­Exception</a></code> - if the azimuth cannot be computed.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getConstantAzimuth()">
<h3>getConstantAzimuth</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getConstantAzimuth</span>()</div>
<div class="block">Computes the angular heading of a rhumb line path.
Azimuth is relative to geographic North with values increasing clockwise.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the azimuth in degrees from -180° to +180°. 0° is toward North and values are increasing clockwise.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">Illegal­State­Exception</a></code> - if the start point or end point has not been set.</dd>
<dd><code><a href="GeodeticException.html" title="class in org.apache.sis.referencing">Geodetic­Exception</a></code> - if the azimuth cannot be computed.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getGeodesicDistance()">
<h3>getGeodesicDistance</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getGeodesicDistance</span>()</div>
<div class="block">Returns or computes the shortest distance from start point to end point. This is sometimes called "great circle"
or "orthodromic" distance. This method returns the value given in last call to <a href="#setGeodesicDistance(double)"><code>set­Geodesic­Distance(double)</code></a>,
unless the <a href="#setEndPoint(org.opengis.geometry.coordinate.Position)"><code>set­End­Point(…)</code></a> method has been invoked more recently. In the latter case,
the distance will be computed from the <a href="#getStartPoint()">start point</a> and current end point.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the shortest distance in the unit of measurement given by <a href="#getDistanceUnit()"><code>get­Distance­Unit()</code></a>.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">Illegal­State­Exception</a></code> - if the start point or end point has not been set.</dd>
<dd><code><a href="GeodeticException.html" title="class in org.apache.sis.referencing">Geodetic­Exception</a></code> - if the distance cannot be computed.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#getDistanceUnit()"><code>get­Distance­Unit()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="setGeodesicDistance(double)">
<h3>setGeodesicDistance</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">setGeodesicDistance</span><wbr><span class="parameters">(double&nbsp;distance)</span></div>
<div class="block">Sets the geodesic distance from the start point to the end point. The <a href="#getEndPoint()">end point</a>,
<a href="#getEndingAzimuth()">ending azimuth</a> and <a href="#getRhumblineLength()">rhumb line length</a>
will be updated as an effect of this method call.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>distance</code> - the geodesic distance in unit of measurement given by <a href="#getDistanceUnit()"><code>get­Distance­Unit()</code></a>.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#setStartingAzimuth(double)"><code>set­Starting­Azimuth(double)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getRhumblineLength()">
<h3>getRhumblineLength</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getRhumblineLength</span>()</div>
<div class="block">Returns or computes the length of rhumb line (part of constant heading) from start point to end point.
This is sometimes called "loxodrome". This is <strong>not</strong> the shortest path between two points.
The rhumb line distance may be up to 50% longer than the geodesic distance.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>length of rhumb line in the unit of measurement given by <a href="#getDistanceUnit()"><code>get­Distance­Unit()</code></a>.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">Illegal­State­Exception</a></code> - if a point has not been set.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getDistanceUnit()">
<h3>getDistanceUnit</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/Unit.html" title="class or interface in javax.measure" class="external-link">Unit</a>&lt;<a href="http://unitsofmeasurement.github.io/unit-api/site/apidocs/javax/measure/quantity/Length.html" title="class or interface in javax.measure.quantity" class="external-link">Length</a>&gt;</span>&nbsp;<span class="element-name">getDistanceUnit</span>()</div>
<div class="block">Returns the unit of measurement of all distance measurements.
This is the <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/datum/Ellipsoid.html#getAxisUnit()" title="class or interface in org.opengis.referencing.datum" class="external-link">ellipsoid axis unit</a>.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the unit of measurement of all distance measurements.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#getGeodesicDistance()"><code>get­Geodesic­Distance()</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="moveToEndPoint()">
<h3>moveToEndPoint</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">moveToEndPoint</span>()</div>
<div class="block">Sets the start point and starting azimuth to the current end point and ending azimuth values.
The <a href="#getEndingAzimuth()">ending azimuths</a>, the <a href="#getGeodesicDistance()">geodesic distance</a> and the <a href="#getEndPoint()">end point</a> are discarded by this method call;
some of them will need to be specified again.</div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code><a href="GeodeticException.html" title="class in org.apache.sis.referencing">Geodetic­Exception</a></code> - if the end point or ending azimuth cannot be computed.</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list-long">
<li><a href="#setStartGeographicPoint(double,double)"><code>set­Start­Geographic­Point(double, double)</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="createGeodesicPath2D(double)">
<h3>createGeodesicPath2D</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Shape.html" title="class or interface in java.awt" class="external-link">Shape</a></span>&nbsp;<span class="element-name">createGeodesicPath2D</span><wbr><span class="parameters">(double&nbsp;tolerance)</span></div>
<div class="block">Creates an approximation of the geodesic track from start point to end point as a Java2D object.
The coordinates are expressed in the coordinate reference system specified at creation time.
The approximation uses linear, quadratic or cubic Bézier curves.
The returned path has the following characteristics:
<ol>
<li>The first point is <a href="#getStartPoint()"><code>get­Start­Point()</code></a>.</li>
<li>The beginning of the curve (more specifically, the tangent at starting point) is oriented toward the direction given
by <a href="#getStartingAzimuth()">getStartingAzimuth()</a>, adjusted for the map projection (if any) deformation at that location.</li>
<li>The point B(½) in the middle of the Bézier curve is a point of the geodesic path.</li>
<li>The end of the curve (more specifically, the tangent at ending point) is oriented toward the direction given by
<a href="#getEndingAzimuth()">getEndingAzimuth()</a>, adjusted for the map projection (if any) deformation at that location.</li>
<li>The last point is <a href="#getEndPoint()"><code>get­End­Point()</code></a>, potentially with 360° added or subtracted to the longitude.</li>
</ol>
This method tries to stay within the given tolerance threshold of the geodesic track.
The <code>tolerance</code> parameter should not be too small for avoiding creation of unreasonably long chain of Bézier curves.
For example, a value of 1/10 of geodesic length may be sufficient.
<div class="note"><b>Note:</b>
this method depends on the presence of <code>java​.desktop</code> module. This constraint may be addressed
in a future Apache SIS version (see <a href="https://issues.apache.org/jira/browse/SIS-453">SIS-453</a>).
The "2D" suffix in the method name represents this relationship with Java2D.
The <code>create­Geodesic­Path(…)</code> method name (without suffix) is reserved for a future version
using ISO curves instead.</div></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>tolerance</code> - maximal error between the approximated curve and actual geodesic track
in the units of measurement given by <a href="#getDistanceUnit()"><code>get­Distance­Unit()</code></a>.
This is approximate; the actual errors may vary around that value.</dd>
<dt>Returns:</dt>
<dd>an approximation of geodesic track as Bézier curves in a Java2D object.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">Illegal­State­Exception</a></code> - if some required properties have not been specified.</dd>
<dd><code><a href="GeodeticException.html" title="class in org.apache.sis.referencing">Geodetic­Exception</a></code> - if some coordinates cannot be computed.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="createGeodesicCircle2D(double)">
<h3>createGeodesicCircle2D</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.desktop/java/awt/Shape.html" title="class or interface in java.awt" class="external-link">Shape</a></span>&nbsp;<span class="element-name">createGeodesicCircle2D</span><wbr><span class="parameters">(double&nbsp;tolerance)</span></div>
<div class="block">Creates an approximation of the curve at a constant geodesic distance around the start point.
The returned shape is circlelike with the <a href="#getStartPoint()">start point</a> in its center.
The coordinates are expressed in the coordinate reference system specified at creation time.
The approximation uses cubic Bézier curves.
<div class="note"><b>Note:</b>
some authors define geodesic circle as the curve which enclose the maximum area for a given perimeter.
This method adopts a different definition, the locus of points at a fixed geodesic distance from center point.
</div>
This method tries to stay within the given tolerance threshold of the geodesic track.
The <code>tolerance</code> parameter should not be too small for avoiding creation of unreasonably long chain of Bézier curves.
For example, a value of 1/10 of geodesic length may be sufficient.
<div class="note"><b>Note:</b>
this method depends on the presence of <code>java​.desktop</code> module. This constraint may be addressed
in a future Apache SIS version (see <a href="https://issues.apache.org/jira/browse/SIS-453">SIS-453</a>).
The "2D" suffix in the method name represents this relationship with Java2D.
The <code>create­Geodesic­Circle(…)</code> method name (without suffix) is reserved for a future version
using ISO curves instead.</div></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>tolerance</code> - maximal error in the units of measurement given by <a href="#getDistanceUnit()"><code>get­Distance­Unit()</code></a>.
This is approximate; the actual errors may vary around that value.</dd>
<dt>Returns:</dt>
<dd>an approximation of circular region as a Java2D object.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">Illegal­State­Exception</a></code> - if some required properties have not been specified.</dd>
<dd><code><a href="GeodeticException.html" title="class in org.apache.sis.referencing">Geodetic­Exception</a></code> - if some coordinates cannot be computed.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="createProjectionAroundStart()">
<h3>createProjectionAroundStart</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/operation/MathTransform.html" title="class or interface in org.opengis.referencing.operation" class="external-link">MathTransform</a></span>&nbsp;<span class="element-name">createProjectionAroundStart</span>()</div>
<div class="block">Creates an <cite>Azimuthal Equidistant</cite> projection centered on current starting point. On input,
the <code>Math­Transform</code> expects coordinates expressed in the <a href="#getPositionCRS()">position CRS</a>.
On output, the <code>Math­Transform</code> produces coordinates in a <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/crs/ProjectedCRS.html" title="class or interface in org.opengis.referencing.crs" class="external-link"><code>Projected­CRS</code></a>
having the following characteristics:
<ul>
<li>Coordinate system is a two-dimensional <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/CartesianCS.html" title="class or interface in org.opengis.referencing.cs" class="external-link"><code>Cartesian­CS</code></a>
with (Easting, Northing) axis order and directions.</li>
<li>Unit of measurement is the same as <a href="#getPositionCRS()">position CRS</a>
if those units are linear, or <a href="../measure/Units.html#METRE"><code>Units​.METRE</code></a> otherwise.
<li>Projection of the <a href="#getStartPoint()">start point</a> results in (0,0).</li>
<li>Distances relative to (0,0) are approximately exact for distances less than 800 km.</li>
<li>Azimuths from (0,0) to other points are approximately exact for points located at less than 800 km.</li>
</ul>
Given above characteristics, the following calculations are satisfying approximations when using
(<var>x</var>, <var>y</var>) coordinates in the output space for <var>D</var> &lt; 800 km:
<blockquote>
<var>D</var> = √(<var>x</var>² + <var>y</var>²) — distance from projection center.<br>
<var>θ</var> = atan2(<var>y</var>, <var>x</var>) — arithmetic angle from projection center to (<var>x</var>, <var>y</var>).<br>
<var>x</var> = <var>D</var>⋅cos <var>θ</var><br>
<var>y</var> = <var>D</var>⋅sin <var>θ</var> — end point for a distance and angle from start point.<br>
</blockquote>
The following calculations are <strong>not</strong> exacts, because distances and azimuths are approximately
exacts only when measured from (0,0) coordinates:
<blockquote>
<var>D</var> = √[(<var>x₂</var><var>x₁</var>)² + (<var>y₂</var><var>y₁</var>)²]
— distances between points other then projection center are not valid.<br>
<var>θ</var> = atan2(<var>y₂</var><var>y₁</var>, <var>x₂</var><var>x₁</var>)
— azimuths between points other then projection center are not valid.<br>
<i>etc.</i>
</blockquote>
This method can be invoked repetitively for doing calculations around different points.
All returned <a href="http://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/operation/MathTransform.html" title="class or interface in org.opengis.referencing.operation" class="external-link"><code>Math­Transform</code></a> instances are immutable;
changing <code>Geodetic­Calculator</code> state does not affect those transforms.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>transform from <a href="#getPositionCRS()">position CRS</a> to <cite>Azimuthal Equidistant</cite>
projected CRS centered on current <a href="#getStartPoint()">start point</a>.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link">Illegal­State­Exception</a></code> - if the start point has not been set.</dd>
<dd><code><a href="GeodeticException.html" title="class in org.apache.sis.referencing">Geodetic­Exception</a></code> - if the projection cannot be computed.</dd>
<dt>Since:</dt>
<dd>1.1</dd>
<dt>See Also:</dt>
<dd>
<ul class="see-list">
<li><a href="#moveToEndPoint()"><code>move­To­End­Point()</code></a></li>
<li><a href="operation/projection/AzimuthalEquidistant.html" title="class in org.apache.sis.referencing.operation.projection"><code>Azimuthal­Equidistant</code></a></li>
</ul>
</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="toString()">
<h3>toString</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">toString</span>()</div>
<div class="block">Returns a string representation of start point, end point, azimuths and distance.
The text representation is implementation-specific and may change in any future version.
Current implementation is like below:
<blockquote><pre>Coordinate reference system: Unspecified datum based upon the GRS 1980 Authalic Sphere
┌─────────────┬─────────────────┬──────────────────┬─────────────┐
│ │ Latitude │ Longitude │ Azimuth │
│ Start point │ 9°39′06.1120″N │ 132°37′37.1248″W │ -17°10′37″ │
│ End point │ 70°32′45.0206″N │ 109°50′05.0533″E │ -119°03′12″ │
└─────────────┴─────────────────┴──────────────────┴─────────────┘
Geodesic distance: 9,967,530.74 m</pre></blockquote></div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">to­String</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd>
<dt>Returns:</dt>
<dd>a string representation of this calculator state.</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 2010&#x2013;2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</div>
</div>
</body>
</html>