Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

JGrass: the Horton machine (FOSS4G2008)


Published on

Horton machine presentation at FOSS4G2008

Published in: Technology
  • Be the first to comment

  • Be the first to like this

JGrass: the Horton machine (FOSS4G2008)

  1. 1. JGrass: The Horton machine <ul><ul><li>Andrea Antonello, Silvia Franceschi, Riccardo Rigon </li></ul></ul>Foss4G, Cape Town 01/10/2008
  2. 2. <ul><li>is a spatial analist, a morphologic analysis package </li></ul><ul><li>is a hydrologic analysis package </li></ul><ul><li>a thematic application subsystem, developed for decision making support </li></ul><ul><li>is the best part of JGrass </li></ul>HortonMachine: what and where
  3. 3. “ to give some quantitative and qualitative instruments for knowing the morphology of catchments” “ to supply a modern environmental modelling framework implementing current standards of the scientific community” HortonMachine: the main purposes
  4. 4. <ul><li>At the beginning it was a package of stand alone routines operating system independently, written in C using the FluidTurtle libraries and their input/output defined formats. The visualization of the calculated matrices was made with other graphical programs or with Mathematica; </li></ul><ul><li>The second step was to integrate this routines in the GIS GRASS to have a direct graphical interface in TkTcl; </li></ul><ul><li>Nowadays with the JGrass development this routines are being rewritten in Java and completely integrated in the new GIS system with a new graphical interface. </li></ul>HortonMachine: the history
  5. 5. ” marks” the basin outlets It fills the depression points contained in a DEM so that the drainage directions are defined in each point Given the Strahler number of the channel network, the subbasins up to a selected order are labeled Generates a watershed basin mask from a drainage direction map and a set of coordinates <ul><li>The commands are divided in 7 categories: </li></ul><ul><li>DEM manipulation </li></ul>HortonMachine:
  6. 6. draining area per length unit inclination angle of the gradient longitudinal, normal and planar curvatures drainage directions minimizing the deviation from the real flow drainage directions with the method of the maximal steepest descent slope module of the gradient vector slope in every site by employing the drainage directions upslope catchment area <ul><li>The commands are divided in 7 categories: </li></ul><ul><li>DEM manipulation </li></ul><ul><li>Geomophology </li></ul>HortonMachine:
  7. 7. distance of each pixel from the outlet, measured along the drainage directions extracts the channel network from the drainage directions number of sources upriver drainage density function for the basin upstream of each pixel assign numbers to the network’s links Strahler order in a basin <ul><li>The commands are divided in 7 categories: </li></ul><ul><li>DEM manipulation </li></ul><ul><li>Geomophology </li></ul><ul><li>Network related measures </li></ul>HortonMachine:
  8. 8. for each hillslope pixel its distance from the river networks, following the steepest descent subdivides the sites of a basin in 11 topographic classes (9 from subdivides the sites of a basin in the 9 topographic classes identified by the longitudinal and transversal curvatures <ul><li>The commands are divided in 7 categories: </li></ul><ul><li>DEM manipulation </li></ul><ul><li>Geomophology </li></ul><ul><li>Network related measures </li></ul><ul><li>Hillslope analyses </li></ul>HortonMachine:
  9. 9. diameter of the basin subtended to a point euclidean distance of each pixel from the outlet of the bigger basin which contains it main moments of inertia of each subnet of a channel net rescaled distance of each pixel from the outlet topographic index of a basin <ul><li>The commands are divided in 7 categories: </li></ul><ul><li>DEM manipulation </li></ul><ul><li>Geomophology </li></ul><ul><li>Network related measures </li></ul><ul><li>Hillslope analyses </li></ul><ul><li>Basin attributes </li></ul>HortonMachine:
  10. 10. sums the values of an assigned quantity from the point till the outlet the histogram of a set of data contained in a matrix with respect to the set of data contained in another matrix <ul><li>The commands are divided in 7 categories: </li></ul><ul><li>DEM manipulation </li></ul><ul><li>Geomophology </li></ul><ul><li>Network related measures </li></ul><ul><li>Hillslope analyses </li></ul><ul><li>Basin attributes </li></ul><ul><li>Statistics </li></ul>HortonMachine:
  11. 11. the Shalstab hillslope stability model the Peakflow semidistributed model for discharge calculation <ul><li>The commands are divided in 7 categories: </li></ul><ul><li>DEM manipulation </li></ul><ul><li>Geomophology </li></ul><ul><li>Network related measures </li></ul><ul><li>Hillslope analyses </li></ul><ul><li>Basin attributes </li></ul><ul><li>Statistics </li></ul><ul><li>Hydro-geomorphology </li></ul>HortonMachine:
  12. 12. The representation on a regular rectangular grid of the data constitutes the most common and most efficient form in which the terrain digital data can be found. <ul><li>HYPOTHESIS ON DTM: </li></ul><ul><li>data are significant </li></ul><ul><li>regular squared grid </li></ul><ul><li>8 direction topology </li></ul>The data in this raster form usually is made by reporting the vertical coordinate, z, for a subsequent series of points, along an assigned regular spacing profile. Digital Terrain Model
  13. 13. definition the working region pit detection definition of the drainage directions definition of the main network extraction of the interesting catchment D8 (maximum slope)‏ D8 with correction (correction on the direction of the gradient)‏ import in JGrass the starting DEM which we want to analyse individuation of the existing sub basins Example of basic geomorphologic analysis
  14. 14. The first operation to do is to fill the depression points present within a DTM so that the drainage directions can be defined in each point. Observations on this topic demonstrate that this calculation addresses lesser than the 1% of the data and that usually this depressions are given by wrong calculation in the DEM creation phase and that in fact they are not real depressions. The command used to fill the depressions is: h.pitfiller and is based on the Tarboton algorithm. First step: depitting the DTM
  15. 15. They define how water moves on the surface in relation to the topology of the study region. Flowdirection allow you to calculate the drainage directions. Hypothesis: each DEM cell drains only in one of its 8 neighbours, either adjacent or diagonal in the direction of the steepest downward slope. only 8 possible direction (see Figure for the numbering convention) in which direct the flux this is a limit of modelling the natural flow Flowdirections
  16. 16. In the map each colour represents one of the 8 drainage directions. The map contains the convention number of this directions.
  17. 17. It represents the area that contributes to a particular point of the catchment basin. It is a extremely important quantity in the geomorphologic and hydrologic study of a river basin: it is strictly related to the discharge flowing through the different points of the system in uniform precipitation conditions. On this quantity are based all the more diffusive methods used to extract the stream network from the digital models. Total contributing area
  18. 18. TCA:Total Contributing Area 1 2 3 4 5 6 7 8 9 <ul><li>Where W j is: </li></ul><ul><ul><li>1 for pixels that drain into the i-est pixel; </li></ul></ul><ul><ul><li>0 in any other case for single flow directions. </li></ul></ul>source point
  19. 19. Using the “pure” D8 method for the drainage direction estimation cause an effect of deviation from the real direction identified by the gradients. This algorithm calculates the drainage direction minimizing the deviation of the flow from the real flux direction. The deviation is calculated beginning from the pixel at highest elevation and going downstream. The deviation is calculated with a triangular construction and can be expressed as angular deviation (method D8-LAD) or as transversal distance (method D8-LTD)‏ The  parameter is used to assign a weight to the correction made to the drainage directions. This method has been developed by S. Orlandini A correction to the pure D8 method: h.draindir
  20. 20. LAD method: angular deviation LTD method: transversal deviation The deviation is cumulated from higher pixels down-hill and the D8 drainage direction is redirected to the real direction when the value is larger than an assigned threshold. If λ = 0 the deviation counter has no memory and the pixels up-hill do not affect the choice.
  21. 21. In the figures are compared the total contributing areas calculated with the pure D8 method and with the corrected method (LAD-D8). In the second case the typical maximum steepest parallelisms are not present with a representation of the flow very near to reality. Results comparison Log(TCA)‏ Log (LAD-TCA)‏
  23. 23. In flat areas or where there are manmade constructions, it can happen that the extracted channel network does not coincide with the real channel network. Network assigned method
  24. 24. Network assigned method
  25. 25. Network assigned method
  26. 26. Network assigned method
  27. 27. Threshold on the tca 1°method Channel network extraction The threshold is on the parameter: which is proportional to the stress tangential to the bottom. 2°method Threshold on the tca of the concave sites. 3°method
  28. 28. In the resulting raster map the network pixels have the 2 value and outside the network there are null values (the yellow background is kept for visualization purposes). example with threshold on the tca Channel network extraction
  29. 29. Example of a network extracted with a high threshold value. Channel network extraction
  30. 30. <ul><li>First give the basin outlet: </li></ul><ul><li>insert known coordinates of a point </li></ul><ul><li>select a point directly on the map and verify that the point is on the net (has a value of 2)‏ -> raster query tool </li></ul>Extraction of the working basin
  31. 31. <ul><li>JGrass generates two maps: </li></ul><ul><li>the mask of the extracted basin </li></ul><ul><li>a chosen map cut on the mask </li></ul>Extraction of the working basin
  32. 32. Many other modules...
  33. 33. Many other modules...
  34. 34. Many other modules...
  35. 35. Many other modules...
  36. 36. Many other modules...
  37. 37. The planar curvatures separate the concave parts from the convex ones The longitudinal curvatures highlight valleys Many other modules...
  38. 38. 9 classes 3 classes Many other modules...
  39. 39. ...didn't I say standards ? STOP!
  40. 40. <ul><li>OpenMi is a set of conceptual interfaces to do model linking and execution along a timeline chain </li></ul><ul><li>since it got an international standard and models like Sobek, Hec-ras joined the wave, the effort was done to adapt ALL the models of the Horton Machine to OpenMI </li></ul><ul><li>OpenMI is based on a pulling mechanism </li></ul>DB pit flow Trig getValues getValues getValues Horton Machine OpenMI Implementing standards: The Horton OpenMI Link
  41. 41. JGrass-Console – the scripting engine Horton Machine OpenMI JGrass-Console Engine <ul><li>linking and executing such openmi based models was a bit tricky </li></ul><ul><li>also there was the need to save scenarios, create automatisms </li></ul><ul><li>a scripting engine was designed keeping in mind a commandline console and a visual console, a kind of atelier in which to easily play with model components </li></ul>
  42. 42. Horton Machine OpenMI J-Console Engine JGrass UIBuilder GRASS JGrass-Console – the scripting engine
  43. 43. JGrass-Console – the scripting engine
  44. 44. JGrass-Console – the scripting engine
  45. 45. JGrass-Console – the scripting engine ...behind the scenes of the GUI mode - an xml file holds the gui definition and the command syntax - the gui is automatically generated, and when ok is pressed, the console command is launched. Everything goes through the console! is possible to construct complex (hybrid jgrass/grass/groovy/java) commands
  46. 46. JGrass is available at Thanks for your attention RELATED WORKSHOP: Hydrological and Geomorphological Terrain Analysis with JGrass Friday, 3 rd October 01:30 PM – 05:00 PM Building: UCT Labs Room: Pilanesberg Room (UCT Environmental and Geographic Science Lab)