[mapserver-dev] GAP with TTF symbols changed behavior in
MapServer 5.0
Thomas Bonfort
thomas.bonfort at camptocamp.com
Fri Jun 5 04:23:29 EDT 2009
I'll take the blame for that one, I made that change to follow the
documentation (which doesn't state that the symbol stays top-up, but
that a 180 degree rotation is applied). Not sure this is ever used
though, as there have been no bugs filed on this in nearly two years.
I'm not against reeanbling the previous behavior, although this would
remove the possibility to specify a simple that repeats along a line
but does not follow its orientation. I guess this can be overcome in
future versions, where GAP is moved into the styleObj, and angle can
be AUTO.
regards,
thomas
www.camptocamp.com
+33 4 79 26 57 97
On Tue, Jun 2, 2009 at 18:27, Daniel Morissette<dmorissette at mapgears.com> wrote:
> We upgraded a system from MapServer 4.10 to 5.x recently and noticed that
> the GAP changed behavior for TTF symbols in MapServer 5.0. It seems that
> this may be related to r6546, but there is no mention or explanation of the
> new behavior in the docs.
>
> I have attached an image and a sample mapfile to compare the 4.10 and 5.x
> behavior.
>
> With MapServer 4.10 and older, setting a positive GAP value would guarantee
> that the TTF symbol would be drawn "upside up" (see symbol "A" for MapServer
> 4.10 in the attached image)... and using a negative GAP value would force
> the symbol angle to follow the line direction (useful for one-way arrows,
> see symbol B in attached image).
>
> With MapServer 5.x, setting a positive GAP value results in no rotation
> (symbol A)... and a negative GAP value works as before. So we lost the
> ability to get the symbol "upside up"... and a negative GAP value is now
> required in order to get a TTF symbol that follows the angle of the line
> (e.g. for railroad tracks for instance).
>
> Was this an intentional change in behavior, because the old behavior was not
> considered useful? If yes then this needs to be documented properly in
> http://mapserver.org/mapfile/symbol.html
>
> Daniel
> --
> Daniel Morissette
> http://www.mapgears.com/
>
> MAP
> NAME "test"
> EXTENT 0 0 100 100
> SIZE 400 250
> IMAGECOLOR 242 239 233
> FONTSET "/path/to/fonts.txt"
>
> WEB
> IMAGEPATH "/var/www/tmp/"
> IMAGEURL "/tmp/"
> END
>
> SYMBOL
> NAME "A"
> TYPE truetype
> FONT sans
> CHARACTER "A"
> GAP 6
> END
>
> SYMBOL
> NAME "B"
> TYPE truetype
> FONT sans
> CHARACTER "B"
> GAP -6
> END
>
>
> LAYER
> NAME "A"
> STATUS DEFAULT
> TYPE LINE
> FEATURE
> WKT "LINESTRING(20 100, 20 60, 50 60, 100 75, 50 100)"
> END
> CLASS
> STYLE
> COLOR 255 255 255
> WIDTH 13
> ANTIALIAS TRUE
> END
> STYLE
> SYMBOL 'A'
> COLOR 180 176 177
> SIZE 10
> END
> END
> END
>
> LAYER
> NAME "B"
> STATUS DEFAULT
> TYPE LINE
> FEATURE
> WKT "LINESTRING(20 0, 20 40, 50 40, 100 25, 50 0)"
> END
> CLASS
> STYLE
> COLOR 255 255 255
> WIDTH 13
> ANTIALIAS TRUE
> END
> STYLE
> SYMBOL 'B'
> COLOR 180 176 177
> SIZE 10
> END
> END
> END
>
>
>
> END
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev
>
>
More information about the mapserver-dev
mailing list