new Cartographic(longitudeopt, latitudeopt, heightopt)
A position defined by longitude, latitude, and height.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
longitude |
Number |
<optional> |
0.0 | The longitude, in radians. |
latitude |
Number |
<optional> |
0.0 | The latitude, in radians. |
height |
Number |
<optional> |
0.0 | The height, in meters, above the ellipsoid. |
- Source:
- See:
Members
(static, constant) ZERO :Cartographic
An immutable Cartographic instance initialized to (0.0, 0.0, 0.0).
Type:
- Source:
height :Number
The height, in meters, above the ellipsoid.
Type:
- Number
- Default Value:
- 0.0
- Source:
latitude :Number
The latitude, in radians.
Type:
- Number
- Default Value:
- 0.0
- Source:
longitude :Number
The longitude, in radians.
Type:
- Number
- Default Value:
- 0.0
- Source:
Methods
(static) clone(cartographic, resultopt) → {Cartographic}
Duplicates a Cartographic instance.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
cartographic |
Cartographic | The cartographic to duplicate. | |
result |
Cartographic |
<optional> |
The object onto which to store the result. |
- Source:
Returns:
The modified result parameter or a new Cartographic instance if one was not provided. (Returns undefined if cartographic is undefined)
- Type
- Cartographic
(static) equals(leftopt, rightopt) → {Boolean}
Compares the provided cartographics componentwise and returns
true
if they are equal, false
otherwise.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
left |
Cartographic |
<optional> |
The first cartographic. |
right |
Cartographic |
<optional> |
The second cartographic. |
- Source:
Returns:
true
if left and right are equal, false
otherwise.
- Type
- Boolean
(static) equalsEpsilon(leftopt, rightopt, epsilon) → {Boolean}
Compares the provided cartographics componentwise and returns
true
if they are within the provided epsilon,
false
otherwise.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
left |
Cartographic |
<optional> |
The first cartographic. |
right |
Cartographic |
<optional> |
The second cartographic. |
epsilon |
Number | The epsilon to use for equality testing. |
- Source:
Returns:
true
if left and right are within the provided epsilon, false
otherwise.
- Type
- Boolean
(static) fromCartesian(cartesian, ellipsoidopt, resultopt) → {Cartographic}
Creates a new Cartographic instance from a Cartesian position. The values in the
resulting object will be in radians.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
cartesian |
Cartesian3 | The Cartesian position to convert to cartographic representation. | ||
ellipsoid |
Ellipsoid |
<optional> |
Ellipsoid.WGS84 | The ellipsoid on which the position lies. |
result |
Cartographic |
<optional> |
The object onto which to store the result. |
- Source:
Returns:
The modified result parameter, new Cartographic instance if none was provided, or undefined if the cartesian is at the center of the ellipsoid.
- Type
- Cartographic
(static) fromDegrees(longitude, latitude, heightopt, resultopt) → {Cartographic}
Creates a new Cartographic instance from longitude and latitude
specified in degrees. The values in the resulting object will
be in radians.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
longitude |
Number | The longitude, in degrees. | ||
latitude |
Number | The latitude, in degrees. | ||
height |
Number |
<optional> |
0.0 | The height, in meters, above the ellipsoid. |
result |
Cartographic |
<optional> |
The object onto which to store the result. |
- Source:
Returns:
The modified result parameter or a new Cartographic instance if one was not provided.
- Type
- Cartographic
(static) fromRadians(longitude, latitude, heightopt, resultopt) → {Cartographic}
Creates a new Cartographic instance from longitude and latitude
specified in radians.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
longitude |
Number | The longitude, in radians. | ||
latitude |
Number | The latitude, in radians. | ||
height |
Number |
<optional> |
0.0 | The height, in meters, above the ellipsoid. |
result |
Cartographic |
<optional> |
The object onto which to store the result. |
- Source:
Returns:
The modified result parameter or a new Cartographic instance if one was not provided.
- Type
- Cartographic
clone(resultopt) → {Cartographic}
Duplicates this instance.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
result |
Cartographic |
<optional> |
The object onto which to store the result. |
- Source:
Returns:
The modified result parameter or a new Cartographic instance if one was not provided.
- Type
- Cartographic
equals(rightopt) → {Boolean}
Compares the provided against this cartographic componentwise and returns
true
if they are equal, false
otherwise.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
right |
Cartographic |
<optional> |
The second cartographic. |
- Source:
Returns:
true
if left and right are equal, false
otherwise.
- Type
- Boolean
equalsEpsilon(rightopt, epsilon) → {Boolean}
Compares the provided against this cartographic componentwise and returns
true
if they are within the provided epsilon,
false
otherwise.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
right |
Cartographic |
<optional> |
The second cartographic. |
epsilon |
Number | The epsilon to use for equality testing. |
- Source:
Returns:
true
if left and right are within the provided epsilon, false
otherwise.
- Type
- Boolean
toString() → {String}
Creates a string representing this cartographic in the format '(longitude, latitude, height)'.
- Source:
Returns:
A string representing the provided cartographic in the format '(longitude, latitude, height)'.
- Type
- String