Style Symbol Problem

Peter Freimuth pf at MAPMEDIA.DE
Mon Nov 27 00:01:22 PST 2006


René F. Viancos S. schrieb:
> Hi Peter, the classitem sentence is at the begining of the layer 
> definition...
>
> i can't isolate the error... i dont know whath's wrong...
>
> Kind Regards
>
> 2006/11/26, Peter Freimuth < pf at mapmedia.de <mailto:pf at mapmedia.de>>:
>
>     René F. Viancos S. schrieb:
>     > Hi users, i have a big problem with symbols in my AVL webmapping
>     > system. the system always show the same symbol....
>     >
>     > http://200.11.84.234/tmp/1164503361121091.gif
>     <http://200.11.84.234/tmp/1164503361121091.gif>
>     > <http://200.11.84.234/tmp/1164503361121091.gif>
>     >
>     >
>     > I have a symbol file called symbols.sym, like in GMAP, and the
>     > following symbols defined (arrow angles)
>     >
>     > #1
>     > SYMBOL
>     >   NAME "1"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/0.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #2
>     > SYMBOL
>     >   NAME "2"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/15.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #3
>     > SYMBOL
>     >   NAME "3"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/30.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #4
>     > SYMBOL
>     >   NAME "4"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/45.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #5
>     > SYMBOL
>     >   NAME "5"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/60.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #6
>     > SYMBOL
>     >   NAME "6"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/75.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #7
>     > SYMBOL
>     >   NAME "7"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/90.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #8
>     > SYMBOL
>     >   NAME "8"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/105.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #9
>     > SYMBOL
>     >   NAME "9"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/120.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #10
>     > SYMBOL
>     >   NAME "10"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/135.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #11
>     > SYMBOL
>     >   NAME "11"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/150.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #12
>     > SYMBOL
>     >   NAME "12"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/165.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #13
>     > SYMBOL
>     >   NAME "13"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/180.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #14
>     > SYMBOL
>     >   NAME "14"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/195.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #15
>     > SYMBOL
>     >   NAME "15"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/210.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #16
>     > SYMBOL
>     >   NAME "16"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/225.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #17
>     > SYMBOL
>     >   NAME "17"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/240.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #18
>     > SYMBOL
>     >   NAME "18"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/255.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #19
>     > SYMBOL
>     >   NAME "19"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/270.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #20
>     > SYMBOL
>     >   NAME "20"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/285.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #21
>     > SYMBOL
>     >   NAME "21"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/300.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #22
>     > SYMBOL
>     >   NAME "22"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/315.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #23
>     > SYMBOL
>     >   NAME "23"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/330.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #24
>     > SYMBOL
>     >   NAME "24"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/345.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     > #25
>     > SYMBOL
>     >   NAME "25"
>     >   TYPE PIXMAP
>     >   IMAGE "../htdocs/images/360.gif"
>     >   TRANSPARENT 3
>     > END
>     >
>     >
>     > and i have dumped de mapObj in a map file, in order to check the
>     > different symbol id's for each style symbol , and the layer that has
>     > the symbols in this map file ( test.map) is shown as follows:
>     >
>     > LAYER
>     >     CLASSITEM "id_pos"
>     >     CONNECTION "user=postgres password=2wsdfsw234rfwersw2efr4
>     > dbname=localiza_dev host= 10.0.0.200 <http://10.0.0.200>
>     <http://10.0.0.200/>"
>     >     CONNECTIONTYPE POSTGIS
>     >     DATA "the_geom from (SELECT client_avlsrv.id AS id_pos,
>     > adm_vehiculos.id_vehiculo AS id_vehiculo, client_avlsrv.id_avl AS
>     > id_avl, adm_empresa_cliente.id_cliente AS id_cliente, pos_utm AS
>     > the_geom, client_avlsrv.t AS fecha_hora, vel, ang, nombres,
>     apellidos,
>     > marca, patente, tipo_vehiculo, substring(nombres from 0 for
>     position('
>     > ' in (nombres || ' '))) || ' ' || substring(apellidos from 0 for
>     > position(' ' in (apellidos || ' '))) as nombre_apellido  FROM
>     > ((((client_avlsrv JOIN adm_conductores ON
>     (client_avlsrv.id_conductor
>     > = adm_conductores.id_conductor)) JOIN adm_avls ON (adm_avls.id_avl =
>     > client_avlsrv.id_avl)) JOIN adm_empresa_cliente ON
>     > (adm_empresa_cliente.id_cliente = adm_conductores.id_cliente)) JOIN
>     > adm_vehiculos ON (adm_vehiculos.id_avl = adm_avls.id_avl)) WHERE
>     > client_avlsrv.id IN (12998,12997,12995,12993,12992) ORDER BY
>     > client_avlsrv.id DESC ) AS foo using srid=32719 using unique
>     id_pos"
>     >     LABELITEM "patente"
>     >       METADATA
>     >       END
>     >     NAME "Movil localiza"
>     >     SIZEUNITS PIXELS
>     >     STATUS ON
>     >     TEMPLATE "query.php"
>     >     TOLERANCEUNITS PIXELS
>     >     TYPE POINT
>     >     UNITS METERS
>     >     CLASS
>     >       NAME "Movil Patente 0"
>     >       LABEL
>     >         ANGLE 0.000000
>     >         ANTIALIAS TRUE
>     >         FONT "sans"
>     >         MAXSIZE 5
>     >         MINSIZE 5
>     >         SIZE 2
>     >         TYPE TRUETYPE
>     >         BUFFER 2
>     >         COLOR 0 0 0
>     >         FORCE TRUE
>     >         MINDISTANCE -1
>     >         MINFEATURESIZE -1
>     >         OFFSET 0 0
>     >         OUTLINECOLOR 255 255 255
>     >         PARTIALS TRUE
>     >         POSITION UC
>     >       END
>     >       METADATA
>     >       END
>     >       STYLE
>     >         ANGLE 360
>     >         BACKGROUNDCOLOR 255 0 0
>     >         COLOR 255 0 0
>     >         OUTLINECOLOR 0 0 255
>     >         SIZE 25
>     >         SYMBOL 19
>     >       END
>     >       TEMPLATE "query.html"
>     >     END
>     >     CLASS
>     >       NAME "Movil Patente 1"
>     >       LABEL
>     >         ANGLE 0.000000
>     >         ANTIALIAS TRUE
>     >         FONT "sans"
>     >         MAXSIZE 5
>     >         MINSIZE 5
>     >         SIZE 2
>     >         TYPE TRUETYPE
>     >         BUFFER 2
>     >         COLOR 0 0 0
>     >         FORCE TRUE
>     >         MINDISTANCE -1
>     >         MINFEATURESIZE -1
>     >         OFFSET 0 0
>     >         OUTLINECOLOR 255 255 255
>     >         PARTIALS TRUE
>     >         POSITION UC
>     >       END
>     >       METADATA
>     >       END
>     >       STYLE
>     >         ANGLE 360
>     >         BACKGROUNDCOLOR 255 0 0
>     >         COLOR 255 0 0
>     >         OUTLINECOLOR 0 0 255
>     >         SIZE 25
>     >         SYMBOL 2
>     >       END
>     >       TEMPLATE "query.html"
>     >     END
>     >     CLASS
>     >       NAME "Movil Patente 2"
>     >       LABEL
>     >         ANGLE 0.000000
>     >         ANTIALIAS TRUE
>     >         FONT "sans"
>     >         MAXSIZE 5
>     >         MINSIZE 5
>     >         SIZE 2
>     >         TYPE TRUETYPE
>     >         BUFFER 2
>     >         COLOR 0 0 0
>     >         FORCE TRUE
>     >         MINDISTANCE -1
>     >         MINFEATURESIZE -1
>     >         OFFSET 0 0
>     >         OUTLINECOLOR 255 255 255
>     >         PARTIALS TRUE
>     >         POSITION UC
>     >       END
>     >       METADATA
>     >       END
>     >       STYLE
>     >         ANGLE 360
>     >         BACKGROUNDCOLOR 255 0 0
>     >         COLOR 255 0 0
>     >         OUTLINECOLOR 0 0 255
>     >         SIZE 25
>     >         SYMBOL 2
>     >       END
>     >       TEMPLATE "query.html"
>     >     END
>     >     CLASS
>     >       NAME "Movil Patente 3"
>     >       LABEL
>     >         ANGLE 0.000000
>     >         ANTIALIAS TRUE
>     >         FONT "sans"
>     >         MAXSIZE 5
>     >         MINSIZE 5
>     >         SIZE 2
>     >         TYPE TRUETYPE
>     >         BUFFER 2
>     >         COLOR 0 0 0
>     >         FORCE TRUE
>     >         MINDISTANCE -1
>     >         MINFEATURESIZE -1
>     >         OFFSET 0 0
>     >         OUTLINECOLOR 255 255 255
>     >         PARTIALS TRUE
>     >         POSITION UC
>     >       END
>     >       METADATA
>     >       END
>     >       STYLE
>     >         ANGLE 360
>     >         BACKGROUNDCOLOR 255 0 0
>     >         COLOR 255 0 0
>     >         OUTLINECOLOR 0 0 255
>     >         SIZE 25
>     >         SYMBOL 17
>     >       END
>     >       TEMPLATE "query.html"
>     >     END
>     >     CLASS
>     >       NAME "Movil Patente 4"
>     >       LABEL
>     >         ANGLE 0.000000
>     >         ANTIALIAS TRUE
>     >         FONT "sans"
>     >         MAXSIZE 5
>     >         MINSIZE 5
>     >         SIZE 2
>     >         TYPE TRUETYPE
>     >         BUFFER 2
>     >         COLOR 0 0 0
>     >         FORCE TRUE
>     >         MINDISTANCE -1
>     >         MINFEATURESIZE -1
>     >         OFFSET 0 0
>     >         OUTLINECOLOR 255 255 255
>     >         PARTIALS TRUE
>     >         POSITION UC
>     >       END
>     >       METADATA
>     >       END
>     >       STYLE
>     >         ANGLE 360
>     >         BACKGROUNDCOLOR 255 0 0
>     >         COLOR 255 0 0
>     >         OUTLINECOLOR 0 0 255
>     >         SIZE 25
>     >         SYMBOL 23
>     >       END
>     >       TEMPLATE "query.html"
>     >     END
>     >   END
>     >
>     > i don't know what's wrong..
>     >
>     > Can anybody help me ??
>     >
>     >
>     > Regards
>     >
>     >
>     >
>     > --
>     > René F. Viáncos S.
>     > Director
>     > Centro de Computación
>     > e Informática, CICULS
>     > Universidad de la Serena
>     > Tel (56-51) 204269
>     > rviancos at userena.cl <mailto:rviancos at userena.cl>
>     <mailto:rviancos at userena.cl <mailto:rviancos at userena.cl>>
>     > www.userena.cl <http://www.userena.cl> <http://www.userena.cl/ >
>     Dear René,
>     if i don't miss something there is no CLASSITEM in the Layer and no
>     EXPRESSION in the different CLASSE's. So Mapserver draws all items
>     with
>     the style of your first class. All others are not taken into account.
>     Just define an expression in each CLASS to do the classification
>     and it
>     should work as expected.
>     Kind regards,
>     Peter
>
>     --
>     Mit freundlichem Gruß
>
>     Peter Freimuth
>     _________________________________________________
>     MapMedia GmbH
>     Kartographie und raumbezogene Informationssysteme
>
>     Heilbronner Straße 10
>     D-10711 Berlin Charlottenburg
>
>     fon:  +49.(0)30.89 06 82 70
>     fax:  +49.(0)30.89 06 82 73
>     mail: pf at mapmedia.de <mailto:pf at mapmedia.de>
>     net:  www.mapmedia.de <http://www.mapmedia.de>
>     pgp:  on demand
>     _________________________________________________
>
>
>
>
> -- 
> René F. Viáncos S.
> Director
> Centro de Computación
> e Informática, CICULS
> Universidad de la Serena
> Tel (56-51) 204269
> rviancos at userena.cl <mailto:rviancos at userena.cl>
> www.userena.cl <http://www.userena.cl>
>
>
> _______________________
>
> La información contenida en esta transmisión (y sus documentos 
> adjuntos), es confidencial y no puede ser usada o difundida por 
> personas distintas a su(s) destinatario(s). El uso no autorizado de la 
> información contenida en esta
> transmisión puede ser sancionado civil y criminalmente de conformidad 
> con la ley chilena. Si ha recibido esta transmisión por error, por 
> favor destrúyala y notifique al remitente. Atendido que no existe 
> certidumbre que el presente mensaje no ha sido modificado como 
> resultado de su transmisión
> por correo electrónico, o retransmitido sin alteración alguna; La 
> Univerdidad de La Serena no será responsable del contenido del mismo 
> ni puede entenderse como emanado de sus representantes legales o 
> transmitido con la autorización previa de ellos. 
OK,
I missed this. But where are the EXPRESSION's to classify your 
datapoints into your classes? Have a look at EXPRESSIONS in the CLASS 
Section of Mapserver Doku!
Kind regards,
Peter

-- 
Mit freundlichem Gruß

Peter Freimuth
_________________________________________________
MapMedia GmbH
Kartographie und raumbezogene Informationssysteme

Heilbronner Straße 10
D-10711 Berlin Charlottenburg

fon:  +49.(0)30.89 06 82 70
fax:  +49.(0)30.89 06 82 73
mail: pf at mapmedia.de
net:  www.mapmedia.de
pgp:  on demand
_________________________________________________



More information about the MapServer-users mailing list