Friday, January 15, 2021

SMASH 1.6.3 is out - experimental Postgis

We just released SMASH 1.6.3 on the stores. It should be available within the day.

This is basically a bugfix release, but we decided to also release one feature that will be very important in the future: postgis support.

The biggest issue with the last release is that we introduced an error trapping engine to allow the user to better send issues of the application to the developers. The problem we didn't notice for soem obscure reason is that everytime an online map tile would not be properly downloaded, this would result into a crash report. Your many email explained well the situation :-)))  This version fixes this.

We also enhanced the WMS source creator (which still needs much love) with the possibility to select the image format:

 

The note taking workflow just got a bit simpler. You can just tap on the text and the edit field is empty if the note had never been edited. This allows for less taps, which is great out in the field.

 Last but not least, we started adding PostGIS support. This will be a 2 steps effort. Step one (this one) is to add full online support. This means that you now can access the remote db view from the layers list:

Let's assume you have a test db running in your network, something like:

Then you can add a new remote db as:

you can enter the table or trigger a refresh, which will also help you in testing the connection:

you can also optionally add a where condition, if you need to load only a subset of the data.

Once the db is completed, it will stay in your list of available db datasets. Just add it as a layer to teh map using the rightmost button:

which will result in:

and on the map:

well, this looks kind of ugly. You might have seen in some previous post that SMASH supports styling via SLD specification. Well, adding style the same as we do for geopackage brings us to this:

Nice right?

Now this is a vector layer that can be selected:

The above view allows also for table data editing.

And also geometric editing is allowed:

So, why is this the first of two steps? Well, out in the field we often do not have network access, so we will need to create a solution that would allow to create a local geopackage cache, which then eventually can sync back to the remote db.

But we decided to first release the direct online postgis access, since that still has some nice usecases in situations in which the network is available. Once we have this one working stable, we will move on to the next step. So, if you are into Postgis and want to help, please test and report issues.

Enjoy!











 



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 :-)