[postgis-users] postgis mapserver boolean expressions [SOLVED]
dave.potts at pinan.co.uk
Mon Mar 10 14:36:18 PDT 2008
After some hacking
'[castle]' =~ /t/
Does the trick, horrible and not very clear for the beginner there must
be a better way of writing a test for boolean expression!
David Potts wrote:
> 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
> 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"
> SIZE large
> OUTLINECOLOR 255 255 0
> NAME "Castle"
> SIZE 40
> EXPRESSION ( '[castle]' eq 't' )
> OUTLINECOLOR 0 255 0
> 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?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 85 bytes
Desc: not available
More information about the postgis-users