MI_CentroidWithin

Description

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

Syntax

MI_CentroidWithin ( testGeometry, containerGeometry )

Arguments

containerGeometry and testGeometry are geometry objects (or expressions).

Example

Determines if the centroid of the specified geometry lies within the specified countries.

select MI_CentroidWithin([Geometry_Column],MI_Box(-13.36676789,8.05796847,79.06334219,62.70540978,'epsg:4326')) as theResult from countries where country in ('Mauritania','Mali','Algeria')

Remarks

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

This is synonomous with MI_Contains (containerGeoemtry, testGeometry ).