[postgis-users] postgis bool::text and mapserver
Paul Ramsey
pramsey at refractions.net
Mon May 9 07:26:35 PDT 2005
Two possible things:
SELECT true::text
and see what the text representation to boolean is.
I think to do string comparisons in mapserver you use 'eq' instead of
'='.
Paul
On 9-May-05, at 7:14 AM, Didrik Pinte wrote:
> Hi,
>
> I have a problem using the latest Postigs package of the Debian GIS
> project with Debian/Sarge Mapserver package (4.4).
>
> When using boolean in EXPRESSION, the test does not work. And nothing
> displays...
>
> For example :
>
> Here is the mapserver class :
>
> CLASS
> NAME "test"
> EXPRESSION ([moved] = 't')
> COLOR 255 0 0
> OUTLINECOLOR 255 0 0
> SIZE 10
> SYMBOL "circle"
> END
>
>
> And here is the table definition :
>
> CREATE TABLE mapping
> (
> id varchar(50) NOT NULL,
> moved bool DEFAULT false,
> cartopoint geometry,
> CONSTRAINT id PRIMARY KEY (id),
> CONSTRAINT enforce_dims_cartopoint CHECK (ndims(cartopoint) = 2),
> CONSTRAINT enforce_geotype_cartopoint CHECK (geometrytype(cartopoint)
> = 'POINT'::text OR cartopoint IS NULL),
> CONSTRAINT enforce_srid_cartopoint CHECK (srid(cartopoint) = 4326)
> )
>
>
> When using psql, it works perfectly well :
>
> select text(moved) from tblgeomapping where text(moved)='t';
>
> As anybody an idea on the source of the problem ?
>
> Thanks a lot in advance for any help.
>
> Didrik Pinte
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
More information about the postgis-users
mailing list