[mapserver-dev] Boolean class expression Mapserver 7.2

Karin Kuipers Karin.Kuipers at kartverket.no
Wed Dec 19 23:11:10 PST 2018

Hi Steve,

"you're saying you have data where something = 'f' and it works in 7.0 but not in 7.2"
That is indeed what I am trying to say.

The portgis data is 'true' or 'false' (data type boolean) in Mapserver we query this with 't' and 'f'

I have a WMS build in 7.0 with the == 'f' expression
We want to upgrade to 7.2 and during testing the layer with =='f' expression fails.

When changing the expression to != 't' the layer works again.

With kind regards,

Fra: Lime, Steve D (MNIT) [mailto:steve.lime at state.mn.us]
Sendt: 19. desember 2018 16:55
Til: Karin Kuipers <Karin.Kuipers at kartverket.no>; mapserver-dev at lists.osgeo.org
Emne: RE: Boolean class expression Mapserver 7.2

Hi Karin: All of the example expressions below represent straight string comparisons so for ("[something]" == 'f') to evaluate to true the value for something would need to be 'f', same goes for all the others. 'f', 't' and 'false' are just strings and are not equivalent to true/false - you'd use something like ([something] == true) if you really wanted that type of comparison.

Anyway, just so I understand, you're saying you have data where something = 'f' and it works in 7.0 but not in 7.2?


From: mapserver-dev [mailto:mapserver-dev-bounces at lists.osgeo.org] On Behalf Of Karin Kuipers
Sent: Wednesday, December 19, 2018 3:03 AM
To: mapserver-dev at lists.osgeo.org<mailto:mapserver-dev at lists.osgeo.org>
Subject: [mapserver-dev] Boolean class expression Mapserver 7.2

Dear sir/madame,

I think I found an issue with the boolean class expression in Mapserver 7.2

On 7.0 ("[something]" == 'f') works

On 7.2 ("[something]" == 'f') does not work but ("[something]" != 't') works fine and ("[something]" == 'false') is fine as well.

Connection is to a postgis database.

With kind regards,

Karin Kuipers


Karin Kuipers
Overingeniør GIS-Specialist
IT-avdelingen, Geodatatjenester -I5
Tlf.: +47 321 13036 mob.:+47 46 213 198
E-post: karin.kuipers at kartverket.no<mailto:karin.kuipers at kartverket.no>

Tlf. sentralbord: 32 11 81 00
Kundesenter: 08700

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20181220/f18acbb6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4450 bytes
Desc: image001.png
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20181220/f18acbb6/attachment.png>

More information about the mapserver-dev mailing list