iho-ohi / TWCWG

Purpose of the repository is to facilitate easier and more efficient collaboration on TWCWG tasks, including S-104 and S-111 development.
6 stars 1 forks source link

Thinning #8

Open rmalyankar opened 3 weeks ago

rmalyankar commented 3 weeks ago

Question I have been asked - posting for TWCWG input

I was recently tasked with implementing a S-111 thinning algorithm for irregular grids in our code base. My research into the old IHO site led me to this page with the "IHO- TWCWG related tools" from years ago .

After running the projects locally via node.js, this led me to two questions:

Should the S-111 repo still incorporate a link to an updated version of them to visualize how S-111 should be rendered? Second, is the Jobard-Lefer algorithm still a good method for the thinning of S-111 data with irregular grids? I see it is used in the webapp projects, and the same creator uses it in the S111-Streamlines project, but they are years old. The specification doesn't list it as a thinning algorithm option. In short, I was wondering if you have any insight into these questions.

gseroka commented 3 weeks ago

@rmalyankar here is a response from Tom Butkiewicz (tbutkie@gmail.com), Director of the UNH vis lab:

"Roland (who is still with us at CCOM, though he moved from vis lab to ASV lab) wrote the Jobard-Lefer S-111 Streamline generation code that I think Briana was using in those web examples. It has been updated slightly in the last few years due to us using it to generate streamlines for Cesium 3D web maps (like the STOFS3D ones we did for Drix missions recently).

There are C++ and python implementations on Roland's github here: https://github.com/rolker/S111-Streamlines

The javascript version that renders alongside Google Maps hasn't been updated in a long time, but can be grabbed from here: http://vislab-ccom.unh.edu/~roland/currents/ (examples there, e.g. slgo.html still work, but make sure to use http: not https: in the URL)

I am not familiar with using Jobard-Lefer for thinning irregular grids, unless that just means not putting an arrow on every grid cell?

BTW, our more recent Cesium implementations are not technically S-111 IHO compliant, we switched the colors back to a palette that makes sense over an ENC. Someone at IHO changed the original color palette under an assumption the arrows would have a black outline, and their new colors do not contrast well with standard ENC blues."