<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:12.0pt;
        font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Aptos",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:11.0pt;
        mso-ligatures:none;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="FR-CA" style="font-size:11.0pt">Hi, <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR-CA" style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">I am tagging along this thread as I’m also very interested to see if there is a simple answer to fix this behaviour
</span><span style="font-size:11.0pt;font-family:"Segoe UI Emoji",sans-serif">😊</span><span style="font-size:11.0pt"> This is also an issue we had with using UVRaster connection in MapServer with non-global weather models on our side.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Luckily for us, we also have access to the wind direction and wind speed variables for our non-global models and ending up using those variables instead, because the wind speed and direction are corrected
 properly to be relative to the North instead of using the wind vector components (U and V) which are always relative to the model’s grid axis.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">For this we needed to update the styles, we were using though as it is not the regular use for the UVRaster connection type. Because we are passing the wind direction and speed directly and variables, we are
 using the U and V values accordingly for the styles. In our case U becomes the speed and V the direction instead of using uv_length and uv_angle.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">MapServer class example: <o:p>
</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">CLASS<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">NAME "0 - 5 kts"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">EXPRESSION ([v] > 0.00 AND [v] <= 5)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">STYLE<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">  COLOR 0 0 127<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">  SYMBOL "arrow_wind"<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">   ANGLE [u]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">  SIZE 12<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">END<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">END<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">For your curiosity, here is a layer example using this method in our viewer
<a href="https://eccc-msc.github.io/msc-animet/?layers=RDPS_10km_Winds_10m;0.75;0;1;WindBarbs_Sfc;1&extent=-9741945,4535177,-6122844,8024751&overlays=Boundaries&range=84,5,l,PT1H">
MSC AniMet</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">Maybe this could also be useful on your side ?
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">LP<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="FR-CA" style="font-family:"Courier New";color:black">--
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR-CA" style="font-family:"Courier New";color:black">Louis-Philippe Rousseau-Lambert, B.Sc.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR-CA" style="font-family:"Courier New";color:black">Spécialiste en géomatique / Geomatics Specialist<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR-CA" style="font-family:"Courier New";color:black">Systèmes de données géospatiales et ouvertes<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black">Geospatial and Open Data Systems<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black">Service Météorologique du Canada<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR-CA" style="font-family:"Courier New";color:black">Meteorological Service of Canada<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="FR-CA" style="font-family:"Courier New";color:black">Environnement et Changement Climatique Canada<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black">Environment and Climate Change Canada<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black">louis-philippe.rousseaulambert@ec.gc.ca<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Courier New";color:black">(438) 801-0599<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> MapServer-users <mapserver-users-bounces@lists.osgeo.org>
<b>On Behalf Of </b>Alistair Everett via MapServer-users<br>
<b>Sent:</b> Monday, October 6, 2025 6:17 AM<br>
<b>To:</b> Seth G <sethg@geographika.co.uk><br>
<b>Cc:</b> MapServer Users <mapserver-users@lists.osgeo.org><br>
<b>Subject:</b> Re: [MapServer-users] UVRASTER reprojection<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Hi Seth,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks for your reply, we're just reprojecting the data. I'll take a closer look at the test case too, since it seems like that should be reprojecting from stereographic to geographic. I should also be able to pull together some test data
 in the next few days too, I can open an issue with it when I've put it together.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Here are a couple of example requests:<br>
<br>
One in EPSG:4326<br>
localhost:8000/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&FORMAT=image%2Fpng&STYLES=wind_barb&TRANSPARENT=TRUE&TIME=2025-10-06T07%3A00%3A00Z&DIM_PRESSURE=50.0&DIM_REFERENCE_TIME=2025-10-06T03%3A00%3A00Z&LAYERS=wind_pl_vector_meps_det_vdiv_2_5km_calculations&WIDTH=1304&HEIGHT=1504&CRS=EPSG%3A3857&BBOX=-2460529.2703191666%2C4596419.518351211%2C6809846.057963322%2C15288631.55342549<br>
<br>
<a href="https://pasteboard.co/jI1eMKaj3PT1.png">https://pasteboard.co/jI1eMKaj3PT1.png</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">This is one in EPSG:3411:<br>
localhost:8000/wms?REQUEST=GetMap&SERVICE=WMS&VERSION=1.3.0&FORMAT=image%2Fpng&STYLES=wind_barb&TRANSPARENT=TRUE&TIME=2025-10-06T16%3A00%3A00Z&DIM_PRESSURE=50.0&DIM_REFERENCE_TIME=2025-10-06T03%3A00%3A00Z&LAYERS=wind_pl_vector_meps_det_vdiv_2_5km_calculations&WIDTH=1438&HEIGHT=1504&CRS=EPSG%3A3411&BBOX=404935.5094684181%2C-3769428.4764078585%2C4977748.7994076125%2C1013263.5876175575<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="https://pasteboard.co/IHZjgXibtLyJ.png">https://pasteboard.co/IHZjgXibtLyJ.png</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Alistair<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Sun, 5 Oct 2025 at 10:00, Seth G <<a href="mailto:sethg@geographika.co.uk">sethg@geographika.co.uk</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">Hi Alistair,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Could you give an example request (I presume it is WMS?)? Are you rotating your map at all, or is it just the projection?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">There are some tests which reproject a UVRASTER LAYER at <a href="https://github.com/MapServer/MapServer/blob/29e4ae81620a2c50201101c763df0b9d8d540b67/msautotest/wxs/wms_uvraster_map_reprojection.map" target="_blank">https://github.com/MapServer/MapServer/blob/29e4ae81620a2c50201101c763df0b9d8d540b67/msautotest/wxs/wms_uvraster_map_reprojection.map</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">It sounds like an oversight, so if you are able to create a standalone test case, it would be worth opening an issue.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Seth<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div id="m_-6400047891240047954sig62266145">
<div>
<p class="MsoNormal">--<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">web:<a href="https://geographika.net/" target="_blank">https://geographika.net</a> & <a href="https://mapserverstudio.net/" target="_blank">https://mapserverstudio.net</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">mastodon: @<a href="mailto:geographika@mastodon.social" target="_blank">geographika@mastodon.social</a><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">On Fri, Oct 3, 2025, at 11:59 AM, Alistair Everett via MapServer-users wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt" id="m_-6400047891240047954qt">
<div>
<div>
<div>
<p class="MsoNormal">Hi all,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I'm trying to use the UVRASTER connection to plot wind barbs. I noticed if I request the layer in a different projection the location of the arrows are reprojected but the angle, and presumably vector components, are not - rather they remain
 in the same direction relative to my screen. It's a little unclear from the documentation if this is the expected behaviour for UVRASTER or not? I included a pasteboard link to a screenshot to show what I mean, compare for example vectors in the corners of
 the data and you will see they point in the same direction relative to my screen, rather than being rotated to match the projection.
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">If this is expected, does anyone have any suggested ways of working around this?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">If this is not expected, does anyone have any ideas what I've done wrong? I can provide some sample data if someone wants to try to reproduce.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I'm using: MapServer version 8.4.0 PROJ version 9.4 GDAL version 3.11 OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO SUPPORTS=ICONV SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER
 SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=OGCAPI_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS SUPPORTS=PBF INPUT=JPEG INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE INPUT=FLATGEOBUF<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Screenshot: <a href="https://pasteboard.co/WTgbexDmQaAe.png" target="_blank">
https://pasteboard.co/WTgbexDmQaAe.png</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Example mapfile: <a href="https://pastebin.com/ibPc6gVK" target="_blank">
https://pastebin.com/ibPc6gVK</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Alistair<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">-----------------------------<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Dr Alistair Everett<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Senioringeniør / Senior Software Engineer<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Avdeling for Geoutvikling<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Phone: +47 939 68 985<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Email: <a href="mailto:alistair.everett@met.no" target="_blank">
alistair.everett@met.no</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Meteorologisk Institutt,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Henrik Mohns plass 1, <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">0313 Oslo<o:p></o:p></p>
</div>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-family:"Arial",sans-serif;color:black">-----------------------------</span><span style="color:#500050"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><b><span style="font-family:"Arial",sans-serif;color:black">Dr Alistair Everett</span></b><span style="color:#500050"><o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal">Senioringeniør / Senior Software Engineer<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Avdeling for Geoutvikling<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><b><span style="color:black">Phone:</span></b><span style="color:black"> +47 939 68 985</span><o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"><b><span style="color:black">Email:</span></b><span style="color:black"> </span><a href="mailto:alistaire@met.no" target="_blank"><span style="color:#1155CC">alistair.everett@met.no</span></a><o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><b>Meteorologisk Institutt</b>,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Henrik Mohns plass 1, <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">0313 Oslo<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<p class="MsoNormal">_______________________________________________<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">MapServer-users mailing list<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="mailto:MapServer-users@lists.osgeo.org" target="_blank">MapServer-users@lists.osgeo.org</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</body>
</html>