Purpose
Returns the distance between two objects. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
ObjectDistance( object1, object2, unit_name )
object1 and object2 are object expressions.
unit_name is a string representing the name of a distance unit.
Return Value
Float
Description
ObjectDistance() returns the minimum distance between object1 and object2 using a spherical calculation method with the return value in unit_name. If the calculation cannot be done using a spherical distance method (e.g., if the MapBasic Coordinate System is NonEarth), then a cartesian distance method will be used.
See Also:
SphericalObjectDistance() function, CartesianObjectDistance() function, Nearest statement, Farthest statement, SphericalConnectObjects() function, ConnectObjects() function, CartesianConnectObjects() function