[Mapserver-users] Logical expression is not working

Eduardo Patto Kanegae eduardo at consultoria.eti.br
Wed Jun 16 11:07:45 EDT 2004


I'm trying to display a point shapefile layer using logical expressions to classify the layer according to two field values but it's not working.

my mapserver cgi is : 
MapServer version 4.2.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

if I put:

========
  LAYER
    DATA "estabs"
    NAME "estabs"
    STATUS DEFAULT
    TYPE POINT
    CLASS
      NAME "all points"
      STYLE
          COLOR 192 128 32
        SIZE 15
        SYMBOL "SYM_POINT"
      END
    END
  END
========

it works fine, but not works if I write:

+++++++++
  LAYER
    DATA "estabs"
    NAME "estabs"
    STATUS DEFAULT
    TYPE POINT
    UNITS METERS
    CLASS
      NAME "Açougue"
      EXPRESSION "(('[TIP_CODIGO]' eq '11') AND ([FLAGS] > 0))"
      STYLE
          COLOR 192 128 32
        MAXSIZE 15
        MINSIZE 5
        SIZE 15
        SYMBOL "SYM_ACOUGUE"
      END
    END
    CLASS
      NAME "Bar"
      EXPRESSION "(('[TIP_CODIGO]' eq '13') AND ([FLAGS] > 0))"
      STYLE
          COLOR 92 192 252
        MAXSIZE 15
        MINSIZE 5
        SIZE 15
        SYMBOL "SYM_BAR"
      END
    END
 END
+++++++++

it should be working, but I don't know what is wrong here...and no error log is being generated.

a "dbfinfo" of the given shapefile is returning:
...

Info for /servidor/raiz_apache/tmp/estabs
19 Columns,  7 Records in file
     TIP_CODIGO          string  (10,0)
          GEOID         integer  (9,0)
           NOME          string  (30,0)
           CNPJ          string  (18,0)
          CRECI          string  (10,0)
           FONE          string  (17,0)
          EMAIL          string  (50,0)
            URL          string  (100,0)
        CONTATO          string  (30,0)
        SIMBOLO          string  (100,0)
         BAIRRO         integer  (9,0)
     LOGRADOURO         integer  (9,0)
         NUMERO          string  (6,0)
            CEP          string  (10,0)
          EHIMO          string  (1,0)
      COMPLEMEN          string  (20,0)
          FLAGS         integer  (4,0)
         ROTULO          string  (30,0)
           INFO         integer  (9,0)

...


and a "dbfdump" of the file is returning:
:::
TIP_CODIGO     GEOID NOME                           CNPJ               CRECI      FONE              EMAIL                                              URL                                                                                                  CONTATO                        SIMBOLO                                                                                                 BAIRRO LOGRADOURO NUMERO CEP        EHIMO COMPLEMEN            FLAGS ROTULO                              INFO 
10                 0 Imobiliária Garnizé            039803455-0001/04  1234567890 (19)3871-9999     garnize at webimoveis.com                             http://www.webimoveis.com/garnize/                                                                   Juca Pirama                    C:\servidor\restritos_apache\imobizz\mapconfig\brasil\sp\valinhos\symbols\sym_imobiliaria.png               20      2080  980    (NULL)     S     (NULL)                  1  (NULL)                                 0 
10                 1 JJ Imóveis                     232394836-0001/09  0912349234 (19)3877-9402     jj at jjimoveis.com.br                                http://www.jjimoveis.com.br                                                                          Ronaldo Bacamira               C:\servidor\restritos_apache\imobizz\mapconfig\brasil\sp\valinhos\symbols\sym_imobiliaria.png               29      3195  1209   (NULL)     S     (NULL)                  3  JJ Imóveis                             0 
10                 2 Inácio & Pitanga Imobiliária   524354234-2234/01  245234592  (19)3872-7799     ip at webimoveis.com                                  http://www.webimoveis.com/ip/                                                                        Inácio                         C:\servidor\restritos_apache\imobizz\mapconfig\brasil\sp\valinhos\symbols\sym_imobiliaria.png               14      1744  2354   (NULL)     S     (NULL)                  3  Inácio & Pitanga Imobiliária           0 
08                 3 Padaria Santa Clara            293921343-9934/01  (NULL)     (19)8388-2222     santaclara at padarias.com                            (NULL)                                                                                               Joaquim Manoel                 C:\servidor\restritos_apache\imobizz\mapconfig\brasil\sp\valinhos\symbols\sym_padaria.png                    0      2275  234    (NULL)     N     (NULL)                  0  (NULL)                                 0 
08                 4 Padaria Argamassas             (NULL)             (NULL)     (NULL)            (NULL)                                             (NULL)                                                                                               (NULL)                         C:\servidor\restritos_apache\imobizz\mapconfig\brasil\sp\valinhos\symbols\sym_padaria.png                   16      2642  3664   (NULL)     N     Sala 0, piso 0          7  Padaria Argamassas                     4 
06                 5 Lanchonete Pó-pi-di            999999999-1111/02  (NULL)     (NULL)            (NULL)                                             (NULL)                                                                                               Zé das Medalhas                C:\servidor\restritos_apache\imobizz\mapconfig\brasil\sp\valinhos\symbols\sym_lanchonete.png                16      3149  999    (NULL)     N     (NULL)                  7  Lanchonete Pó-pi-di                    5 
05                 6 WO Pizza Bar                   (NULL)             (NULL)     (NULL)            (NULL)                                             (NULL)                                                                                               Fulano de Tal                  C:\servidor\restritos_apache\imobizz\mapconfig\brasil\sp\valinhos\symbols\sym_lanchonete.png                30      3198  1000   (NULL)     N     (NULL)                 15  WO Pizza Bar                           6 

:::

Eduardo Patto Kanegae
http://www.consultoria.eti.br
UIN: 303747254

Treinamento em UMN MapServer - http://www.consultoria.eti.br/ptbr/?menuoption=mapserver
I Encontro Nacional de Usuários MapServer - http://mapserver.cttmar.univali.br/encontro2004
Projeto MapServer Brasil - http://mapserver.cttmar.univali.br

***Fim da Mensagem / End of Message ***







More information about the mapserver-users mailing list