Next: , Previous: , Up: Internal Routines   [Contents][Index]


15.5.25 basin

basin(data [, sign, /number, /sink, /difference])

Interprets array data as an altitude map (in arbitrary dimensions) and determines to which nearest neighbor water at each location would flow (along the steepest descent if sign is negative or by default; along the steepest ascent if sign is positive or zero). For keywords /number and /sink all elements in each basin defined by a common sink (or peak) are labeled with the same number, which is different from the labels for all other basins. For /number (and by default), the labels are consecutive ordinal numbers starting at 1. For /sink, the labels are equal to the index to data of the sink of the basin. If /difference is specified, then the index offset of the visited neighbor is returned for each pixel.

See also: segment, area, area2, Topology