[mapserver-users] filter expression and boolean field

Havard Tveite havard.tveite at umb.no
Fri Oct 26 07:45:28 PDT 2012


Hi,

I am also be interested in learning how to use boolean
attributes in filter expressions.
I have also tried to get a filter expression with a
boolean attribute to work, but have had no luck.  My
data source was PostGIS.
I did a workaround in SQL to get integers instead
(CASE WHEN booleanvariable = 'f' then 0 else 1).


Håvard

On 10/26/2012 3:26 PM, Brian Fischer wrote:
> Hi,
>
> I am trying to use a filter expression to only display features where a value is true in a Boolean field coming from an MSSQL Spatial datasource. It seems like every syntax I try MapServer comes back with “An expression of non-boolean type specified in a context where a condition is expected”
>
> I have tried a number of different combinations. How do you specify a Boolean expression? Has anyone got a Boolean field type to work from a database source? If so what expression did you use?
>
> Thanks!
>
> 	
>
> *Brian Fischer, CFM***
>
> Principal | GIS Project Manager
>
> *O* 763.493.4522 | *D* 763.493.6664 | *M* 763.229.2734
>
> 	
>
> cid:image001.jpg at 01CC3702.356B79C0
>
> 	
>
> 6901 E Fish Lake Rd. , Suite 140 • Maple Grove, MN • 55369
>
> 			
>
> *www.houstoneng.com* <http://www.houstoneng.com/>* ***
>
> 				
> 					
>
> This entire message (including all forwards and replies) and any attachments are for the sole use of the intended recipient(s) and may contain proprietary, confidential, trade secret, work-product, attorney-client or privileged information. Any unauthorized review, use, disclosure or distribution is prohibited and may be a violation of law. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.

-- 
Håvard Tveite
Department of Mathematical Sciences and Technology, UMB
Drøbakveien 31, POBox 5003, N-1432 Ås, NORWAY
Phone: +47 64965483 Fax: +47 64965401 http://www.umb.no/imt/


More information about the mapserver-users mailing list