Hi Giacomo,<br /><br />> is possibile to force Mapserver<br />>
(through Mapfile) to read informations about color and patterns from<br
/>> DBF file?<br /><br />Directly, for the moment I think no.<br />Take
a look to 
http://mapserver.gis.umn.edu/docs/reference/mapfile/layer/?searchterm=styleitem<br
/>you can find the layer's property STYLEITEM, experimental and OGR only, 
wich is the name of the field containing style info's. No info about the
format, etc.<br /><br />Look also to how-to<br
/>http://mapserver.gis.umn.edu/docs/reference/vector_data/mapinfo/?searchterm=styleitem<br
/>is an how-to to read mapinfo files.<br />With STYLEITEM=AUTO in the
layer you can preserve the style information of the mapinfo layer.<br
/><br />You can of course define in the layer a number of classes equal to
the number of styles you want, each class with its STYLE, and in the class
EXPRESSION (http://mapserver.gis.umn.edu/docs/howto/msexpressions) you can
define the  value of the field (defined in CLASSITEM property) for
style definition of single feature.<br />e.g. :<br />if you have a .shp of
buildings and use of each building is defined in the field 'TYPE' with the
keywords 'PUBLIC', 'PRIVATE', 'AIRPORT'... your layer in the .map file can
appear like:<br />#<br />LAYER<br />    NAME edifici<br
/>    DATA edifici<br />    TYPE POLYGON<br
/>    CLASSITEM 'TYPE'<br />    CLASS<br />
        EXPRESSION 'PUBLIC'<br />
        STYLE<br />    
        COLOR  223 184 230<br />
            OUTLINECOLOR 80 80 80<br />
        END # of style<br />    
END # of class<br />     CLASS<br />    
    EXPRESSION 'PRIVATE'<br />        
STYLE<br />             COLOR  199
141 235<br />             OUTLINECOLOR
80 80 80<br />         END # of style<br />
    END # of class<br />     CLASS<br />
        EXPRESSION 'AIRPORT'<br />
        STYLE<br />    
        COLOR  172 102 237<br />
            OUTLINECOLOR 80 80 80<br />
        END # of style<br />    
END # of class<br />     CLASS<br />   
    ...<br />    END # of class<br />  END #of
layer<br />#<br /><br />ciao<br />Pietro<br /><br /><br />-- <br />Pietro
Giannini<br />Bytewise srl - Area GIS<br />41°50'38.58"N
12°29'13.39"E<br /><br /><br /><br />On Gio, 5 Aprile 2007 11:52
am, Giacomo Sacchetti wrote:<br />> Dear All,<br />> <br />> I've
posted a        question two weeks ago, but I haven't received any<br />>
response. So, I'll try to explain better my situation.<br />> I've
"converted" a DWG file in several SHP file. Every layer of
the<br />> DWG is "well formed": this means that every layer
have only one type<br />> of entity (points, lines, ...). I've created
a tool for this type of<br />> convertions.<br />> My problem is to
assign pattern and color to the shape files.<br />> I've thinked to
insert informations about color and pattern in the DBF<br />>
associated to every SHP files: is possibile to force Mapserver<br />>
(through Mapfile) to read informations about color and patterns from<br
/>> DBF file?<br />> <br />> Thanks in advance<br />> <br
/>> GS<br />> <br /><br />