Skip to main content

Class: GeoPointReadOnly

Defined in: src/sdk/geo/GeoPoint.ts:174

A read-only wrapper for a GeoPoint.

Implements

Constructors

Constructor

new GeoPointReadOnly(source): GeoPointReadOnly

Defined in: src/sdk/geo/GeoPoint.ts:179

Constructor.

Parameters

ParameterTypeDescription
sourceGeoPointthe source of the new read-only point.

Returns

GeoPointReadOnly

Accessors

lat

Get Signature

get lat(): number

Defined in: src/sdk/geo/GeoPoint.ts:186

The latitude of this point, in degrees.

Returns

number

the latitude of this point.

The latitude of this point, in degrees.

Implementation of

GeoPointInterface.lat


lon

Get Signature

get lon(): number

Defined in: src/sdk/geo/GeoPoint.ts:194

The longitude of this point, in degrees.

Returns

number

the longitude of this point.

The longitude of this point, in degrees.

Implementation of

GeoPointInterface.lon

Methods

antipode()

antipode(out?): GeoPoint

Defined in: src/sdk/geo/GeoPoint.ts:306

Gets the antipode of this point.

Parameters

ParameterTypeDescription
out?GeoPointThe GeoPoint ot which to write the result.

Returns

GeoPoint

The antipode of this point.

Throws

Error if argument out is undefined.

Implementation of

GeoPointInterface.antipode


bearingFrom()

Call Signature

bearingFrom(other): number

Defined in: src/sdk/geo/GeoPoint.ts:243

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
ParameterTypeDescription
otherReadonly<LatLonInterface>The other point.
Returns

number

The final true bearing from the other point, in degrees, or NaN if this point and the other point are coincident or antipodal. If this point is one of the poles, then the bearing will be expressed relative to the direction in which the meridian defined by this point's longitude crosses the pole rather than true north.

Implementation of

GeoPointInterface.bearingFrom

Call Signature

bearingFrom(lat, lon): number

Defined in: src/sdk/geo/GeoPoint.ts:245

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
ParameterTypeDescription
latnumberThe latitude of the other point, in degrees.
lonnumberThe longitude of the other point, in degrees.
Returns

number

The final true bearing from the other point, in degrees, or NaN if this point and the other point are coincident or antipodal. If this point is one of the poles, then the bearing will be expressed relative to the direction in which the meridian defined by this point's longitude crosses the pole rather than true north.

Implementation of

GeoPointInterface.bearingFrom


bearingRhumb()

Call Signature

bearingRhumb(other): number

Defined in: src/sdk/geo/GeoPoint.ts:256

Calculates the constant true bearing from this point to another point along the rhumb line connecting the two.

Parameters
ParameterTypeDescription
otherReadonly<LatLonInterface>The other point.
Returns

number

The constant true bearing to the other point, in degrees.

Implementation of

GeoPointInterface.bearingRhumb

Call Signature

bearingRhumb(lat, lon): number

Defined in: src/sdk/geo/GeoPoint.ts:258

Calculates the constant true bearing from this point to another point along the rhumb line connecting the two.

Parameters
ParameterTypeDescription
latnumberThe latitude of the other point, in degrees.
lonnumberThe longitude of the other point, in degrees.
Returns

number

The constant true bearing to the other point, in degrees.

Implementation of

GeoPointInterface.bearingRhumb


bearingTo()

Call Signature

bearingTo(other): number

Defined in: src/sdk/geo/GeoPoint.ts:230

Calculates the initial true bearing (forward azimuth) from this point to another point along the great circle connecting the two.

Parameters
ParameterTypeDescription
otherReadonly<LatLonInterface>The other point.
Returns

number

The initial true bearing to the other point, in degrees, or NaN if this point and the other point are coincident or antipodal. If this point is one of the poles, then the bearing will be expressed relative to the direction in which the meridian defined by this point's longitude crosses the pole rather than true north.

Implementation of

GeoPointInterface.bearingTo

Call Signature

bearingTo(lat, lon): number

Defined in: src/sdk/geo/GeoPoint.ts:232

Calculates the initial true bearing (forward azimuth) from this point to another point along the great circle connecting the two.

Parameters
ParameterTypeDescription
latnumberThe latitude of the other point, in degrees.
lonnumberThe longitude of the other point, in degrees.
Returns

number

The initial true bearing to the other point, in degrees, or NaN if this point and the other point are coincident or antipodal. If this point is one of the poles, then the bearing will be expressed relative to the direction in which the meridian defined by this point's longitude crosses the pole rather than true north.

Implementation of

GeoPointInterface.bearingTo


copy()

copy(to?): GeoPoint

Defined in: src/sdk/geo/GeoPoint.ts:338

Copies this point.

Parameters

ParameterTypeDescription
to?GeoPointAn optional point to which to copy this point. If this argument is not supplied, a new GeoPoint object will be created.

Returns

GeoPoint

A copy of this point.

Implementation of

GeoPointInterface.copy


distance()

Call Signature

distance(other): number

Defined in: src/sdk/geo/GeoPoint.ts:204

Calculates the great-circle distance between this point and another point.

Parameters
ParameterTypeDescription
otherReadonly<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

GeoPointInterface.distance

Call Signature

distance(lat, lon): number

Defined in: src/sdk/geo/GeoPoint.ts:206

Calculates the great-circle distance between this point and another point.

Parameters
ParameterTypeDescription
latnumberThe latitude of the point to which to calculate the distance.
lonnumberThe 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

GeoPointInterface.distance


distanceRhumb()

Call Signature

distanceRhumb(other): number

Defined in: src/sdk/geo/GeoPoint.ts:217

Calculates the distance along the rhumb line connecting this point with another point.

Parameters
ParameterTypeDescription
otherReadonly<LatLonInterface>The other point.
Returns

number

The rhumb-line distance to the other point, in great-arc radians.

Implementation of

GeoPointInterface.distanceRhumb

Call Signature

distanceRhumb(lat, lon): number

Defined in: src/sdk/geo/GeoPoint.ts:219

Calculates the distance along the rhumb line connecting this point with another point.

Parameters
ParameterTypeDescription
latnumberThe latitude of the other point, in degrees.
lonnumberThe 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


equals()

Call Signature

equals(other, tolerance?): boolean

Defined in: src/sdk/geo/GeoPoint.ts:325

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
ParameterTypeDescription
otherReadonly<LatLonInterface>The other point.
tolerance?numberThe 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

GeoPointInterface.equals

Call Signature

equals(lat, lon, tolerance?): boolean

Defined in: src/sdk/geo/GeoPoint.ts:327

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
ParameterTypeDescription
latnumberThe latitude of the other point, in degrees.
lonnumberThe longitude of the other point, in degrees.
tolerance?numberThe 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

GeoPointInterface.equals


isValid()

isValid(): boolean

Defined in: src/sdk/geo/GeoPoint.ts:199

Checks whether this point is valid. This point is valid if and only if both latitude and longitude are finite.

Returns

boolean

Whether this point is valid.

Implementation of

GeoPointInterface.isValid


offset()

offset(bearing, distance, out?): GeoPoint

Defined in: src/sdk/geo/GeoPoint.ts:278

Offsets this point by an initial bearing and distance along a great circle.

Parameters

ParameterTypeDescription
bearingnumberThe bearing along which to offset, in degrees relative to true north. If this point is one of the poles, then the bearing will be measured relative to the direction in which the meridian defined by this point's longitude crosses the pole rather than the direction of true north.
distancenumberThe distance, in great-arc radians, by which to offset.
out?GeoPointThe GeoPoint to which to write the result. If not supplied, a new GeoPoint object is created.

Returns

GeoPoint

The offset point.

Throws

Error if argument out is undefined.

Implementation of

GeoPointInterface.offset


offsetRhumb()

offsetRhumb(bearing, distance, out?): GeoPoint

Defined in: src/sdk/geo/GeoPoint.ts:293

Offsets this point by a constant bearing and distance along a rhumb line.

Parameters

ParameterTypeDescription
bearingnumberThe true bearing, in degrees, by which to offset.
distancenumberThe distance, in great-arc radians, by which to offset.
out?GeoPointThe GeoPoint to which to write the result. If not supplied, a new GeoPoint object is created.

Returns

GeoPoint

The offset point.

Throws

Error if argument out is undefined.

Implementation of

GeoPointInterface.offsetRhumb


toCartesian()

toCartesian(out): Float64Array

Defined in: src/sdk/geo/GeoPoint.ts:320

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

ParameterTypeDescription
outFloat64ArrayThe vector array to which to write the result.

Returns

Float64Array

The cartesian representation of this point.

Implementation of

GeoPointInterface.toCartesian