PostGIS Classification works in 4.0.2 not in >= 4.2

Sean Gillies sgillies at FRII.COM
Thu Aug 26 10:55:06 EDT 2004


On Aug 26, 2004, at 8:30 AM, Daryl Herzmann wrote:

> Hi Sean!
>
> On Thu, 26 Aug 2004, Sean Gillies wrote:
>
>> On Aug 25, 2004, at 6:29 PM, Daryl Herzmann wrote:
>>
>>> Howdy,
>>>
>>> I have a PostGIS layer (see below). With mapserver 4.0.2, the
>>> classication
>>> works, Flash Flood Warnings (FFW) are colored green and so on.  With
>>> 4.2.2, the FFWs are coloured yellow (SVR) like Severe warnings.
>>> Here is
>>> an example plot with 4.2.2
>>>
>>> http://mesonet.agron.iastate.edu/pickup/n0r_20040825_2225.png
>>>
>>> and then the correct image five minutes later with 4.0.2
>>>
>>> http://mesonet.agron.iastate.edu/pickup/n0r_20040825_2230.png
>>>
>>> Notice the counties that turned green, like they should be! :)
>>>
>>> What am I doing wrong?
>>>   daryl
>>>
>>>
>>> LAYER
>>>   CONNECTIONTYPE postgis
>>>   NAME warnings0_c
>>>   CONNECTION "user=akrherz dbname=postgis host=10.10.10.10"
>>>   DATA "geom from (select type as wtype, geom, oid from warnings
>>> WHERE
>>>    gtype = 'C' and expire > CURRENT_TIMESTAMP ORDER by expire, type
>>> ASC)
>>>      as foo"
>>>   STATUS ON
>>>   TYPE POLYGON
>>>   PROJECTION
>>>    "init=epsg:4326"
>>>   END
>>>   CLASSITEM wtype
>>>   CLASS
>>>     EXPRESSION 'TOR'
>>>     COLOR -1 -1 -1
>>>     OUTLINECOLOR 255 0 0
>>>     SIZE 2
>>>     SYMBOL 1
>>>   END
>>>   CLASS
>>>     EXPRESSION 'SVR'
>>>     COLOR -1 -1 -1
>>>     OUTLINECOLOR 255 255 0
>>>     SIZE 2
>>>     SYMBOL 1
>>>   END
>>>   CLASS
>>>     EXPRESSION 'FFW'
>>>     COLOR -1 -1 -1
>>>     OUTLINECOLOR 0 255 0
>>>     SIZE 2
>>>     SYMBOL 1
>>>   END
>>> END
>>>
>>>
>>> --
>>> /**
>>>  * Daryl Herzmann (akrherz at iastate.edu)
>>>  * Program Assistant -- Iowa Environmental Mesonet
>>>  * http://mesonet.agron.iastate.edu
>>>  */
>>>
>>>
>>
>> Hi Daryl,
>>
>> That's odd.  Could you try labelling the polygons to see what
>> is their wtype?  LABELITEM "wtype".
>
> Thanks for the idea.  See the results :(
>
> MS 4.0.2
> http://mesonet.agron.iastate.edu/pickup/ms402.png
>
> MS 4.2.2
> http://mesonet.agron.iastate.edu/pickup/ms422.png
>
> I changed the data line from above to
>
>   DATA "geom from (select type as wtype, geom, oid from warnings WHERE
>     gtype = 'C' and expire > '2004-08-25 17:25' and
>     issue < '2004-08-25 17:25' ORDER by expire, type ASC) as foo"
>
> for testing purposes...
>
> thanks,
>    daryl
>

Daryl, will you create a new bug in bugzilla?  There's talk of a
4.2.3 release, so it's important that you get the new bug in ASAP.
CC me and mapserver-bugs at dmsolutions.ca and i'll raise the priority
to a blocker while we look at it.

Attach your mapfile fragment and the images.

Sean

--
Sean Gillies
sgillies at frii dot com
http://users.frii.com/sgillies



More information about the mapserver-users mailing list