<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Sep 27, 2011, at 2:03 PM, Paul Ramsey wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Once you have vectors, the classic trick I've seen for doing the barbs<br>is to do math to map the windspeed into an appropriate char() value<br>and store the barbs as TTF font entries. So you only end up with one<br>class, and the barb is an appropriately rotated label.<br></div></blockquote><div><br></div><div>This might help</div><div><a href="http://carocoops.org/bb/viewtopic.php?t=169">http://carocoops.org/bb/viewtopic.php?t=169</a></div><div><br></div><div><br></div><blockquote type="cite"><div><br>P.<br><br>On Tue, Sep 27, 2011 at 10:31 AM, Brent Fraser &lt;<a href="mailto:bfraser@geoanalytic.com">bfraser@geoanalytic.com</a>&gt; wrote:<br><blockquote type="cite">&nbsp; &nbsp;At FOSS4G I was struck by the number of presentations involving weather<br></blockquote><blockquote type="cite">data and time series display. &nbsp;Maybe I noticed because I have a need to<br></blockquote><blockquote type="cite">render wind velocity in KML, and while I haven't settled on mapserver to do<br></blockquote><blockquote type="cite">the rendering I've been wondering how to render wind barb symbols (see<br></blockquote><blockquote type="cite">attached graphics) efficiently.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">&nbsp;One problem is the source data: the magnitude is in one raster file (GRIB<br></blockquote><blockquote type="cite">format, float64) &nbsp;and the direction in another. &nbsp;GDAL's OGR library will<br></blockquote><blockquote type="cite">read the GRIB files, but I don't know of any way to use two rasters to<br></blockquote><blockquote type="cite">define a vector layer. &nbsp;I think there is some work going on with respect to<br></blockquote><blockquote type="cite">displaying vector field data in mapserver, so maybe this will be solved by<br></blockquote><blockquote type="cite">that work. &nbsp;Otherwise pre-processing the two rasters into a point datasource<br></blockquote><blockquote type="cite">containing lon,lat,speed,direction attributes may be the way to go.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">&nbsp;The other issue of wind barb symbol rendering may have to be solved by hand<br></blockquote><blockquote type="cite">constructing a barb for 0 knots, 5 knots, etc (50-ish symbols?) , and having<br></blockquote><blockquote type="cite">50-ish corresponding classes (this could be a performance problem for<br></blockquote><blockquote type="cite">mapserver). &nbsp;But I'm open to better ideas... &nbsp;SLD? &nbsp;HTTP/CGI request?,<br></blockquote><blockquote type="cite">something like one class of:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">&nbsp;CLASS<br></blockquote><blockquote type="cite">&nbsp; &nbsp;STYLE<br></blockquote><blockquote type="cite">&nbsp; &nbsp; &nbsp;GEOMTRANSFORM "start"<br></blockquote><blockquote type="cite">&nbsp; &nbsp; &nbsp;COLOR 0 255 0<br></blockquote><blockquote type="cite">&nbsp; &nbsp; &nbsp;SIZE 15.0<br></blockquote><blockquote type="cite">&nbsp; &nbsp; &nbsp;SYMBOL "<a href="http://localhost/symbolgen?[speed]">http://localhost/symbolgen?[speed]</a>"<br></blockquote><blockquote type="cite">&nbsp; &nbsp; &nbsp;ANGLE [direction]<br></blockquote><blockquote type="cite">&nbsp; &nbsp;END<br></blockquote><blockquote type="cite">&nbsp;END<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">&nbsp;but likely the cost of getting the symbol would be greater that creating 50<br></blockquote><blockquote type="cite">separate class objects.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">And for those interested in mapping and graphing weather data, have a look<br></blockquote><blockquote type="cite">at <a href="http://www.ncl.ucar.edu/Applications/">http://www.ncl.ucar.edu/Applications/</a><br></blockquote><blockquote type="cite">especially <a href="http://www.ncl.ucar.edu/Applications/barb.shtml">http://www.ncl.ucar.edu/Applications/barb.shtml</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">--<br></blockquote><blockquote type="cite">Best Regards,<br></blockquote><blockquote type="cite">Brent Fraser<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">mapserver-users mailing list<br></blockquote><blockquote type="cite"><a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br></blockquote><blockquote type="cite"><a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote>_______________________________________________<br>mapserver-users mailing list<br><a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>http://lists.osgeo.org/mailman/listinfo/mapserver-users<br></div></blockquote></div><br></body></html>