JGrass and uDig, chronicles of a lovestory

4,512 views

Published on

Presentation at foss4g 2007

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,512
On SlideShare
0
From Embeds
0
Number of Embeds
170
Actions
Shares
0
Downloads
107
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • JGrass and uDig, chronicles of a lovestory

    1. 1. JGrass and uDig, chronicles of a lovestory a preview of JGrass 3.0 Andrea Antonello - HydroloGIS CUDAM of the University of Trento University of Urbino Victoria 2007-09-25
    2. 2. ...and at the very first begin there was the GIS... GRASS
    3. 3. ...but it seemed to suffer from an academical and poweruser sindrome... <ul><li>used a lot in academic field, but has problems to get to professionals and public administrations in Italy </li></ul><ul><li>created on unix based systems and exploits its capacities on those systems best </li></ul><ul><li>as for all the high level things, the level of contents is proportional to the complexity of the initial learning curve </li></ul>The community feels the need for graphical interfaces ...Qgis, Tcltk, Python, Java...
    4. 4. ...and then there was JGrass...
    5. 5. JGrass 1.0 <ul><li>JGrass 1.0 starts in 2004 from the collaboration of the C.U.D.A.M. of the University of Trento and the I.C.E.N.S. of Kingston </li></ul><ul><li>the aim is to expand GRASS with a usability such to get it out of the academic environment to the average user </li></ul><ul><li>it gets born basically as a java GUI to GRASS released under GPL </li></ul><ul><li>the project encounters difficulties to expand and build up a community, in part because of the java-choice, which was criticised to be non-GPL </li></ul><ul><li>the major sponsor is the C.U.D.A.M. through projects </li></ul>JGrass choses a precise direction: the protection and modeling of the territory
    6. 6. JGrass 1.0 – environmental modeling? So what? ...it gets filled up with tools developed at the University of Trento, department of hydrology and hydraulic, Faculty of Engineering hydro-geomorphologic models that work on raster basis
    7. 7. JGrass 1.0 – creation of profiles
    8. 8. JGrass 1.0 – raster map algebra
    9. 9. JGrass 1.0 – statistical analysis and reports
    10. 10. JGrass 1.0 – definition of environmental attributes rainfall data drainage direction network extraction total contributing area rescaled distances and hydrologic attributes slope, curvatures and geo-morphologic attributes
    11. 11. JGrass 1.0 – Peakflow: the hydrologic model in JGrass
    12. 12. JGrass 1.0 – Shalstab: hillslope stability
    13. 13. JGrass 2.0 – searching for a community
    14. 14. JGrass 2.0 – searching for a community <ul><li>2006 JGrass 2.0 is released </li></ul><ul><li>it tries to follow the users needs, that find it very scientific but rather useless “if I can't view my shapefile in it” </li></ul><ul><li>there is an effort to create a community, since the number of stable developers at that time was oscillating between 1 and 2 </li></ul><ul><li>the foundings are not many more than before and the development goes on in the direction of those who pay </li></ul><ul><li>however some voluntary work is done getting in touch with the geotools technology in order to gain some rudimentary vector support </li></ul>
    15. 15. JGrass 2.0 – support for shapefile/postgis
    16. 16. JGrass 2.0 – support for dwg files
    17. 17. JGrass 3.0 – do not reinvent the wheel please... <ul><li>At the begin of 2007 the JGrass team decided : </li></ul><ul><li>that they had suffered enough in their solo trip </li></ul><ul><li>that they had to join one of the other vector supporting java gis community (which wasn't an easy choice, Jump-flavors, GvSig, uDig) </li></ul><ul><li>in the end to join the uDig community because of their clean framework and amount of documentation </li></ul>
    18. 18. JGrass 3.0 – joining the udig community <ul><li>Advantages: </li></ul><ul><li>find a helpful community based on bussiness mentality </li></ul><ul><li>a mature and stable base framework with available literature </li></ul><ul><li>a plugin system with extention points that “force” to a clean and robust development </li></ul><ul><li>Disadvantages: </li></ul><ul><li>rather steep development learning curve </li></ul><ul><li>uDig isn't an analysis application </li></ul>
    19. 19. JGrass 3.0 – what is behind it? <ul><li>the GRASS raster service </li></ul><ul><li>the JGrass Console </li></ul><ul><li>OpenMI </li></ul><ul><li>BIRT and charting </li></ul>
    20. 20. The GRASS raster service <ul><li>first thing was adding native support for GRASS rasters in read/write mode and a udig service was created for the GRASS workspace </li></ul>
    21. 21. The GRASS raster service <ul><li>first thing was adding native support for GRASS rasters in read/write mode and a udig service was created for the GRASS workspace </li></ul>GRASSDB : folder that holds all the locations LOCATION : holds the information of the used projection, holds all the mapsets MAPSET : the user space inside which the active working region is defined PERMANENT : particular mapset used to hold location informations ACTIVE REGION : the region definition (boundaries and resolution) inside which most GRASS commands apply
    22. 22. The GRASS raster service <ul><li>first thing was adding native support for GRASS rasters in read/write mode and a udig service was created for the GRASS workspace </li></ul>
    23. 23. The GRASS raster service <ul><li>first thing was adding native support for GRASS rasters in read/write mode and a udig service was created for the GRASS workspace </li></ul>
    24. 24. The GRASS raster service <ul><li>first thing was adding native support for GRASS rasters in read/write mode and a udig service was created for the GRASS workspace </li></ul>grass-ascii raster esri-ascii raster fluidturtle raster
    25. 25. The active region <ul><li>first thing was adding native support for GRASS rasters in read/write mode and a udig service was created for the GRASS workspace </li></ul>
    26. 26. Colortables and categories <ul><li>GRASS rasters support color ramps </li></ul>
    27. 27. Colortables and categories <ul><li>GRASS rasters support categories </li></ul>
    28. 28. How to access a raster map?
    29. 29. GRASS raster service – issues <ul><li>GRASS saves a PROJ_INFO file in the PERMANENT mapset, but that file can't be built without GRASS functions. So for now there is the need to create a PROJ_INFO.WKT in the same folder. If that file is not present, the user is asked to chose a projection. </li></ul><ul><li>Reprojection on the fly is not possible. A GRASS workspace has a predefined projection and all the maps are consistent with that. So at the moment if you are working with a GRASS workspace, that one ist the first to be dragged into the project, in order to define the projection of the map. </li></ul><ul><li>uDig doesn't support dragging folders into the catalog, so if you want to drag the GRASS location into the catalog , you first need to create an empty file with .jgrass extention. Drag that and the magic is done. </li></ul><ul><li>GRASS doesn't support alpha as a persistent value. JGrass does it by putting the alpha as a comment into GRASS's colorfile. </li></ul>Not yet completely resolved issues:
    30. 30. JGrass 3.0 – the JGrass console <ul><li>support java scripting (beanshell) </li></ul><ul><li>be extensible </li></ul><ul><li>support the JGRASS model language based on openMI standards </li></ul><ul><li>support native GRASS commands </li></ul><ul><li>be usable in batch mode in order to be used for example in web environments (geoserver?) </li></ul>
    31. 31. The JGrass console <ul><li>click on the console icon </li></ul><ul><li>the editor appears with a few advices </li></ul><ul><li>rightclick gives the menu needed for execution </li></ul>
    32. 32. The JGrass console – java scripting with beanshell <ul><li>beanshell is supported </li></ul><ul><li>methods can be defined </li></ul><ul><li>simplified java can be used </li></ul><ul><li>rightclick and chose run from the menu </li></ul><ul><li>the content of the window is executed inside the editor's own console </li></ul>
    33. 33. The JGrass console – getting GRASS into the game <ul><li>on whatever environment, if a GRASS installation is present, it can be exploited </li></ul><ul><li>a preferences page defines the needed paths </li></ul>
    34. 34. The JGrass console – getting GRASS into the game <ul><li>with GRASS configured the commands can be executed by wrapping them into grass{} </li></ul><ul><li>example output of r.info </li></ul>
    35. 35. The JGrass console – getting GRASS into the game <ul><li>with GRASS configured the commands can be executed by wrapping them into grass{} </li></ul><ul><li>example output of r.info </li></ul><ul><li>ask for help if you don't know the usage </li></ul>
    36. 36. The JGrass console – the JGrass Modeling Language <ul><li>support was created for the JGrass Modeling Language </li></ul><ul><li>it is based on OpenMI Linkable Components, that base on their fundamental methods: </li></ul><ul><li>...and other methods like prepare, finish and those for linkage </li></ul><ul><li>those components can be linked together into a pull mechanism and executed within a time interval </li></ul>
    37. 37. The JGrass console – OpenMI <ul><li>OpenMI is a set of standard interfaces that defines interaction between environmental models </li></ul><ul><li>they are beeing used worldwide on important hydrologic and hydraulic projects as obec, modflow and even Hec-Ras </li></ul><ul><li>there is no real standard for OGC in it, so for JGrass we extended the interfaces to support the feature model and RaserData, which is basically a bounding box with a defined resolution </li></ul>
    38. 38. The JGrass console – the JGrass Modeling Language <ul><li>jgrass models are wrapped into jgrass{} </li></ul><ul><li>variables can be used from the beanshell environment by using the $ sign </li></ul><ul><li>return values can be asked from the values and they then can be used in the beanshell environment </li></ul><ul><li>this gives the possibility to easyly create also complex algorythms without having to know the whole development framework – write and execute! </li></ul>
    39. 39. The JGrass console – the JGrass Modeling Language <ul><li>from the jgrass modeling language syntax on compiling time the openmi linkable components are created and linked together properly </li></ul><ul><li>also nesting of models is supported and those are linked together at runtime </li></ul>Regarding OpenMI: <ul><li>when run or compile is clicked some magic happens: the content of the editor is passed thorught a compiler which generates the openmi based components. </li></ul><ul><li>the model above would then look like... </li></ul>
    40. 40. The JGrass console – the JGrass Modeling Language
    41. 41. The JGrass console – the JGrass Modeling Language
    42. 42. The JGrass console – the JGrass Modeling Language Introducing time: <ul><li>rightclicking gives access to the session preferences </li></ul><ul><li>a different workspace can be set for different console sessions </li></ul><ul><li>time dependency with defined timesteps can be added </li></ul><ul><li>the models are then executed in a loop increasing the timestep </li></ul>
    43. 43. The JGrass console – ongoing and future work <ul><li>integration of the statistic R package into the scripting as R{} blocks </li></ul><ul><li>creation of the Visual Console based on the GEF framework </li></ul>
    44. 44. JGrass 3.0 – starting with BIRT's smallest part: charting <ul><li>eclipse based reporting system </li></ul><ul><li>does report creation as simple lists of data, more complex, also letters and documents etc etc... and... </li></ul><ul><li>CHARTS! </li></ul>
    45. 45. JGrass 3.0 – the chart view – the profile tool <ul><li>r.profile tool opens the chart view </li></ul><ul><li>clicking on the map shows the profile over the selected map </li></ul>
    46. 46. JGrass 3.0 – the chart view – the profile tool <ul><li>r.profile tool opens the chart view </li></ul><ul><li>clicking on the map shows the profile over the selected map </li></ul><ul><li>preferences can be set </li></ul>
    47. 47. JGrass 3.0 – the chart view – the profile tool <ul><li>r.profile tool opens the chart view </li></ul><ul><li>clicking on the map shows the profile over the selected map </li></ul><ul><li>preferences can be set </li></ul><ul><li>and the chart looks much better... </li></ul>
    48. 48. JGrass 3.0 – what if 3 is a dimension? <ul><li>integration of the VISAD scientific library </li></ul><ul><li>famous for its datamodel </li></ul><ul><li>supplies a 3D rendering system based on java3D </li></ul>
    49. 49. JGrass 3.0 – tools for fieldmapping <ul><li>shapes creation in runtime through a NMEA GPS </li></ul><ul><li>possibility to chose type of shape, stop, save, start from scratch or create multiple shapes </li></ul>
    50. 50. JGrass 3.0 – conclusioni <ul><li>JGrass 3.0 release is expected for February 2008 </li></ul><ul><li>released at the MIGG2008 course for geomorphologic modeling </li></ul>www.jgrass.org <ul><li>R support </li></ul><ul><li>GRASS vectors support (European Code Sprint in November?) </li></ul>
    51. 51. JGrass and uDig, chronicles of a lovestory a preview of JGrass 3.0

    ×