Re: [mapserver-users] Wind direction files rotation using CONNECTIONTYPE uvraster
Hi Andreas, Thanks for the fix. I tried with your solution and with a simple source but it didn't change anything in the arrow direction... But Using the complex Source with and worked fine for me. Thanks again! LP On 03/05/2018 02:15 PM, Eichner, Andreas - SID wrote: > Hi, > > since you're using GDAL VRT have you tried the "Scale" and "Offset" child > elements for a VRTRasterBand? > I'd guess, using > > > -1.0 > 360.0 > ... > > > might work for you. > > > Regards, > Andreas > >> -Original Message- >> From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] >> On Behalf Of Rousseau Lambert2, Louis-Philippe (EC) >> Sent: Monday, March 05, 2018 2:46 PM >> To: mapserver-users@lists.osgeo.org >> Subject: [mapserver-users] Wind direction files rotation using >> CONNECTIONTYPE uvraster >> >> 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 >> > -- Louis-Philippe Rousseau Lambert, B.Sc. Géomaticien / Geomatician Section des Données, Performances et Standards Data, Performance and Standards Section Service Météorologique du Canada Meteorological Service of Canada Environnement et Changement Climatique Canada Environment and Climate Change Canada louis-philippe.rousseaulambe...@canada.ca (514) 421-5045 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Wind direction files rotation using CONNECTIONTYPE uvraster
Hi, since you're using GDAL VRT have you tried the "Scale" and "Offset" child elements for a VRTRasterBand? I'd guess, using -1.0 360.0 ... might work for you. Regards, Andreas > -Original Message- > From: mapserver-users [mailto:mapserver-users-boun...@lists.osgeo.org] > On Behalf Of Rousseau Lambert2, Louis-Philippe (EC) > Sent: Monday, March 05, 2018 2:46 PM > To: mapserver-users@lists.osgeo.org > Subject: [mapserver-users] Wind direction files rotation using > CONNECTIONTYPE uvraster > > 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 > ___ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Wind direction files rotation using CONNECTIONTYPE uvraster
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 ___ mapserver-users mailing list mapserver-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users