[mapserver-users] How to display vector symbols (direction andmagnitude) in MapServer?
Steve Lime
Steve.Lime at dnr.state.mn.us
Tue Aug 19 06:40:30 PDT 2008
Or a way to alter the interpretation of angles, e.g. ANGLEMODE or
something like that...
Steve
>>> On 8/19/2008 at 3:06 AM, in message <48AA7F05.1060706 at umb.no>,
Havard Tveite
<havard.tveite at umb.no> wrote:
> I don't think ANGLE can be used in your case (if you do not
> use scripting to calculate the ANGLEs yourself for each
> generated map).
>
> Is there a need for a new TAG - for instance with the name
> "ORIENTATION", that could be used to specify compass
> directions (0=north, 90=east, 180=south, 270=west) for
> point symbols?
>
> Håvard Tveite
>
> John Maurer wrote:
>> Thanks for the suggestion, Daniel! I was unaware of the ANGLE
parameter
>> in MapServer 5.0. One remaining concern I have, though, is how the
angle
>> will be interpreted by MapServer? Will -90 degrees always point to
the
>> South Pole regardless of the map projection I'm using (e.g. a polar
>> stereo map centered on the South Pole), or will it always just point
to
>> the bottom of the map image regardless of the projection? i.e. Does
>> MapServer interpret the degrees spatially or just in terms of the
image?
>> Unfortunately, if the latter is the case (which I suspect it
probably
>> is) it will not solve my problem. Do you know? Thanks again!
>> Cheers,
>> John Maurer
>>
>> Daniel Morissette wrote:
>>> John Maurer wrote:
>>>> Dear MapServer Users,
>>>> Does anybody have experience displaying vectors in MapServer? By
>>>> "vectors", I don't mean the usual vector vs. raster difference.
What
>>>> I mean is displaying data like wind vectors, which are point
>>>> locations that have both a direction (degrees) and magnitude
(e.g.
>>>> meters per second). Usually these are displayed as arrows, which
each
>>>> point in a certain direction and whose tails vary in length
depending
>>>> on the magnitude each measurement. Is this possible in MapServer?
>>>> Thanks for any suggestions!
>>> You could bind the symbol size and angle to an attribute in your
layer
>>> definition.
>>>
>>> If you can precompute the size in pixels based on the wind speed
and
>>> store that to an 'arrowsize' attribute then you could use a layer
>>> defn's like this:
>>>
>>> LAYER
>>> TYPE POINT
>>> ...
>>> CLASS
>>> SYMBOL 'arrow'
>>> ANGLE [direction]
>>> SIZE [arrowsize]
>>> COLOR 0 0 0
>>> END
>>> END
>>>
>>>
>>> If you can't precompute the arrow size in pixels, then you could
use
>>> classes based on the wind speed attribute:
>>>
>>> LAYER
>>> TYPE POINT
>>> ...
>>> CLASSITEM 'windspeed'
>>> CLASS
>>> EXPRESSION ([windspeed] < 5)
>>> SYMBOL 'arrow'
>>> ANGLE [direction]
>>> SIZE 10
>>> COLOR 0 0 0
>>> END
>>> CLASS
>>> EXPRESSION ([windspeed] < 25)
>>> SYMBOL 'arrow'
>>> ANGLE [direction]
>>> SIZE 15
>>> COLOR 0 0 0
>>> END
>>> CLASS
>>> EXPRESSION ([windspeed] < 100)
>>> SYMBOL 'arrow'
>>> ANGLE [direction]
>>> SIZE 20
>>> COLOR 0 0 0
>>> END
>>> CLASS
>>> # No expression ... catch all for windspeed > 100
>>> SYMBOL 'arrow'
>>> ANGLE [direction]
>>> SIZE 25
>>> COLOR 0 0 0
>>> END
>>> END
>>>
>>>
>>> Daniel
>>
>> --
>> John Maurer
>> Web/Database Applications Engineer
>> National Snow and Ice Data Center (NSIDC)
>> University of Colorado at Boulder
>> http://cires.colorado.edu/~maurerj
>> +1-303-586-1677
>> ------------------------------------
>> "Without geography, you're nowhere!"
>>
>>
>> _______________________________________________
>> 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