GetNeighbors()

Summary

Gets the neighbors of an area feature.

Changes

From version 5.0 works on Grid CDF area layers.

Syntax

neighbors = GetNeighbors(int id, array options)

Argument Contents
id The ID of the area

No options are currently supported.

Returns

An array of integers with the IDs of the neighboring areas.

Notes

  • The current layer must be a topological area layer, which can be determined with GetDBTopology().

  • The neighbors may include the external area (ID=0).

  • Only edge (not node) neighbors are returned.

  • Works on a Grid CDF area layer.

Error Codes

Error Type Meaning
Error id is invalid

See Also

Function Summary
IsNeighbor() Determines whether two areas are neighbors
GetDBTopology() Determines whether a standard geographic file is topological
GetDEMNeighbor() Returns the ID of a neighbor of a cell in a DEM