[mapserver-users] Wind direction files rotation using CONNECTIONTYPE uvraster

Rousseau Lambert2, Louis-Philippe (EC) louis-philippe.rousseaulambert2 at canada.ca
Mon Mar 5 05:46:26 PST 2018


Hi all,

What I'm trying to do:

  *   I want to display wind arrows using 2 files: wind direction and wind speed. I am using the "CONNECTIONTYPE uvraster" feature to display our arrows. Because we don't have U and V wind vectors in the North-South direction for some models, we use the WIND and WDIR files which are respectively wind speed and wind direction (in the North-South direction, or Earth relative). So as input for my layer in MapServer I have a VRT where band 1 is the wind direction (from 0 to 360 degres) and band 2 is the wind speed. Instead of letting MapServer calculates the resulting arrows speed and direction I'm using the raw value of u ([u]) as wind direction and the raw value of v ([v]) as my wind speed. So far so good.

My problem is:

  *   The arrow rotation is done using the ANGLE keyword and [u] (wind direction). But the ANGLE rotates the arrows in the counter clockwise direction while the wind direction files increase in a clockwise direction... Because we are using wind direction and wind speed files (raw values of [u] and [v]) we can't use the [uv_minus_angle] and I know that MapServer docs says that no processing can be done on the ANGLE feature. I know that I would have to do some pre-processing (like 360-[u]) and that would solve the problem. But I would have to do this for hundreds of file per day and I'm trying to avoid as much as possible pre-processing.

Can you guys think of a solution that would not require pre-processing? I tried playing with the arrow position and other little things but I could not make it work correctly and I'm pretty much out of ideas...

Thanks

LP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20180305/758890cd/attachment.html>


More information about the mapserver-users mailing list