[mapserver-users] Orientation of vector symbols on a LINE
thomas bonfort
thomas.bonfort at gmail.com
Thu Aug 29 00:24:08 PDT 2013
Given that there's alot of undefined behavior with vector symbols, the
documentation for anchorpoint is pretty clear about what is supported:
<quote>
ANCHORPOINT can be used with SYMBOLs of TYPE ellipse, pixmap, svg,
truetype and vector. To ensure proper behaviour for vector symbols,
the left and top edges of the bounding box of the symbol should be at
0.
</quote>
As a rule of thumb, VECTOR symbols are expected to work correctly if
they respect that rule, i.e. your vector POINTS should have at least
one point with x=0, at least one point with y=0, and no negative x's
or y's.
--
thomas
On 29 August 2013 09:05, Havard Tveite <havard.tveite at umb.no> wrote:
> The implementation of GAP has been fixed (center to center
> distance between symbols), and so has the calculation of
> symbol height.
> I guess that the following should work:
>
>
> STYLE
> SYMBOL "wavy_line"
> WIDTH 1
> SIZE 2
> GAP -6
>
> COLOR 0 0 0
> END
>
> Since you have y values from -1 to 1, and x values between 0
> and 6, the ratio between the height of your symbol and the
> length is 2 / 6. The ratio between size and gap should be the
> same to make the the line continuous.
>
> Håvard
>
>
> On 8/29/2013 1:31 AM, TC Haddad wrote:
>>
>>
>> Hello, I'm trying to understand symbol orientation and (maybe) use of
>> ANCHORPOINT on a line in Mapserver 6.2.
>>
>> The vector symbol that I have been using for line cartography in MapServer
>> 6.0.3 is below, and I am trying to get the same effect in Mapserver 6.2.1.
>>
>> SYMBOL
>> NAME "wavy_line"
>> TYPE vector
>> POINTS
>> 0 0
>> 1 1
>> 2 1
>> 3 0
>> 4 -1
>> 5 -1
>> 6 0
>> END
>> END
>>
>> Display in Mapserver 6.0.3:
>> https://dl.dropboxusercontent.com/u/42845001/mapserver6.0.3.png
>>
>> Relevant Style bloc from Mapserver 6.0.3:
>>
>> STYLE
>> SYMBOL "wavy_line"
>> WIDTH 1
>> SIZE 2
>> GAP -1
>> COLOR 0 0 0
>> END
>>
>> This did not translate directly to Mapserver 6.2.1, but I came close with
>> this:
>>
>> STYLE
>> SYMBOL "wavy_line"
>> WIDTH 1
>> SIZE 4
>> GAP 6
>> COLOR 0 0 0
>> END
>>
>> which produced this:
>> https://dl.dropboxusercontent.com/u/42845001/mapserver6.2.1.png
>>
>> Obviously I am missing something about how to get the symbol to orient
>> along the line, I played with ANCHORPOINT as that was new in 6.2 and it
>> seemed like the default of 0.5 0.5 should work for my symbol, but I also
>> tried several other value combinations and it seemed to merely shift the
>> symbol around laterally, while maintaining an upright orientation.
>>
>> So I'm a bit confused on how to achieve the original effect, (behavior
>> something like the equivalent of FOLLOW for Labels). Any pointers
>> appreciated...
>>
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>
> --
> Håvard Tveite
> Department of Mathematical Sciences and Technology, UMB
> Drøbakveien 31, POBox 5003, N-1432 Ås, NORWAY
> Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/
> _______________________________________________
> 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