MI_Distance - spectrum_spatial - Latest

Spectrum Spatial Guide

Product type
Software
Portfolio
Locate
Product family
Spectrumâ„¢ software
Product
Spectrumâ„¢ software > Spatial > Spectrum Spatial
Version
Latest
ft:locale
en-US
Product name
Spectrum Technology Platform
ft:title
Spectrum Spatial Guide
Copyright
2025
First publish date
2007
ft:lastEdition
2026-05-14
ft:lastPublication
2026-05-14T15:28:23.501000
L1_Product_Gateway
Locate
L2_Product_Segment
Location Intelligence
L3_Product_Brand
Precisely Spectrum Spatial
L4_Investment_Segment
LI Enterprise
L5_Product_Group
Enterprise LI
L6_Product_Name
Spectrum Spatial

Description

Returns the geographic distance between two geometry objects.

Syntax

MI_Distance ( geom1, geom2, unit, calculationType )

Arguments

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.

Example

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')
			

Remarks

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