Skip to content

FlowTopo 1.1.3

Latest

Choose a tag to compare

@hellolulujiang hellolulujiang released this 01 Nov 00:07
· 2 commits to main since this release
  • dfs_in is numbered within each basin: dfs_in = a + b - seq_dfs, where b is seq_dfs at the basin's outlet and a = b - upg + 1 with upg at the outlet, so a basin keeps the block of numbers it has in seq_dfs, its outlet at a. 1.1.2 read the whole region backward, dfs_in = n - 1 - seq_dfs; the two differ by a constant within each basin and give the same upstream cells, but the numbers differ, and those of 1.1.3 are the ones FullBasin v1.1 documents. dfs_out = dfs_in + upg - 1 and the test dfs_in[p] <= dfs_in[q] <= dfs_out[p] are unchanged.
  • dfs_interval(seq_dfs, upg, outlets) and dfs_interval_geotiff(..., outlets, rows=512) take the outlets of the region's basins: index arrays on the array form, and on the GeoTIFF form the path of the region's basin table of FullBasin v1.1 (local_outlet_row, local_outlet_col, basin_cell_count) or (rows, cols). The basins must take positions 0 to n - 1 one after another, no position may be held by two cells, and basin_cell_count must equal upg at each outlet; otherwise the inputs are refused. These checks cannot prove that seq_dfs is a depth-first order of the flow network: seq_dfs and upg must come from the same flow network. The table is read as FullBasin writes it, fields split at every comma and each a plain integer; the line of a field that is missing or not an integer is named. On the GeoTIFF form seq_dfs must hold signed integers and upg integers, and one bit is kept for each cell of the sequence. The n argument of 1.1.2 is gone: the array form reads a whole region.
  • tests/test_dfs_interval.py checks, on grids of several basins, that each basin's dfs_in is its block of seq_dfs read backward, that it differs from n - 1 - seq_dfs by a constant within the basin, and that missing, extra and repeated outlets, a table that disagrees with upg, a table with a field that is not a plain integer, a position held by two cells and rasters that are not integers are refused; a table with CRLF line ends gives the same files.
  • The C tool dfs_interval/ (MERIT-FlowTopo code 1.1.1) takes the basin table and gives the same files.
  • Other results are unchanged.