Showing posts with label hortonmachine. Show all posts
Showing posts with label hortonmachine. Show all posts

Wednesday, February 10, 2021

HydroloGIS turns 16 + joining Aries

Today it’s HydroloGIS’ birthday. We count 16 years of passionate open source engagement in the fields of GIS and environmental engineering, against the odds of those that told us in the face that you can’t live on open source and share your work and your knowledge for free. 
 

Well, in our 16th birthday we have one big news to share. It is with great pleasure that we announce the start of our collaboration with the team of Artificial Intelligence for Environment and Sustainability (in short ARIES) of the Basque Center for Climate Change. 
 
With this collaboration we finally close a circle going back to our roots: integrated modelling for the environment. This is how we started over 15 years ago, developing and maintaining the open source project of the Hortonmachine. Having the possibility to join what we think is the most important open source project addressing integrated modelling, is huge for us. 
Silvia will be working on water related modelling, mostly hydrology and hydraulics. Andrea will be joining the klab core engine team as a GIS expert.

So don’t be confused if you find us on the Aries page. We are still HydroloGIS, but with a beautiful breeze of research that flows steadily through our souls. :-)
 
And so that it is clear, the Hortonmachine project will be strengthened by this collaboration (klab already uses the Hortonmachine modules) and the SMASH and Geopaparazzi projects will move on as they were doing before, in case you were worried.

Ahhh, life's goood!

Wednesday, January 6, 2021

Hortonmachine 0.10.0 released - get a grip on your basins size

It sure is a while that I don't post about the Hortonmachine. While we work a lot on it and with it, it always kind of stays in background. Well today we decided to make a new release due to some tools that will be used in production environments. And I think one is definitely worth to mention.

Some of you might have used the netnumbering module to extract subbasins on a network. The module also accepts monitoring points to allow splitting the basin in fixed points. 

For a watershed like this:

The result is something like:

Now, some models, as for example Riccardo Rigon's Geoframe, need a bit more control over the basin's size. This is why, on Riccardo's request, we added the possibility to set a desired output basins size and  buffer threshold, to handle some degree of flexibility.

It has been quite some fun and recursive exercise to aggregate in the best possible way basins that are too small. We added plantuml mindmap outputs to be able to better check the way the hierarchy is getting merged. This has been really helpful, in particular to check large basins and also to check on monitoring point positions, which is where basins are meant to keep a fixed border.

 Here the mindmap of the above basin, with references to areas and fixed basins:


and finally the aggregated basins mindmap assuming a desired basin size of 100000 cells (10*10 meters here) and a 20% of threshold:


and the resulting subbasins map:

The result is quite nifty, given the fact that the only basins that do not obey to the 20% buffer are either basins that are fixed and at the very top (so they can't be merged with anyone) or basin 6 which is "blocked" between 2 fixed basins, so same as before, no way to enlarge it by aggregation.

Well, you can find a release containing the tools at the usual release download site of the Hortonmachine here.

Enjoy! We surely did :-)


 




Thursday, May 23, 2019

A new HM tool: the las info viewer

In the open source world there are by now several tools to visualize and manage pointclouds. Over the years in our field of study (forestry) we simply found that viewing pointclouds in 3D is fancy, everyone wants it, but in the end it is mostly useless. That is clearly just my opinion, since all the tools out there have a nice 3D view of the data. Still we felt we needed something more suitable for our needs. And since the Hortonmachine already has a lot of tools to handle las data, why not aggregate them into a simple viewer that would allow us to quickly analyze a set of data, visually understand its issues, content, outlayers, intensity variations, etc etc?

Let's have a look at what we came up til now.

The viewer: once you open it, looks like this:


You can load las/laz files and set filters on any of the properties of a las point, as well as define a subregion or some subsampling. This is particularly useful when you load huge datasets as for example terrestrial scans.

First, let's load a aerial scan from our local administration:


Some header information about the file is shown as well as information about the first point of the file.
By default coloring is done based on elevation.

But one can select also intensity:


A popup on the map view shows some stats about the currently visible data. There for example we can see that intensity reaches over 5000.

Let's try to set an intensity range filter between 0 and 500. The result now is:


Hmmm, it seems we still have some "outlayers". Let's check all the points in which intensity is higher than 300 then:


It seems save to filter some more, let's say 0 to 300:


Well, better, but intensity is anyways always a mess in las data :-D

Let's have  a look at classification:


or impulses (they might be handy to understand smaller areas?):


Well, maybe we could add a DTM and have a feeling about the canopy height model (switching back to coloring by elevation)?


Hmmm, coloring looks odd, there might be some outlayers... the stats, now that the DTM is involved, also tell us the height from the ground. It seems we have trees of around 500 meters. Let's have a look where all point with height major than 80 meters are placed:


Oh, look, this seems a border problem coming from the difference with the DTM. Well, let's just get rid of them by selecting a smaller region:


and load it:


Now this looks way better. Maybe let's try to filter away the ground by thresholding the data post DTM difference at 1.3 meters:


Just know that you can export what you see as new las file or shapefile and use that for some further analyses.

But let us see an example with a more dense pointcloud, coming from a terrestrial laser scan done at the University.

Since the las file is of 3 giga, if is safe to first load it with a sumsampling of 1 point every 1000:


Then we can narrow down the area and reload the data without subsampling:


Looking at the first point table we see that the point's color information is available. Let's use that coloring:



By selecting a subregion and pushing the 3D button we can also check where the markers were placed and where we left our bag :-D


or maybe check the scan area:


It is also possible to enable the horizontal slicing mode. Once done and defined the slice interval and the width of each slice, you can load the data. This will populate the slices combobox with the different slice elevations. By selecting one, the map view will update with the slice:


Let's look for a slice where the trees are better identified:


And now push the extract circles button (mind, the tools is highly experimental and will need some love in future):


You will find that the trees extraction is not so bad (there are some false positives and negatives) and it nicely keeps the information about the radius. If your data had a proper referencing you can then export those to a shapefile.

Conclusions

This is a usual tool done without funding to help us doing our daily job. As such you have to know how to use it and maybe get used to it, else it will turn against you and make you crazy. Also it is not particularly memory saving, even if one can decide what to load into memory.

That said, we will put it in the next hortonmachine release, so if you like, enjoy it!





Thursday, October 5, 2017

JGrasstools back in black: The Horton Machine - Part 1

I have to admit that when in far 2002, working at the University of Trento, Faculty of Environmental Engineering, we published the first release of The Horton Machine, I never thought we would ever change that name. The Horton Machine was a collection of around 40 GRASS modules written in C and dedicated to advanced Hydrology and Geomorphology. They represented the effort of the passed 10 years (now around 20) of professor Riccardo Rigon and his team.

At that time Riccardo and I were dreaming about a nice to use GUI for GRASS that would allow GRASS to be used more outside of the academic domain. In 2003 we started the JGrass project with that objective: create a userfriendly GUI for GRASS. The reaction of the GRASS community was bad, mostly (so they said) because Java was not open source. Also QGis was coming and becoming the natural choice for being an interface to GRASS.

Not at all in the mood of religious wars in 2006 we decided to join the java tribe and moved our resources to support the uDig project, where we happily lived and developed for many many years. We kind of stayed between two worlds, still using GRASS and its mapsets, but living in the userfriendly java world. :-)

At that time the processing libraries for Hydrology and Geomorphology (as well as LiDAR and forestry later on) were extracted into a library that could be used in standalone mode or inside uDig. That library, as a logical follow-up, got the name JGrasstools.

Had I only known better! In some (rare, but still!) occasions I and other JGrasstools developers have been asked why we still use the name JGrasstools, since we are not directly "bound" to GRASS. Well, I have been fighting over this a few times and had no hard feeling about this, apart of the huge work that it would have been to change everything. 

The last time it happened, was at the Foss4g conference in Paris. At the end of a great presentation given by Silvia about the tools we developed for forestry management using LiDAR data, (again) a member of the GRASS community asked the same old question in the questions interval dedicated to the presentation: Why do you still call it JGrasstools....?

This was the final straw for me. I still have to understand why people do certain things, but one thing was sure for me: we had to change that name, to make some of the GRASS community members sleep sweet dreams, and to be finally free!

So this is it. After 15 years of continuous development on the JGrasstools core, we go back to our origins: The Horton Machine.

The Horton Machine is now something more than just Hydrology and Geomorphology, there are other projects that support interaction with the mobile digital field mapping app Geopaparazzi, a module that supports interaction with spatial databases (also on android), the LESTO modules developed with the team of professor Giustino Tonon at the Free University of Bolzano... and beyond other things... also the plugins for the Desktop GIS gvSIG.

It has been quite an exercise to make this namespace migration and has taken me days between code refactoring, domain registration, maven publishing updates, documentation updating (still much work to be done there) and and and... but it is done now. Many will sleep sweet dreams, and I will be the first. And maybe at the next conference someone will ask a question related to the content of the presentation. Don't know what? A hint: "How did you get such a high single tree extraction rate from LiDAR data with your tools?" ;-)
 

 What will happen now?

Before the 13 international gvSIG conference we will do the first HortonMachine branded release and the together with it the connected release if gvSIG plugins.

Also maven releases of the modules will be done. At the time JGrasstools was at version 0.8.1. The HortonMachine will most probably start at 0.9.0. It sure should have been a major number, but well, we still need to reach the first major. :-)

In the next post we will show you what you will find in the release. Stay tuned!