Skip to content

@jdultra/ultra-globe


@jdultra/ultra-globe / GeoUtils / interpolateRhumbLine

Function: interpolateRhumbLine()

interpolateRhumbLine(lon1, lat1, lon2, lat2, fraction): Object

Defined in: utils/GeoUtils.d.ts:126

Interpolates between two geographical points along a rhumb line on a spherical Earth.

Parameters

lon1

number

Longitude of the first point in degrees.

lat1

number

Latitude of the first point in degrees.

lon2

number

Longitude of the second point in degrees.

lat2

number

Latitude of the second point in degrees.

fraction

number

Fraction between 0 and 1 representing the interpolation factor. 0 returns the first point, 1 returns the second point.

Returns

Object

  • An object containing the interpolated longitude and latitude in degrees. Format:

Throws

  • Throws an error if the fraction is not between 0 and 1.