Opened 20 years ago
Closed 20 years ago
#829 closed defect (worksforme)
Classification broken in >= 4.2, works in 4.0.2
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | high | Milestone: | |
Component: | MapServer CGI | Version: | 4.2 |
Severity: | normal | Keywords: | |
Cc: | sgillies@… |
Description
Hi, I have a layer that would correctly classify in MS 4.0.2, but now fails in MS 4.2 or greater. This is failing with a PostGIS layer and now a shapefile layer as well. I must be doing something very stupid. Here is my layer: LAYER NAME warnings0_c DATA warnings.shp STATUS ON TYPE POLYGON TEMPLATE q_template.html PROJECTION "init=epsg:4326" END CLASSITEM "TYPE" LABELITEM "TYPE" CLASS EXPRESSION 'TOR' COLOR -1 -1 -1 OUTLINECOLOR 255 0 0 SIZE 2 SYMBOL 1 LABEL TYPE BITMAP SIZE MEDIUM COLOR 250 250 250 PARTIALS TRUE FORCE TRUE END END CLASS EXPRESSION 'SVR' COLOR -1 -1 -1 OUTLINECOLOR 255 255 0 SIZE 2 SYMBOL 1 LABEL TYPE BITMAP SIZE MEDIUM COLOR 250 250 250 PARTIALS TRUE FORCE TRUE END END CLASS EXPRESSION 'FFW' COLOR -1 -1 -1 OUTLINECOLOR 0 255 0 SIZE 2 SYMBOL 1 LABEL TYPE BITMAP SIZE MEDIUM COLOR 250 250 250 PARTIALS TRUE FORCE TRUE END END END Attached maps coming next! thanks, daryl
Attachments (4)
Change History (10)
by , 20 years ago
Attachment: | warnings.zip added |
---|
comment:1 by , 20 years ago
Daryl, I'm not aware of any intended changes in the way that polygon classification works. If you are really using the same mapfile and same data sources, I don't think it is user error. Did you try any other versions of MapServer? Or only 4.0.2 and 4.2.2.
comment:2 by , 20 years ago
Howdy, I tried 4.2.0 as well. This worked back in 3.x as well. It just started to fail once I tried using 4.2.x . The shapefile I have attached doesn't look right, the attributes are all messed up. One of my postgis fields is a text field and that may be causing trouble with pgsql2shp. Regardless, the postgis layer exhibits the same behaviour as well. My postgis data line is: 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 this query, I don't do anything with the text field, so Mapserver shouldn't even be seeing it... daryl
comment:3 by , 20 years ago
Daryl, Here is the layer definition that I used to test. I'm using your server, and commented out the ip below. LAYER CONNECTIONTYPE postgis NAME warnings0_c CONNECTION "user=akrherz dbname=postgis host=xxx.xxx.xxx.xxx" 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" STATUS DEFAULT TYPE POLYGON DEBUG ON TEMPLATE q_template.html PROJECTION "init=epsg:4326" END CLASSITEM "wtype" LABELITEM "wtype" CLASS EXPRESSION 'TOR' COLOR -1 -1 -1 OUTLINECOLOR 255 0 0 SIZE 2 SYMBOL 0 LABEL TYPE BITMAP SIZE MEDIUM COLOR 250 250 250 PARTIALS TRUE FORCE TRUE END END CLASS EXPRESSION 'SVR' COLOR -1 -1 -1 OUTLINECOLOR 255 255 0 SIZE 2 SYMBOL 0 LABEL TYPE BITMAP SIZE MEDIUM COLOR 250 250 250 PARTIALS TRUE FORCE TRUE END END CLASS EXPRESSION 'FFW' COLOR -1 -1 -1 OUTLINECOLOR 0 255 0 SIZE 2 SYMBOL 0 LABEL TYPE BITMAP SIZE MEDIUM COLOR 250 250 250 PARTIALS TRUE FORCE TRUE END END END Works for me. See attached image. I think it was all in your classitem. Should be "wtype". Can you confirm?
comment:4 by , 20 years ago
Well, Sean's revised layer section now works for me. I just don't understand why my old layer was interacting the way it was, but it works now, so thanks much Sean.
comment:5 by , 20 years ago
Owner: | changed from | to
---|
comment:6 by , 20 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
example shapefile used in this test