wellenvogel / ochartsng

3 stars 1 forks source link

missleaging light sectors #13

Open quantenschaum opened 1 month ago

quantenschaum commented 1 month ago

I stumbled upon the following: The light Travemünde, N-Mole is shown on the map to have a white sector to NE, but this white sector is actually a fog light. In normal operation this light has one red and one green sector. IMHO this is misleading and potentially very dangerous.

ochartsng

compare to http://waddenzee.duckdns.org/#17/53.96171/10.88879

QMAP

quantenschaum commented 1 month ago

OpenCPN also shows the white sector, but when the magnified sectors are displayed, you see the fainter white/yellow sector and the green sector.

OpenCPN

quantenschaum commented 1 month ago

Same issue at Fehmarnsund bridge. The coloured sectors are completely covered by the fog light sector.

image

image

wellenvogel commented 1 month ago

Thanks for bringing this up. Unfortunately the radius handling for those lights is a bit chaotic - and as I took over the handling from OpenCPN... Do you have a pointer to the style that is doing this at your site? I did not really check if the handling is in line with the standard.

quantenschaum commented 1 month ago

I use QGIS for the styling and rendering. You can design it interactively and then run it in server mode and let MapProxy seed pull the tiles into the cache.

The instructions for the style are in https://github.com/quantenschaum/mapping/blob/master/bsh.qgs

quantenschaum commented 1 month ago

For my taste, the sector radii are generally too small compared to a classic (paper) chart to be able to read the sectors accurately.

I made the fog light arc dashed and added "(fog)" to the label to indicate, that it is exhibited during fog only.

wellenvogel commented 1 month ago

I agree on the size. Most probably I will add an option to scale the arcs and sectors independently from the symbol scale (currently they scale with the symbols). Adding more text is always an issue of readability. And yes - dashed is nice - but requires more work in the code - and most probably more render time. So maybe I will come back to this a bit later.

quantenschaum commented 1 month ago

Nice. I made the radius proportional to the range of light and the map scale and clamped it to fixed limits. Fog lights get a factor of 0.7. Arcs with a radius below a threshold (20) are not shown at all.

from QGIS clamp(0,60*if(valnmr,valnmr/30,1)*200000/@map_scale,50)*if(exclit=3,if(uband>3,0.7,0),1) (units are QGIS millimeters)