Calculate destination point

Supported in: Batch, Streaming

Calculates the destination point along a specified path given a starting point, course, and distance.

Expression categories: Geospatial

Declared arguments

  • Course - Current course in degrees.
    Expression<Double>
  • Distance - Distance to destination in meters.
    Expression<Double>
  • Starting point - Longitude and latitude for point a.
    Expression<GeoPoint>
  • optional Calculation method. - The path to follow along the surface of a spherical approximation of the earth. Defaults to great circle.
    Enum<Great Circle, Loxodrome/Rhumb Line>

Output type: GeoPoint

Examples

Example 1: Base case

Argument values:

  • Course: course
  • Distance: distance
  • Starting point: point_a
  • Calculation method.: GREAT_CIRCLE
point_acoursedistanceOutput
{
latitude: 48.8567,
longitude: 2.3508,
}
225.032000.0{
latitude: 48.65279552300661,
longitude: 2.0427666779658806,
}

Example 2: Base case

Argument values:

  • Course: course
  • Distance: distance
  • Starting point: point_a
  • Calculation method.: LOXODROME
point_acoursedistanceOutput
{
latitude: 48.8567,
longitude: 2.3508,
}
225.032000.0{
latitude: 48.65320703115239,
longitude: 2.0421403965968183,
}

Example 3: Null case

Argument values:

  • Course: course
  • Distance: distance
  • Starting point: point_a
  • Calculation method.: null
point_acoursedistanceOutput
{
latitude: 48.8567,
longitude: 2.3508,
}
225.032000.0{
latitude: 48.65279552300661,
longitude: 2.0427666779658806,
}

Example 4: Edge case

Argument values:

  • Course: course
  • Distance: distance
  • Starting point: point_a
  • Calculation method.: LOXODROME
point_acoursedistanceOutput
{
latitude: 42.779577,
longitude: -156.581761,
}
10.08000000.0{
latitude: 90.0,
longitude: 0.0,
}