blob: 2d31dcf73e5b6836c9573efdc2975443fd90a5ac [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (24) on Mon Sep 29 10:48:08 CEST 2025 -->
<title>Longitude (Apache SIS 1.5 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="dc.created" content="2025-09-29">
<meta name="description" content="declaration: module: org.apache.sis.util, package: org.apache.sis.measure, class: Longitude">
<meta name="generator" content="javadoc/ClassWriter">
<meta name="keywords" content="org.apache.sis.measure.Longitude class">
<meta name="keywords" content="MIN_VALUE">
<meta name="keywords" content="MAX_VALUE">
<meta name="keywords" content="normalize()">
<meta name="keywords" content="isWraparound()">
<link rel="stylesheet" type="text/css" href="../../../../../resource-files/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../resource-files/stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../resource-files/sis.css" title="Style">
<script type="text/javascript" src="../../../../../script-files/script.js"></script>
<script type="text/javascript" src="../../../../../script-files/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="../../../../../script-files/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">const pathtoroot = "../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="nav-content">
<div class="nav-menu-button"><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>
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../../index.html">Overview</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/Longitude.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../new-list.html">New</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../search.html">Search</a></li>
<li><a href="../../../../../help-doc.html#class">Help</a></li>
</ul>
</div>
</div>
<div class="sub-nav">
<div class="nav-content">
<ol class="sub-nav-list">
<li><a href="../../../../module-summary.html">org.apache.sis.util</a></li>
<li><a href="package-summary.html">org.apache.sis.measure</a></li>
<li><a href="Longitude.html" class="current-selection">Longitude</a></li>
</ol>
<div class="nav-list-search">
<input type="text" id="search-input" disabled placeholder="Search" aria-label="Search in documentation" autocomplete="off">
<input type="reset" id="reset-search" disabled value="Reset">
</div>
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="main-grid">
<nav role="navigation" class="toc" aria-label="Table of contents">
<div class="toc-header">Contents&nbsp;
<input type="text" class="filter-input" disabled placeholder="Filter" aria-label="Filter table of contents" autocomplete="off">
<input type="reset" class="reset-filter" disabled value="Reset">
</div>
<button class="hide-sidebar"><span>Hide sidebar&nbsp;</span>&#10094;</button><button class="show-sidebar">&#10095;<span>&nbsp;Show sidebar</span></button>
<ol class="toc-list">
<li><a href="#" tabindex="0">Description</a>
<ol class="toc-list">
<li><a href="#immutability-and-thread-safety-heading" tabindex="0">Immutability and thread safety</a></li>
</ol>
</li>
<li><a href="#field-summary" tabindex="0">Field Summary</a></li>
<li><a href="#constructor-summary" tabindex="0">Constructor Summary</a></li>
<li><a href="#method-summary" tabindex="0">Method Summary</a></li>
<li><a href="#field-detail" tabindex="0">Field Details</a>
<ol class="toc-list">
<li><a href="#MIN_VALUE" tabindex="0">MIN_VALUE</a></li>
<li><a href="#MAX_VALUE" tabindex="0">MAX_VALUE</a></li>
</ol>
</li>
<li><a href="#constructor-detail" tabindex="0">Constructor Details</a>
<ol class="toc-list">
<li><a href="#%3Cinit%3E(double)" tabindex="0">Longitude(double)</a></li>
<li><a href="#%3Cinit%3E(java.lang.String)" tabindex="0">Longitude(String)</a></li>
<li><a href="#%3Cinit%3E(org.opengis.geometry.DirectPosition)" tabindex="0">Longitude(DirectPosition)</a></li>
</ol>
</li>
<li><a href="#method-detail" tabindex="0">Method Details</a>
<ol class="toc-list">
<li><a href="#normalize(double)" tabindex="0">normalize(double)</a></li>
<li><a href="#isWraparound(double,double)" tabindex="0">isWraparound(double, double)</a></li>
</ol>
</li>
</ol>
</nav>
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<h1 title="Class Longitude" class="title">Class Longitude</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>
<div class="inheritance"><a href="Angle.html" title="class in org.apache.sis.measure">Angle</a>
<div class="inheritance">Longitude</div>
</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/io/Serializable.html" title="class or interface in java.io" class="external-link">Serializable</a></code>, <code><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Comparable.html" title="class or interface in java.lang" class="external-link">Comparable</a>&lt;<a href="Angle.html" title="class in org.apache.sis.measure">Angle</a>&gt;</code>, <code><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Formattable.html" title="class or interface in java.util" class="external-link">Formattable</a></code></dd>
</dl>
<hr>
<div class="horizontal-scroll">
<div class="type-signature"><span class="modifiers">public final class </span><span class="element-name type-name-label">Longitude</span>
<span class="extends-implements">extends <a href="Angle.html" title="class in org.apache.sis.measure">Angle</a></span></div>
<div class="block">A longitude angle in decimal degrees.
Positive longitudes are East, while negative longitudes are West.
The longitude symbol is the Greek lower-case letter lambda (λ).
<p>Longitudes are not necessarily relative to the Greenwich meridian. The
<a href="../../../../../org.apache.sis.referencing/org/apache/sis/referencing/datum/DefaultPrimeMeridian.html" title="class in org.apache.sis.referencing.datum">prime meridian</a>
depends on the context, typically specified through the geodetic reference frame of a
<a href="../../../../../org.apache.sis.referencing/org/apache/sis/referencing/crs/DefaultGeographicCRS.html" title="class in org.apache.sis.referencing.crs">geographic CRS</a>.</p>
<h2 id="immutability-and-thread-safety-heading">Immutability and thread safety</h2>
This final class is immutable and thus inherently thread-safe.</div>
<dl class="notes">
<dt>Since:</dt>
<dd>0.3</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="Latitude.html" title="class in org.apache.sis.measure"><code>Latitude</code></a></li>
<li><a href="AngleFormat.html" title="class in org.apache.sis.measure"><code>Angle­Format</code></a></li>
<li><a href="../../../../../org.apache.sis.referencing/org/apache/sis/geometry/CoordinateFormat.html" title="class in org.apache.sis.geometry"><code>Coordinate­Format</code></a></li>
<li><a href="../../../../../serialized-form.html#org.apache.sis.measure.Longitude">Serialized Form</a></li>
</ul>
</dd>
</dl>
</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>static final double</code></div>
<div class="col-second even-row-color"><code><a href="#MAX_VALUE" class="member-name-link">MAX_VALUE</a></code></div>
<div class="col-last even-row-color">
<div class="block">Maximum usual value for longitude (+180.0°).</div>
</div>
<div class="col-first odd-row-color"><code>static final double</code></div>
<div class="col-second odd-row-color"><code><a href="#MIN_VALUE" class="member-name-link">MIN_VALUE</a></code></div>
<div class="col-last odd-row-color">
<div class="block">Minimum usual value for longitude (-180.0°).</div>
</div>
</div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(double)" class="member-name-link">Longitude</a><wbr>(double&nbsp;λ)</code></div>
<div class="col-last even-row-color">
<div class="block">Construct a new longitude with the specified angular value.</div>
</div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(java.lang.String)" class="member-name-link">Longitude</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;string)</code></div>
<div class="col-last odd-row-color">
<div class="block">Constructs a newly allocated <code>Longitude</code> object that contain the angular value
represented by the string.</div>
</div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(org.opengis.geometry.DirectPosition)" class="member-name-link">Longitude</a><wbr>(<a href="https://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>&nbsp;position)</code></div>
<div class="col-last even-row-color">
<div class="block">Constructs a newly allocated object containing the longitude value of the given position.</div>
</div>
</div>
</section>
</li>
<!-- ========== 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-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" aria-labelledby="method-summary-table-tab0">
<div class="summary-table three-column-summary">
<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 boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#isWraparound(double,double)" class="member-name-link">is­Wraparound</a><wbr>(double&nbsp;west,
double&nbsp;east)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns <code>true</code> if the given longitude range crosses the anti-meridian in a way expressed by
<var>west</var> &gt; <var>east</var>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static double</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#normalize(double)" class="member-name-link">normalize</a><wbr>(double&nbsp;λ)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns the given longitude value normalized to the [<a href="#MIN_VALUE">-180.0</a><a href="#MAX_VALUE">180.0</a>
range (upper value is exclusive).</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-Angle">Methods inherited from class&nbsp;<a href="Angle.html" title="class in org.apache.sis.measure">Angle</a></h3>
<code><a href="Angle.html#compareTo(org.apache.sis.measure.Angle)">compare­To</a>, <a href="Angle.html#degrees()">degrees</a>, <a href="Angle.html#equals(java.lang.Object)">equals</a>, <a href="Angle.html#formatTo(java.util.Formatter,int,int,int)">format­To</a>, <a href="Angle.html#hashCode()">hash­Code</a>, <a href="Angle.html#radians()">radians</a>, <a href="Angle.html#toString()">to­String</a></code></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/25/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/25/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/25/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/25/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/25/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/25/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/25/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/25/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/25/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">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="MIN_VALUE">
<h3>MIN_VALUE</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">MIN_VALUE</span></div>
<div class="block">Minimum usual value for longitude (-180.0°).</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="../../../../../org.apache.sis.referencing/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.html#getMinimumValue()"><code>Default­Coordinate­System­Axis​.get­Minimum­Value()</code></a></li>
<li><a href="../../../../../constant-values.html#org.apache.sis.measure.Longitude.MIN_VALUE">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="MAX_VALUE">
<h3>MAX_VALUE</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">MAX_VALUE</span></div>
<div class="block">Maximum usual value for longitude (+180.0°).</div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="tag-list-long">
<li><a href="../../../../../org.apache.sis.referencing/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.html#getMaximumValue()"><code>Default­Coordinate­System­Axis​.get­Maximum­Value()</code></a></li>
<li><a href="../../../../../constant-values.html#org.apache.sis.measure.Longitude.MAX_VALUE">Constant Field Values</a></li>
</ul>
</dd>
</dl>
</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;(double)">
<h3>Longitude</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">Longitude</span><wbr><span class="parameters">(double&nbsp;λ)</span></div>
<div class="block">Construct a new longitude with the specified angular value.
This constructor does <strong>not</strong> <a href="#normalize(double)">normalize</a> the given value.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>λ</code> - longitude value in decimal degrees.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(java.lang.String)">
<h3>Longitude</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">Longitude</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;string)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NumberFormatException.html" title="class or interface in java.lang" class="external-link">NumberFormatException</a></span></div>
<div class="block">Constructs a newly allocated <code>Longitude</code> object that contain the angular value
represented by the string. The string should represent an angle in either fractional
degrees (e.g. 45.5°) or degrees with minutes and seconds (e.g. 45°30').
The hemisphere (E or W) is optional (default to East).
<p>This is a convenience constructor mostly for testing purpose, since it uses a fixed
locale. Developers should consider using <a href="AngleFormat.html" title="class in org.apache.sis.measure"><code>Angle­Format</code></a> for end-user applications
instead of this constructor.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>string</code> - a string to be converted to a <code>Longitude</code>.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/NumberFormatException.html" title="class or interface in java.lang" class="external-link">Number­Format­Exception</a></code> - if the string does not contain a parsable angle,
or represents a longitude angle.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="AngleFormat.html#parse(java.lang.String)"><code>Angle­Format​.parse(String)</code></a></li>
</ul>
</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(org.opengis.geometry.DirectPosition)">
<h3>Longitude</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">Longitude</span><wbr><span class="parameters">(<a href="https://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>&nbsp;position)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/IllegalArgumentException.html" title="class or interface in java.lang" class="external-link">IllegalArgumentException</a></span></div>
<div class="block">Constructs a newly allocated object containing the longitude value of the given position.
For this method, the longitude value is defined as the angular value associated to the first axis
oriented toward <a href="https://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html#EAST" title="class or interface in org.opengis.referencing.cs" class="external-link">East</a> or <a href="https://www.geoapi.org/3.0/javadoc/org.opengis.geoapi/org/opengis/referencing/cs/AxisDirection.html#WEST" title="class or interface in org.opengis.referencing.cs" class="external-link">West</a>.
Note that this is not necessarily the <i>geodetic longitudes</i> used in
<a href="../../../../../org.apache.sis.referencing/org/apache/sis/referencing/crs/DefaultGeographicCRS.html" title="class in org.apache.sis.referencing.crs">geographic CRS</a>;
it may also be <i>geocentric longitudes</i>.
<p>If the axis direction is West, then the sign of the coordinate value is inverted.
If the coordinate value uses another angular units than <a href="Units.html#DEGREE">degrees</a>,
then a unit conversion is applied.</p></div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>position</code> - the coordinate from which to extract the longitude value in degrees.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/25/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 coordinate it not associated to a CRS,
or if no axis oriented toward East or West is found, or if that axis does
not use <a href="Units.html#isAngular(javax.measure.Unit)">angular units</a>.</dd>
<dt>Since:</dt>
<dd>0.8</dd>
</dl>
</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="normalize(double)">
<h3>normalize</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">normalize</span><wbr><span class="parameters">(double&nbsp;λ)</span></div>
<div class="block">Returns the given longitude value normalized to the [<a href="#MIN_VALUE">-180.0</a><a href="#MAX_VALUE">180.0</a>
range (upper value is exclusive). If the given value is outside the longitude range, then this
method adds or subtracts a multiple of 360° in order to bring back the value to that range.
<p>Special cases:</p>
<ul>
<li><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Double.html#NaN" title="class or interface in java.lang" class="external-link">NaN</a> values are returned unchanged</li>
<li>±∞ are mapped to NaN</li>
<li>±180° are both mapped to -180° (i.e. the range is from -180° inclusive to +180° <em>exclusive</em>)</li>
<li>±0 are returned unchanged (i.e. the sign of negative and positive zero is preserved)</li>
</ul>
Note that the given value should not be greater than 4×10⁸ degrees if a centimetric precision is desired.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>λ</code> - the longitude value in decimal degrees.</dd>
<dt>Returns:</dt>
<dd>the given value normalized to the [-180 … 180)° range, or NaN if the given value was NaN of infinite.</dd>
<dt>Since:</dt>
<dd>0.4</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="Latitude.html#clamp(double)"><code>Latitude​.clamp(double)</code></a></li>
</ul>
</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="isWraparound(double,double)">
<h3>isWraparound</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isWraparound</span><wbr><span class="parameters">(double&nbsp;west,
double&nbsp;east)</span></div>
<div class="block">Returns <code>true</code> if the given longitude range crosses the anti-meridian in a way expressed by
<var>west</var> &gt; <var>east</var>. For the purpose of this method, +0 is considered "greater" than −0.
See <a href="../../../../../org.apache.sis.referencing/org/apache/sis/geometry/GeneralEnvelope.html" title="class in org.apache.sis.geometry"><code>General­Envelope</code></a> for a wraparound illustration.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>west</code> - the west bound longitude. This is the minimum value when there is no wraparound.</dd>
<dd><code>east</code> - the east bound longitude. This is the maximum value when there is no wraparound.</dd>
<dt>Returns:</dt>
<dd><code>true</code> if <var>west</var> &gt; <var>east</var> or if the arguments are (+0, −0),
<code>false</code> otherwise (including when at least one argument is NaN).</dd>
<dt>Since:</dt>
<dd>1.1</dd>
</dl>
</div>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
</div>
</body>
</html>