MI_ClosestPoint - 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-02-13
ft:lastPublication
2026-02-13T17:17:07.540000
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 point geometry that represents the closest point of the destination geometry to the input geometry.

Syntax

MI_ClosestPoint (geometry1, geometry2)

Arguments

geometry1 is the given input geometry

geometry2 is the destination geometry that the closest point will be calculated from

Example

Returns the closest point on the box to the given point

MI_ClosestPoint(MI_POINT(-86.0, 32.0,'epsg:4326'), MI_BOX(-79.376,43.648,-79.383,43.663,'epsg:4326'))
 returns a point geometry MI_POINT(-79.383,43.64800000000001,'epsg:4326')

Remarks

If the closest point geometry cannot be calculated, NULL is returned.

Note: When the geometry1 is within the geometry2, the first point (vertices) of the geometry1 is returned.