Returns the geographic distance between two geometry objects.


MI_Distance ( geom1, geom2, unit, calculationType )


geom1 is an expression which returns a geometry,

geom2 is an expression which returns a geometry,

unit is a linear unit specification, and

calculationType is a string that indicates whether to perform a Spherical or Cartesian calculation. There is no default.


Returns the distance between the specified geomety and each countries.

select MI_Distance(MI_Box(-20,-20,20,20,'epsg:4326'),Obj,'mi','Spherical') as distance from "/Samples/NamedTables/WorldTable" where country in ('Canada','Vietnam','Brazil','China','Japan')


Calculates the distance between two geometries. The value returned is a double and represents a value in the units specified by the units argument.

Valid values for unit are the following distance units:

Value Description
mi miles
km kilometers
in inches
ft feet
yd yards
mm millimeters
cm centimeters
m meters
survey ft US Survey feet
nmi nautical miles
twip twips
pt points
pica picas
degree degrees
li links
ch chains
rd rods