Class Expressions

Steve Lime Steve.Lime at DNR.STATE.MN.US
Sun May 14 18:57:50 EDT 2006


Dave: If these are numbers why are you treating them as strings? Straight string comparison of numbers can be unpredictable. Have you tried removing the quotes? 

Other options:

1) you can do the classification in PostGIS. Paul Ramsey's workshop materials have some nice examples.

2) MapServer does support true dates in logical expressions. I believe you use backtics to denote dates that way.

That said, I think you can just treat 'em as ints.

Steve

>>> DjwStone <D.Stone at ED.AC.UK> 05/12/06 8:52 AM >>>
I'm having difficulty setting up an EXPRESSION statement for a PostGIS layer.

The field being tested is a numeric representation of a date in YYYYMMDD
format so that ranges can be easily compared.

When the expression is (say):

EXPRESSION  ('[fieldname]' ge '15010101')

everything works fine; I get the correct number of hits. Similarly,

EXPRESSION  ('[fieldname]' le '16001231')

works as it should.

However, when I have:

EXPRESSION  ('[fieldname]' ge '15010101') and ('[fieldname]' le '16001231')

I get no hits although there should be some.

Has anyone else had similar problems?

Cheers,

Dave
--
View this message in context: http://www.nabble.com/Class-Expressions-t1607707.html#a4358498
Sent from the Mapserver - User forum at Nabble.com.



More information about the mapserver-users mailing list