|
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) |
|
-
In spatialSQL, the visual centroid location
is accurate to about 0.5% of the largest dimension of the polygon MBR.
-
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.
-
The geometric centroid test is not definitive but is useful as a
quick test to see if the VC needs to be recalculated.
|
|