custom GRASS modules
As many users of GRASS probably do, I changed some modules and scripts or wrote my own modules/scripts. Of general interest for other GRASS users could be the modules below.
r.watershed: flow accumulation with multiple flow direction (MFD)
With multiple flow direction (MFD), water can flow from one cell to several neighboring cells. With single flow direction (SFD), water can flow from one cell only to one neighboring cell. SFD is the original method used by r.watershed. Flow accumulation calculated with multiple flow direction (MFD) gives better results with high-resolution elevation maps and in generally flat areas.
MFD is ready for testing, source code in grass7 svn repository.
What it looks like, example with elev_lid792_1m of nc sample dataset
Flow accumulation with MFD:
Flow accumulation with SFD:
Basins with MFD:
Basins with SFD:
v.simplify, an alternative to v.generalize with emphasis on area integrity
v.generalize offers several different algorithms for line simplification and line smoothing. v.simplify only uses the Douglas-Peucker algorithm for line/boundary simplification.
The difference between the two modules is that v.simplify maintains topology during the simplification process, whereas v.generalize starts with a clean slate and builds topology only at the end. That means, v.simplify is more conservative with regard to topology, noticeable particularly with boundary simplification, less so with line simplification. Areas are never deleted and boundary simplification does not take place if it would result in changes of centroids. Category numbers and attribute tables are maintained throughout. Further on, v.simplify can remove duplicate points in a line or boundary, i.e. two adjacent points with identical coordinates. v.simplify does the work with a temporary vector and copies only alive lines/boundaries to the output vector in order to avoid the presence of dead lines/boundaries and to reduce file size.
Also see the enclosed README file. The source code is in line_simplification.tar.gz


