MapWindow Home
Search MapWindow.org


  • Home
    • Download
    • Why MW
    • FAQ
    • Contact
  • Products
    • MapWindow
    • ActiveX
    • Plug-ins
  • Software Dev
    • Sample Code
    • Scripts
    • Source
    • Bugs
    • Support
    • Languages
  • Site Tools
    • Forums
    • Tutorials
    • Mailing Lists
    • Team
    • Site Stats
    • Links
  • Get Stuff
    • Buy a CD
    • Buy a T-Shirt
    • MW Book
    • ActiveX Book
    • Donate
    • Buy Support
  • Documentation
    • MWGIS App. User Guide
    • GISTools User Guide
    • MW Plug-ins Dev. Guide
    • MWGIS ActiveX Dev. Guide
    • MWGeoProc Dev. Guide

MapWinGeoProc:Utils CentroidOfPart

From MapWindow GIS

Jump to: navigation, search

CentroidOfPart

Syntax

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

Summary

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.

Parameters

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.

Returns

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

Remarks

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 "http://www.mapwindow.org/wiki/index.php/MapWinGeoProc:Utils_CentroidOfPart"
Views
  • Page
  • Discussion
  • View source
  • History
Personal tools
  • Log in / create account
  • What links here
  • Related changes
  • Upload file
  • Special pages
  • Printable version
  • Permanent link

Geospatial Software Lab

Copyright © 2008 - MapWindow Open Source Team
( last updated: November 12 2008.)
Home | Donate | Download | MapWindow GIS Desktop | MapWinGIS.ocx | Plug-ins | Contact | Lists | Bugs | Sample Code | Documentation
Code Repository | Open Source License | Discussion Forum | Wiki | Join the Team | Site Statistics | Links