PostGIS Classification works in 4.0.2 not in >= 4.2
Daryl Herzmann
akrherz at IASTATE.EDU
Thu Aug 26 07:30:37 PDT 2004
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 Herzmann (akrherz at iastate.edu)
* Program Assistant -- Iowa Environmental Mesonet
* http://mesonet.agron.iastate.edu
*/
More information about the MapServer-users
mailing list