MI_ContainsCentroid - 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
2025-03-07
ft:lastPublication
2025-03-07T10:28:48.112000

Description

Determines if the centroid of a geometry object lies within another geometry object.

Syntax

MI_ContainsCentroid ( containerGeometry, testGeometry )

Arguments

containerGeometry and testGeometry are geometry objects (or expressions).

Example

Determines if the specifed point is within Canada.

select MI_ContainsCentroid(MI_Box(-99.5,55.5,-97.5,57.5,'epsg:4326'),Obj) from countries where country='Canada'

Remarks

Returns true if the centroid of containerGeometry is contained within testGeometry, false otherwise. If either containerGeometry or testGeometry are null, false is returned. The function is performed using the coordinate system of the first argument (containerGeometry).