[Cartoweb-users] Mapfile Expression NULL value (update)

Pierre GIRAUD pierre.giraud at camptocamp.com
Tue Mar 7 05:51:09 EST 2006


So, you can also use a FILTER parameter in your layer.

http://mapserver.gis.umn.edu/docs/reference/mapfile/layer#filter

Pierre

Emmanuel BELO wrote:

> A solution is to set in the SQL statement a WHERE clause:
>
> WHERE tx_femme IS NOT NULL
>
> regards,
>
> eb
>
> Emmanuel BELO wrote:
>
>> Thank you Pierre,
>>
>> but it doesn't work. If i find something, I'll let yo know,
>>
>> regards,
>>
>> eb
>>
>> Pierre GIRAUD wrote:
>>
>>> Don't know if this will work but have a try at :
>>>
>>> EXPRESSION ('[tx_femme]' = 'NULL')
>>>
>>> In the case you have several classes and the last one with no 
>>> particular expression to parse, try for this class :
>>>
>>> EXPRESSION /_always_false_/
>>>
>>> Regards
>>>
>>> Pierre
>>>
>>> Emmanuel BELO wrote:
>>>
>>>> Hi,
>>>>
>>>> How do you handle NULL values from you database in your mapfile's 
>>>> expression?
>>>>
>>>> Example (NULL value for some tx_femme):
>>>>
>>>>  CLASS
>>>>     EXPRESSION (([tx_femme] > 8) AND ([tx_femme] <= 15))
>>>>     NAME "8 - 15"
>>>>     STYLE
>>>>       COLOR 255 217 0
>>>>     END
>>>>   END
>>>>
>>>> Doing nothing leads to this error message:
>>>>
>>>> Failure
>>>>
>>>> class:   SoapFaultWrapper
>>>> message:   Mapserver error: Error in msEvalExpression: Failed to 
>>>> parse expression
>>>>
>>>> Error in msyyparse(): syntax error
>>>>
>>>> Error in msEvalExpression: Failed to parse expression
>>>>
>>>> Error in msyyparse(): syntax error
>>>>
>>>> Error in msEvalExpression: Failed to parse expression
>>>>
>>>> Error in msyyparse(): syntax error
>>>>
>>>> Error in msEvalExpression: Failed to parse expression
>>>>
>>>> Error in msyyparse(): syntax error
>>>>
>>>> Error in msEvalExpression: Failed to parse expression
>>>>
>>>> Error in msyyparse(): syntax error
>>>>
>>>>
>>>>
>>>> Best regards,
>>>>
>>>> Emmanuel BELO
>>>>
>>>> _______________________________________________
>>>> Cartoweb-users mailing list
>>>> Cartoweb-users at lists.maptools.org
>>>> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>>>>  
>>>>
>>>
>>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Cartoweb-users mailing list
>> Cartoweb-users at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>


-- 
_________________________________________________________
Pierre GIRAUD
Géomaticien, Analyste

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex 

Tel : 00 33 4 79 44 44 93
Mail : pierre.giraud at camptocamp.com
http://www.camptocamp.com  




More information about the Cartoweb-users mailing list