Spatial Projects SQL (spatialSQL)
for MapInfo Professional®

Region Centroids

Region centroids are used by the MapInfo Pro. within and contains spatial operators, in automatic labeling, geocoding, and placement of thematic pie and bar charts. The appearance of maps can be improved by a suitable placement of the centroid. See this reference for MapInfo's definition of the term centroid.

"Centroid" Type

Definition

Comment

Example

Application

Test

Geometric Centroid The Centre of Mass or First Moment of Area A basic property of a polygon but can fall outside the boundary. Faster to calculate than the Visual Centroid.   External centroids cant be used by MapInfo Pro, however many shapes will produce a better result than the shifted centroid. eg,
Geometric:
Shifted:
 None
(recompute)
(Shifted)
MBR Centroid
Geometric Centroid of region MBR shifted in the X direction until it intersects the region. MapInfo method to quickly compute a valid internal point.

CentroidY(convertoregion(convertopline(object))) 

=

CentroidY(object)

 

Visual Centroid Centre of the largest circle that will fit within the region. Single (or multiple) points fitting the definition always exist regardless of polygon shape. None
(recompute)
Second Visual Centroid 
-->
'nth VC'
Centre of the largest circle that will fit within the region and not intersect the visual centroid circle. May not find a useful point. For automated methods, the validity of the point should be tested by the circle radius compared to the visual centroid radius. None
(recompute)

 

  1. In spatialSQL, the visual centroid location is accurate to about 0.5% of the largest dimension of the polygon MBR.
  2. For performance reasons, the second visual centroid is created in spatialSQL during the calculation of the visual centroid rather than using the definition above. This provides a good approximation to this location but the centre and radius have not been determined using the same methods as the VC and is less accurate. The approximation selects the furthest definable centroid from the VC, rather than the next largest.
  3. The geometric centroid test is not definitive but is useful as a quick test to see if the VC needs to be recalculated.

Browser Notes:
1. IE 5 not supported.
2. sp_relationships.htm generated by MS Visio and produces javascript errors in non-IE browsers.


Copyrightę 1998-2008 Spatial Projects Pty Ltd  ACN 085 861 310
Names used throughout this site are trademarks of their respective companies.
Last modified: Mar24, 2008