Class: GeoPointReadOnly
A read-only wrapper for a GeoPoint.
Implements
Constructors
constructor
• new GeoPointReadOnly(source
): GeoPointReadOnly
Constructor.
Parameters
Name | Type | Description |
---|---|---|
source | GeoPoint | the source of the new read-only point. |
Returns
Defined in
src/sdk/geo/GeoPoint.ts:161
Accessors
lat
• get
lat(): number
The latitude of this point, in degrees.
Returns
number
the latitude of this point.
Implementation of
Defined in
src/sdk/geo/GeoPoint.ts:168
lon
• get
lon(): number
The longitude of this point, in degrees.
Returns
number
the longitude of this point.
Implementation of
Defined in
src/sdk/geo/GeoPoint.ts:176
Methods
antipode
▸ antipode(out?
): GeoPoint
Gets the antipode of this point.
Parameters
Name | Type | Description |
---|---|---|
out? | GeoPoint | The GeoPoint ot which to write the result. |
Returns
The antipode of this point.
Throws
Error if argument out
is undefined.
Implementation of
Defined in
src/sdk/geo/GeoPoint.ts:281
bearingFrom
▸ bearingFrom(other
): number
Calculates the final true bearing from another point to this point (i.e. the back azimuth from this point to the other point) along the great circle connecting the two.
Parameters
Name | Type | Description |
---|---|---|
other | LatLonInterface | The other point. |
Returns
number
The final true bearing from the other point, in degrees.
Implementation of
Defined in
src/sdk/geo/GeoPoint.ts:220
▸ bearingFrom(lat
, lon
): number
Calculates the final true bearing from another point to this point (i.e. the back azimuth from this point to the other point) along the great circle connecting the two.
Parameters
Name | Type | Description |
---|---|---|
lat | number | The latitude of the other point, in degrees. |
lon | number | The longitude of the other point, in degrees. |
Returns
number
The final true bearing from the other point, in degrees.
Implementation of
Defined in
src/sdk/geo/GeoPoint.ts:222
bearingRhumb
▸ bearingRhumb(other
): number
Calculates the constant true bearing from this point to another point along the rhumb line connecting the two.
Parameters
Name | Type | Description |
---|---|---|
other | LatLonInterface | The other point. |
Returns
number
The constant true bearing to the other point, in degrees.
Implementation of
GeoPointInterface.bearingRhumb
Defined in
src/sdk/geo/GeoPoint.ts:233
▸ bearingRhumb(lat
, lon
): number
Calculates the constant true bearing from this point to another point along the rhumb line connecting the two.
Parameters
Name | Type | Description |
---|---|---|
lat | number | The latitude of the other point, in degrees. |
lon | number | The longitude of the other point, in degrees. |
Returns
number
The constant true bearing to the other point, in degrees.
Implementation of
GeoPointInterface.bearingRhumb
Defined in
src/sdk/geo/GeoPoint.ts:235
bearingTo
▸ bearingTo(other
): number
Calculates the initial true bearing (forward azimuth) from this point to another point along the great circle connecting the two.
Parameters
Name | Type | Description |
---|---|---|
other | LatLonInterface | The other point. |
Returns
number
The initial true bearing to the other point, in degrees.
Implementation of
Defined in
src/sdk/geo/GeoPoint.ts:207
▸ bearingTo(lat
, lon
): number
Calculates the initial true bearing (forward azimuth) from this point to another point along the great circle connecting the two.
Parameters
Name | Type | Description |
---|---|---|
lat | number | The latitude of the other point, in degrees. |
lon | number | The longitude of the other point, in degrees. |
Returns
number
The initial true bearing to the other point, in degrees.
Implementation of
Defined in
src/sdk/geo/GeoPoint.ts:209
copy
▸ copy(to?
): GeoPoint
Copies this point.
Parameters
Name | Type | Description |
---|---|---|
to? | GeoPoint | An optional point to which to copy this point. If this argument is not supplied, a new GeoPoint object will be created. |
Returns
A copy of this point.
Implementation of
Defined in
src/sdk/geo/GeoPoint.ts:313
distance
▸ distance(other
): number
Calculates the great-circle distance between this point and another point.
Parameters
Name | Type | Description |
---|---|---|
other | LatLonInterface | The point to which to calculate the distance. |
Returns
number
The great-circle distance to the other point, in great-arc radians.
Implementation of
Defined in
src/sdk/geo/GeoPoint.ts:181
▸ distance(lat
, lon
): number
Calculates the great-circle distance between this point and another point.
Parameters
Name | Type | Description |
---|---|---|
lat | number | The latitude of the point to which to calculate the distance. |
lon | number | The longitude of the point to which to calculate the distance. |
Returns
number
The great-circle distance to the other point, in great-arc radians.
Implementation of
Defined in
src/sdk/geo/GeoPoint.ts:183
distanceRhumb
▸ distanceRhumb(other
): number
Calculates the distance along the rhumb line connecting this point with another point.
Parameters
Name | Type | Description |
---|---|---|
other | LatLonInterface | The other point. |
Returns
number
The rhumb-line distance to the other point, in great-arc radians.
Implementation of
GeoPointInterface.distanceRhumb
Defined in
src/sdk/geo/GeoPoint.ts:194
▸ distanceRhumb(lat
, lon
): number
Calculates the distance along the rhumb line connecting this point with another point.
Parameters
Name | Type | Description |
---|---|---|
lat | number | The latitude of the other point, in degrees. |
lon | number | The longitude of the other point, in degrees. |
Returns
number
The rhumb-line distance to the other point, in great-arc radians.
Implementation of
GeoPointInterface.distanceRhumb
Defined in
src/sdk/geo/GeoPoint.ts:196
equals
▸ equals(other
, tolerance?
): boolean
Checks whether this point is equal to another point. Two points are considered equal if and only if the great-
circle distance between them is less than or equal to a specified tolerance or if the latitude and longitude
components of both points are equal to NaN
.
Parameters
Name | Type | Description |
---|---|---|
other | LatLonInterface | The other point. |
tolerance? | number | The tolerance of the equality check, defined as the maximum allowed distance between two equal points in great-arc radians. |
Returns
boolean
Whether this point is equal to the other point.
Implementation of
Defined in
src/sdk/geo/GeoPoint.ts:300
▸ equals(lat
, lon
, tolerance?
): boolean
Checks whether this point is equal to another point. Two points are considered equal if and only if the great-
circle distance between them is less than or equal to a specified tolerance or if the latitude and longitude
components of both points are equal to NaN
.
Parameters
Name | Type | Description |
---|---|---|
lat | number | The latitude of the other point, in degrees. |
lon | number | The longitude of the other point, in degrees. |
tolerance? | number | The tolerance of the equality check, defined as the maximum allowed distance between two equal points in great-arc radians. |
Returns
boolean
Whether this point is equal to the other point.
Implementation of
Defined in
src/sdk/geo/GeoPoint.ts:302
offset
▸ offset(bearing
, distance
, out?
): GeoPoint
Offsets this point by an initial bearing and distance along a great circle.
Parameters
Name | Type | Description |
---|---|---|
bearing | number | The initial true bearing (forward azimuth), in degrees, by which to offset. |
distance | number | The distance, in great-arc radians, by which to offset. |
out? | GeoPoint | The GeoPoint to which to write the result. If not supplied, a new GeoPoint object is created. |
Returns
The offset point.
Throws
Error if argument out
is undefined.
Implementation of
Defined in
src/sdk/geo/GeoPoint.ts:253
offsetRhumb
▸ offsetRhumb(bearing
, distance
, out?
): GeoPoint
Offsets this point by a constant bearing and distance along a rhumb line.
Parameters
Name | Type | Description |
---|---|---|
bearing | number | The true bearing, in degrees, by which to offset. |
distance | number | The distance, in great-arc radians, by which to offset. |
out? | GeoPoint | The GeoPoint to which to write the result. If not supplied, a new GeoPoint object is created. |
Returns
The offset point.
Throws
Error if argument out
is undefined.
Implementation of
Defined in
src/sdk/geo/GeoPoint.ts:268
toCartesian
▸ toCartesian(out
): Float64Array
Calculates the cartesian (x, y, z) representation of this point, in units of great-arc radians. By convention, in the cartesian coordinate system the origin is at the center of the Earth, the positive x-axis passes through 0 degrees N, 0 degrees E, and the positive z-axis passes through the north pole.
Parameters
Name | Type | Description |
---|---|---|
out | Float64Array | The vector array to which to write the result. |
Returns
Float64Array
The cartesian representation of this point.
Implementation of
Defined in
src/sdk/geo/GeoPoint.ts:295