[mapserver-users] MapServer : Problem shifting TrueType symbols on rotation

thomas bonfort thomas.bonfort at gmail.com
Tue Apr 1 08:46:48 PDT 2014


http://mapserver.org/mapfile/symbol.html => anchorpoint
https://github.com/mapserver/msautotest/blob/master/renderers/marker_anchorpoint.map
https://github.com/mapserver/msautotest/blob/master/renderers/expected/marker_anchorpoint.png

available from version 6.2 onwards.

--
thomas


On 1 April 2014 17:38, Dorian CONSTANT <dconstant at siig.fr> wrote:

> Hello everyone,
>
> First, excuse me for my bad English. J
>
>
> I have long identified a problem of rotation of symbols in MapServer when these
> symbols come from a TrueType font and they are configured as such in the "SYMBOLS.SYM"
> file.
>
> Example of symbols used in the crosswalks (the font file is attached to
> this message) :
>
>
>
> SYMBOL
>
>   NAME 'voirie_signal_horiz_ponct_pass_pieton'
>
>   TYPE TRUETYPE
>
>   FONT siig-voirie
>
>   ANTIALIAS true
>
>   CHARACTER "f"
>
> END
>
>
>
> The corresponding layer is defined as below under MapServer :
>
>
>
> LAYER
>
>      NAME " Voirie_signal_horizontale_ponct"
>
>      TYPE POINT
>
>      STATUS DEFAULT
>
>      Postgis
>
>      PROCESSING "CLOSE_CONNECTION=DEFER"
>
>      DATA "geom from voirie.v_voirie_signal_horiz_ponct USING SRID=2154
> USING UNIQUE oid"
>
>      [QUERIABLE]
>
>      Lambert 93
>
>      CLASSITEM "type_signal"
>
>      UNITS meters
>
>      SIZEUNITS pixels
>
>      MAXSCALEDENOM 1010
>
> CLASS
>
>           NAME "Passages piétons"
>
> TEXT 'f'
>
>           STYLE
>
>                 SYMBOL "voirie_signal_horiz_ponct_pass_pieton"
>
>                 COLOR 1 1 1
>
>                 OUTLINECOLOR 255 255 255
>
>                 SIZE 15
>
> ANGLE45
>
>           END
>
>      END
>
> END
>
>
>
> The problem is when a rotation is applied to the symbol, MapServer applies
> rotation from the lower left point of the symbol and not from the central attachment
> point.
>
>
>
> Accordingly, would you know of a specific configuration to be done under
> MapServer to ensure that it uses the hang central point symbols TRUETYPE
> as pivot point and not the lower left point of the symbol ?
>
>
>
> Thank you in advance.
>
>
>
> ----------------------------------------------------------------------
>
> *Dorian CONSTANT* – Responsable SIG
> *SiiG* (*S*yndicat *I*ntercommunal d’*I*nformation *G*éographique)
>
> 1005 route de Vénéjan – 30200 Saint-Nazaire
>
> *Tél*: 04.66.90.58.00 – *Fax*: 04.66.82.98.35 – *Mail*: *dconstant at siig.fr
> <dconstant at siig.fr>* – *Web*: http://www.siig.fr
>
> [image: Description : Description : Description : logo_siig2]
>
> *P*     Avant d'imprimer, ayez une pensée pour notre environnement
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140401/70760be1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image029.jpg
Type: image/jpeg
Size: 2182 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20140401/70760be1/attachment-0001.jpg>


More information about the mapserver-users mailing list