get distance

This block is part of the number group and was last modified in core v10.4.28.

get distance v10.4.28

Returns the difference in meters between two geo points.

In pins 3
  • from geo_point required

    Start calculating distance from

  • to geo_point required

    End location of calculating distance

  • accuracy number

    in meters

Out pins 1
  • meters number

Outputs the great-circle (haversine) distance between the two points in meters, rounded UP to the next whole meter (earth radius 6,371,000 m). Reads geo_start_point/geo_end_point when wired, otherwise the deprecated start_point/end_point objects (latitude/longitude or lat/lon keys); missing or non-numeric coordinates count as 0, and the accuracy pin is ignored. Example: identical points -> 0.

A typical wiring for get distance: from city feeds the geo_start_point pin; from city feeds the geo_end_point pin; the meters out pin feeds cast to value.

Studio canvas example for the get distance block: typical wiring for get distance.

Version history

Introduced in v10.4.28.


Back to number Return to the main group to view all sub-groups Back to geo Return to the group to view all blocks within this group