MapWinGeoProc:Utils CentroidOfPart

This is a back-up of the WIKI.
Not all links might work
We're working on a new wiki.

Main Page | Recent changes | View source | Page history | Log in / create account |

Printable version | Disclaimers | Privacy policy



 MapWinGIS.Point CentroidOfPart(MapWinGIS.Shape polygon, int PartIndex)


This function will calculate the centroid for a specific part of a
Mapwinshape. If the shape has only one part, the integer value
PartIndex will be ignored, and the centroid for the entire shape
will be calculated.


polygon MapWinGIS.Shape of type
POLYGON/POLYGONZ/POLYGONM to obtain the centroid of or containing
the specific part to obtain the centroid of.
PartIndex The integer index value of the part in
polygon to find the centroid of. This value will be ignored if
there is only one part in the polygon, and teh centroid for the
entire shape will be returned.


A MapWinGIS.Point representing the position of the
two dimensional centroid of the part of polygon specified by


Initially authored by Ted Dunsford on 6/23/2006
Derived from Angela's algorithm, but heavily modified

Visual Basic Net 2005 Example Implementation Code
Visual C# 2005 Example Implementation Code
Back to Utils

Retrieved from ""

This page has been accessed 967 times. This page was last modified on 26 June 2006, at 03:22.