Maptitude GISDK Help |
Gets the centroid location of an area feature.
c = GetCentroid(integer area_id)
Argument |
Contents |
area_id |
The ID of an area feature |
A coordinate indicating the location of the area centroid.
GetCentroid() works only when the current layer is an area layer.
SetLayer("States")
id = RH2ID(LocateRecord("States", "Name", {"Arizona"}))
ctr = GetCentroid(id)
CenterMap(curr_map, ctr)
Error Type |
Meaning |
Error |
The current layer is of the wrong type |
NotFound |
There is no area with the specified ID in the current layer |
Function |
Summary |
Get the coordinates that describe an area feature |
|
Gets a point internal to an area |
|
Gets a point internal to a polygon |
©2025 Caliper Corporation | www.caliper.com |