[ms4w-users] When I use an EXPRESSION in my map file using FIELD STRING, the condition never returns as true, even though I know the values exist in my table.

Orlando Giovanny Solarte Delgado orsolarte at gmail.com
Mon Nov 13 10:54:14 EST 2006


I change my sql- postgis to:

the_geom from  (
SELECT
 *
FROM VIAS
WHERE id_subcapa_espacial=116 and cod_carto='VTS'
) as tabla_temporal using srid=21891 using unique id_via

Note I use "  cod_carto='VTS'  ". This SQL function OK and only results
whith  cod_carto='VTS', but classes
whit expression  '[cod_carto]' = 'VTS' not return true.

Thanks for help!!!!


THIS IS LAYER OF MAPFILE:
****************************

  LAYER
    CLASSITEM "cod_carto"
    CONNECTION "user=postgres password=root dbname=SIRA host=localhost"
    CONNECTIONTYPE POSTGIS
    DATA "the_geom from  (
SELECT
 *
FROM VIAS
WHERE id_subcapa_espacial=116 and cod_carto='VTS'
) as tabla_temporal using srid=21891 using unique id_via

"
    LABELITEM "nombre"
      METADATA
        "layer_index"    "0"
        "selected"    "0"
        "LEGEND_ORDER"    "0"
      END
    NAME "vias palo"
    SIZEUNITS PIXELS
    STATUS ON
    TOLERANCE 5
    TOLERANCEUNITS PIXELS
    TYPE LINE
    UNITS METERS
    CLASS
      NAME "DEFAULT"
      LABEL
        ANGLE 0.000000
        ANTIALIAS TRUE
        FONT fritqat
        MAXSIZE 256
        MINSIZE 4
        SIZE 7
        TYPE TRUETYPE
        BUFFER 0
        COLOR 0 0 0
        FORCE FALSE
        MINDISTANCE -1
        MINFEATURESIZE -1
        OFFSET 0 0
        OUTLINECOLOR 255 255 255
        PARTIALS TRUE
        POSITION UL
      END
      METADATA
      END
      STYLE
        ANGLE 360
          COLOR 0 0 255
          OUTLINECOLOR 0 0 0
        SYMBOL 0
      END
      TEMPLATE "ttt"
    END
    CLASS
      NAME "('[cod_carto]' = 'VTS')"
      EXPRESSION ('[cod_carto]' = 'VTS')
      LABEL
        ANGLE 0.000000
        ANTIALIAS TRUE
        FONT fritqat
        MAXSIZE 256
        MINSIZE 4
        SIZE 7
        TYPE TRUETYPE
        BUFFER 0
        COLOR 0 0 0
        FORCE FALSE
        MINDISTANCE -1
        MINFEATURESIZE -1
        OFFSET 0 0
        OUTLINECOLOR 255 255 255
        PARTIALS TRUE
        POSITION UL
      END
      METADATA
      END
      STYLE
        ANGLE 360
          COLOR 255 0 0
          OUTLINECOLOR 0 0 0
        SYMBOL 0
      END
      TEMPLATE "ttt"
    END
    CLASS
      NAME "('[cod_carto]' = 'vts')"
      EXPRESSION ('[cod_carto]' = 'vts')
      LABEL
        ANGLE 0.000000
        ANTIALIAS TRUE
        FONT fritqat
        MAXSIZE 256
        MINSIZE 4
        SIZE 7
        TYPE TRUETYPE
        BUFFER 0
        COLOR 0 0 0
        FORCE FALSE
        MINDISTANCE -1
        MINFEATURESIZE -1
        OFFSET 0 0
        OUTLINECOLOR 255 255 255
        PARTIALS TRUE
        POSITION UL
      END
      METADATA
      END
      STYLE
        ANGLE 360
          COLOR 176 152 0
          OUTLINECOLOR 0 0 0
        SYMBOL 0
      END
      TEMPLATE "ttt"
    END
  END



2006/11/13, Orlando Giovanny Solarte Delgado <orsolarte at gmail.com>:
>
> I forget say my data are stored on PostGIS!!!!.
>
> 2006/11/13, Jeff McKenna <jmckenna at dmsolutions.ca>:
> >
> > I would try to see if OGR/GDAL can find those values using the ogrinfo
> > utility and the sql switch:
> >
> > e.g. ogrinfo -ro PG:dbname=warmerda -sql "SELECT pop_1994 from canada
> > where province_name = 'Alberta'"
> >
> > If that works, I have no idea what is wrong.
> >
> >
> > jeff
> >
> >
> >
> >
> > Orlando Giovanny Solarte Delgado wrote:
> > > Hi.
> > >
> > > When I use an EXPRESSION in my map file using FIELD STRING, the
> > > condition never returns as true, even though I know the values exist
> > in
> > > my table. <http://postgis.refractions.net/docs/ch04.html#id2525201 >
> > >
> > > I am doing something like:
> > >
> > > CLASSITEM "cod_carto"
> > >
> > > CLASS...
> > >      EXPRESSION "vts"
> > > ...
> > > END
> > > CLASS..
> > >      EXPRESSION "VTS"
> > > END
> > >
> > > I am using both lower an upper case, I know VTS value exist in my
> > table
> > > postgis, but never returns as true.
> > >
> > > Somebody can help me?
> > >
> > > --
> > > Atentamente,
> > >
> > > Orlando Giovanny Solarte Delgado
> > > Ing. Desarrollador SIG
> > > Emprendedor BioSIG
> > >
> > >
> >
> > --
> > Jeff McKenna
> > DM Solutions Group Inc.
> > http://www.dmsolutions.ca
> > _______________________________________________
> > ms4w-users mailing list
> > ms4w-users at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/ms4w-users
> >
>
>
>
> --
> Atentamente,
>
> Orlando Giovanny Solarte Delgado
> Ing. Desarrollador SIG
> Emprendedor BioSIG
>



-- 
Atentamente,

Orlando Giovanny Solarte Delgado
Ing. Desarrollador SIG
Emprendedor BioSIG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ms4w-users/attachments/20061113/424e41bb/attachment.html


More information about the ms4w-users mailing list