Output whether a pixel is a presill, a flat which borders a sill of the same height. The output of identifyflats is a 32-bit bitfield where the zeroth bit identifies flats, the first bit identifies sills and the second bit identifies presills. Presill pixels thus have the value 5, because all presills are also flats. This is more complicated to use, but it enables identifying flats, sills and presills with a single bitwise and rather than multiple checks. While we do export identifyflats, I anticipate that users are mostly likely to use it in the context of running the entire flow-routing process, so they won't need to deal with the complicated output type.
Presills are needed for #9.
src/identifyflats.c now identifies presills while scanning through the DEM.
test/random_dem.cpp adds tests for the new behavior of identifyflats.
Output whether a pixel is a presill, a flat which borders a sill of the same height. The output of
identifyflats
is a 32-bit bitfield where the zeroth bit identifies flats, the first bit identifies sills and the second bit identifies presills. Presill pixels thus have the value 5, because all presills are also flats. This is more complicated to use, but it enables identifying flats, sills and presills with a single bitwise and rather than multiple checks. While we do exportidentifyflats
, I anticipate that users are mostly likely to use it in the context of running the entire flow-routing process, so they won't need to deal with the complicated output type.Presills are needed for #9.
src/identifyflats.c now identifies presills while scanning through the DEM.
test/random_dem.cpp adds tests for the new behavior of
identifyflats
.