[postgis-users] postgis mapserver boolean expressions
David Potts
dave.potts at pinan.co.uk
Mon Mar 10 14:24:03 PDT 2008
Hi
Is there a problem with the use of the postgres boolean type in mapserver?
I have a data type of type boolean in my database type called castle
I have tried to use the following syntax(see below) , I would have assumed
that if pt.castle was set to true, then this layer would have been drawn
STATUS DEFAULT
DEBUG ON
CONNECTIONTYPE POSTGIS
CONNECTION "dbname=dday_kent user=dp42 host=localhost
port=5432"
DATA "os_ngr from (
select pt.place_id, pt.place_name,pt.os_ngr as
os_ngr ,pt.castle as castle, pt.manor
from place_table pt where pt.os_ngr is not null
)
as foo using srid=27700 using unique place_id"
CLASS
LABEL
SIZE large
OUTLINECOLOR 255 255 0
END
NAME "Castle"
SIZE 40
EXPRESSION ( '[castle]' eq 't' )
OUTLINECOLOR 0 255 0
END
I have tried expresions such as
"[castle] = "1"
"[castle] = "t"
"[castle] = "TRUE"
nothing seems to make a difference, the expression always returns false.
I am using mapserver 5.02 and postgis 1.32.
Has anybody seen anything like this before?
Dave.
--
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of the
Pinan Software
More information about the postgis-users
mailing list