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):

  1. Red polygon with "more red" outline:

CLASS STYLE COLOR 225 0 0 END STYLE OUTLINECOLOR 240 0 0 WIDTH 1 END END

  1. Purple polygon with "more purple" bold outline:

CLASS STYLE COLOR 210 0 210 END STYLE OUTLINECOLOR 165 0 165 WIDTH 5 END END

  1. 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.

Attachments (3)

error.png (184.7 KB ) - added by ThunderLion 13 years ago.
Error view
error.2.png (184.7 KB ) - added by ThunderLion 13 years ago.
Error view
fine.png (195.6 KB ) - added by ThunderLion 13 years ago.
mapfile style definition

Download all attachments as: .zip

Change History (4)

by ThunderLion, 13 years ago

Attachment: error.png added

Error view

by ThunderLion, 13 years ago

Attachment: error.2.png added

Error view

by ThunderLion, 13 years ago

Attachment: fine.png added

mapfile style definition

comment:1 by ThunderLion, 13 years ago

Version: unspecified6.0
Note: See TracTickets for help on using tickets.