Purpose
Returns the distance between two objects. You can call this function from the MapBasic window in MapInfo Pro.
Syntax
SphericalObjectDistance( 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
SphericalObjectDistance() 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 this function will produce an error.
See Also:
ObjectDistance() function, CartesianObjectDistance() function, Nearest statement, Farthest statement, SphericalConnectObjects() function, ConnectObjects() function, CartesianConnectObjects() function