CartesianObjectDistance() 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

CartesianObjectDistance( 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

CartesianObjectDistance() returns the minimum distance between object1 and object2 using a cartesian calculation method with the return value in unit_name. If the calculation cannot be done using a cartesian distance method (e.g., if the MapBasic Coordinate System is Lat/Long), then this function will produce an error.

See Also:

ObjectDistance() function, SphericalObjectDistance() function, Nearest statement, Farthest statement, SphericalConnectObjects() function, ConnectObjects() function, CartesianConnectObjects() function