- natcap.invest.delineateit.delineateit_core.calculate_pour_point_array(flow_dir_array, edges, nodata, offset, origin, pixel_size)¶
Return a binary array indicating which pixels are pour points.
flow_dir_array (numpy.ndarray) – a 2D array of D8 flow direction values (0 - 7) and possiby the nodata value.
edges (list) – a binary list of length 4 indicating whether or not each edge is an edge of the raster. Order: [top, left, bottom, right]
nodata (int) – the nodata value of the flow direction array
offset (cpair[int, int]) – the input flow_dir_array is a block taken from a larger raster. Offset is the (x, y) coordinate of the upper-left corner of this block relative to the whole raster as a numpy array (the raster starts at (0, 0) and each pixel is 1x1).
origin (cpair[double, double]) – the (x, y) origin of the raster from which this block was taken, in its original coordinate system. This is equivalent to elements (0, 3) of:
pixel_size (cpair[double, double]) – the (x, y) dimensions of a pixel in the raster from which this block was taken, in its original coordinate system. This is equivalent to:
set of (x, y) coordinates representing pour points in the coordinate system of the original raster. C type cset[cpair[double, double]] is automatically cast to python type set(tuple(float, float)) when this function is called from a python function.