Hi Giacomo,<br /><br />&gt; is possibile to force Mapserver<br />&gt;
(through Mapfile) to read informations about color and patterns from<br
/>&gt; DBF file?<br /><br />Directly, for the moment I think no.<br />Take
a look to&nbsp;
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&nbsp; 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 />&nbsp;&nbsp;&nbsp; NAME edifici<br
/>&nbsp;&nbsp;&nbsp; DATA edifici<br />&nbsp;&nbsp;&nbsp; TYPE POLYGON<br
/>&nbsp;&nbsp;&nbsp; CLASSITEM 'TYPE'<br />&nbsp;&nbsp;&nbsp; CLASS<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  EXPRESSION 'PUBLIC'<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  STYLE<br /> &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;  &nbsp;&nbsp;  COLOR&nbsp; 223 184 230<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  &nbsp;&nbsp;  OUTLINECOLOR 80 80 80<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  END # of style<br /> &nbsp;&nbsp;&nbsp;
END # of class<br /> &nbsp;&nbsp;&nbsp; CLASS<br /> &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;  EXPRESSION 'PRIVATE'<br /> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; 
STYLE<br /> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  &nbsp;&nbsp;  COLOR&nbsp; 199
141 235<br /> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  &nbsp;&nbsp;  OUTLINECOLOR
80 80 80<br /> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  END # of style<br />
&nbsp;&nbsp;&nbsp; END # of class<br /> &nbsp;&nbsp;&nbsp; CLASS<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  EXPRESSION 'AIRPORT'<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  STYLE<br /> &nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;  &nbsp;&nbsp;  COLOR&nbsp; 172 102 237<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  &nbsp;&nbsp;  OUTLINECOLOR 80 80 80<br />
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;  END # of style<br /> &nbsp;&nbsp;&nbsp;
END # of class<br /> &nbsp;&nbsp;&nbsp; CLASS<br />&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;  ...<br />&nbsp;&nbsp;&nbsp; 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&deg;50'38.58&quot;N
12&deg;29'13.39&quot;E<br /><br /><br /><br />On Gio, 5 Aprile 2007 11:52
am, Giacomo Sacchetti wrote:<br />&gt; Dear All,<br />&gt; <br />&gt; I've
posted a         question two weeks ago, but I haven't received any<br />&gt;
response. So, I'll try to explain better my situation.<br />&gt; I've
&quot;converted&quot; a DWG file in several SHP file. Every layer of
the<br />&gt; DWG is &quot;well formed&quot;: this means that every layer
have only one type<br />&gt; of entity (points, lines, ...). I've created
a tool for this type of<br />&gt; convertions.<br />&gt; My problem is to
assign pattern and color to the shape files.<br />&gt; I've thinked to
insert informations about color and pattern in the DBF<br />&gt;
associated to every SHP files: is possibile to force Mapserver<br />&gt;
(through Mapfile) to read informations about color and patterns from<br
/>&gt; DBF file?<br />&gt; <br />&gt; Thanks in advance<br />&gt; <br
/>&gt; GS<br />&gt; <br /><br />