Opened 13 years ago
Last modified 13 years ago
#3986 new defect
Multiple styles using STYLEITEM with database
Reported by: | ThunderLion | Owned by: | aboudreault |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Input - Native Oracle Spatial Support | Version: | 6.0 |
Severity: | normal | Keywords: | |
Cc: |
Description
Multiple styles using STYLEITEM with database
I've noticed problem when I'm using STYLEITEM attribute with spatial objects from database (Oracle Spatial).
I have polygon objects (field SHAPE) with three styles (field MAPSERVER_STYLE):
- Red polygon with "more red" outline:
CLASS STYLE COLOR 225 0 0 END STYLE OUTLINECOLOR 240 0 0 WIDTH 1 END END
- Purple polygon with "more purple" bold outline:
CLASS STYLE COLOR 210 0 210 END STYLE OUTLINECOLOR 165 0 165 WIDTH 5 END END
- Gray polygon with "more gray" outline:
CLASS STYLE COLOR 150 150 150 END STYLE OUTLINECOLOR 60 60 60 WIDTH 1 END END
I try to show them in following layer, which I use in WMS:
LAYER
NAME 'street' STATUS ON TYPE POLYGON PROJECTION
"init=epsg:4326"
END CONNECTIONTYPE oraclespatial CONNECTION "login/pass@TNS" DATA "SHAPE FROM FGIS_DATA USING SRID 8307"
STYLEITEM "MAPSERVER_STYLE"
CLASS
NAME 'street'
END
PROCESSING "CLOSE_CONNECTION=DEFER"
END
In some tiles (in my example 256x256 pixels) some objects has styles from other objects. Here this is purple outline. The result you can see in file error.png. Notice, that if there are no purple objects in tile, everything is fine (in tiles 1.1,1.2,2.1,3.4).
If I use the same styles in MAP-file, everything works correctly (result in file fine.png):
LAYER
NAME 'street' STATUS ON TYPE POLYGON PROJECTION
"init=epsg:4326"
END CONNECTIONTYPE oraclespatial CONNECTION "login/pass@TNS" DATA "SHAPE FROM FGIS_DATA USING SRID 8307"
CLASS
EXPRESSION ('[SFIELD2]' = 'walk') STYLE
COLOR 150 150 150
END STYLE
OUTLINECOLOR 60 60 60 WIDTH 1
END
END
CLASS
EXPRESSION ('[SFIELD1]' != ) STYLE
COLOR 225 0 0
END STYLE
OUTLINECOLOR 240 0 0 WIDTH 1
END
END
CLASS
EXPRESSION ('[SFIELD1]' = and '[SFIELD2]' = ) STYLE
COLOR 210 0 210
END STYLE
OUTLINECOLOR 165 0 165 WIDTH 1
END
END
PROCESSING "CLOSE_CONNECTION=DEFER"
END
Of course, in this example, I can place outline style definition into one STYLE tag. But in some cases I must use patterns for lines combined with area textures.
Error view