SphericalObjectDistance() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

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