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

Eichner, Andreas - SID Andreas.Eichner at sid.sachsen.de
Mon Mar 5 06:15:08 PST 2018


Hi,

since you're using GDAL VRT have you tried the "Scale" and "Offset" child elements for a VRTRasterBand?
I'd guess, using

<VRTRasterBand band="1">
  <Scale>-1.0</Scale>
  <Offset>360.0</Offset>
  ...
</VRTRasterBand>

might work for you.


Regards,
Andreas

> -----Original Message-----
> From: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org]
> On Behalf Of Rousseau Lambert2, Louis-Philippe (EC)
> Sent: Monday, March 05, 2018 2:46 PM
> To: mapserver-users at 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
> 



More information about the mapserver-users mailing list