[mapserver-users] Rendering weather data

Brent Fraser bfraser at geoanalytic.com
Tue Sep 27 15:26:30 EDT 2011


Paul,

   Does mapserver have the capability to do the math in the mapfile 
(e.g. via RFC 64)?  If not, it's another good reason to load the raster 
as a point table in a database.  And the font/anno layer method has the 
added feature of automatically decluttering the map using the 
labelcache. I may have to write a loader script....

Best Regards,
Brent Fraser


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



More information about the mapserver-users mailing list