Maptitude GISDK Help |
Computes the area of a closed polygon.
result = GetPolygonArea(array coords)
Argument |
Contents |
coords |
An array of coordinates that define an area |
A real number indicating the area of the polygon in map units.
The polygon is defined by an array of coordinates that begins and ends with the same point.
GetPolygonArea() handles only simple polygons. If the polygon is made up of separate islands or has holes, each island or hole must be treated as a separate polygon.
The area calculation is a spherical calculation that is performed on the surface of earth.
// Use this code in a toolbox tool or the immediate execution
s = ClickShape()
a = GetPolygonArea(s)
ShowMessage("Your area is " + r2s(a) + " square " + GetMapUnits())
Error Type |
Meaning |
Error |
The polygon is invalid |
Function |
Summary |
Gets the coordinates that describe an area feature |
|
Computes the great circle distance between two coordinates |
|
Returns the area of the feature in current map units |
©2025 Caliper Corporation | www.caliper.com |