nens / threedidepth

Calculate waterdepths for 3Di results.
Other
0 stars 0 forks source link

difference between raster from lizard and locally calculated water depth #5

Closed Jonasvsl closed 3 years ago

Jonasvsl commented 3 years ago

The maps look roughly the same but there are differences. I was expected they would be more or less the same when the users chooses the right timestep: image

I have created the 42 timestep with the toolbox, and downloaded noordpolder_testwaterdepth_calculations_jonas-water-depth-timeseries_20210126T160900Z.tif from lizard.

In the image it can be seen that in the 'local tool' some interpolation takes place creating a wobbly water surface in a canal.

the calculation I used can be found here on lizard: noordpolder_testwaterdepth_calculations_jonas

arjanverkerk commented 3 years ago

I found the cause. Who had thought of that... In Lizard we rearrange the nodes so that they are in 'morton order' - that is some optimization to limit resource usage when only a small section of the spatio-temporal extent of the result is viewed. Anyway, this reordering of the nodes apparently also results in a different Delaunay triangulation, which is what we see here... I'm not convinced that the sideeffect will always be a better looking depth result, but if the goal is getting the depth rasters of these two methods exactly the same, we should do the reordering here, too. What do you think, @Jonasvsl?

Jonasvsl commented 3 years ago

Let's make them exactly the same.

Jonasvsl commented 3 years ago

@arjanverkerk when is this expected to be fixed? I need to know so I can communicate a release date to customers.

@lexvand fyi

arjanverkerk commented 3 years ago

I'm working on a solution right now, have 80% confidence that it will result in the same triangulation as the lizard method, but it isn't trivial because here we read the result through the gridadmin and in lizard we're not. But I think it that attempt can be completed today, so some resolution by the end of the week seems a safe prediction.

arjanverkerk commented 3 years ago

The new version 0.3 tries to follow the point ordering from the lizard method. At least it solves the issue reported here. Be sure to test with a model with mixed refinement levels, since that is most likely to introduce new issues, if any.