<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I think you need to have a look at classitem and class definitions in the documentation. With PostGIS you would bring the attribute back with your points, make the attribute the classitem and match it in each of three classes, one with red colour, one with blue colour and one with green colour.<div><br></div><div>I anticipate that OGR can do the same thing?</div><div><br></div><div>cheers</div><div><br></div><div>Ben</div><div><br></div><div><br><div><div><br></div><div><br><div><div>On 01/06/2008, at 12:00 AM, <a href="mailto:mapserver-users-request@lists.osgeo.org">mapserver-users-request@lists.osgeo.org</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-family: Helvetica; font-size: medium; color: rgba(0, 0, 0, 0.498039); "><b>From:<span class="Apple-converted-space">&nbsp;</span></b></span><span style="font-family: Helvetica; font-size: medium; ">fastturtle &lt;<a href="mailto:beckjoh@KNOLOGY.NET">beckjoh@KNOLOGY.NET</a>><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-family: Helvetica; font-size: medium; color: rgba(0, 0, 0, 0.498039); "><b>Date:<span class="Apple-converted-space">&nbsp;</span></b></span><span style="font-family: Helvetica; font-size: medium; ">31 May 2008 11:33:43 AM<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-family: Helvetica; font-size: medium; color: rgba(0, 0, 0, 0.498039); "><b>To:<span class="Apple-converted-space">&nbsp;</span></b></span><span style="font-family: Helvetica; font-size: medium; "><a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span style="font-family: Helvetica; font-size: medium; color: rgba(0, 0, 0, 0.498039); "><b>Subject:<span class="Apple-converted-space">&nbsp;</span></b></span><span style="font-family: Helvetica; font-size: medium; "><b>[MAPSERVER-USERS] Using OGR to plot x,y data from MySQL with Attribute Data</b><br></span></div><br><br><br>Hi!<br><br>I am new user to MapServer and I think I have a simple task. &nbsp;<br>I have a MySQL table called data1 with x,y (Lat, Long) data stored in two<br>fields and attribute data stored in another field called SPECIFIC. &nbsp;The<br>SPECIFIC field has three values that can be an option for a point (bad,<br>good, excellent). &nbsp;<br><br>I have successfully used OGR to plot my points using the following code,<br>however I cannot find an example of how to map the points based on the<br>attribute in the SPECIFIC fields. I really need to color<br>code the points by the attibute field. &nbsp;For example, I would color all<br>points with a bad rating as red, good as blue and excellent as green. &nbsp;How<br>can I alter my code in the map file to accomplish this task?<br><br>&lt;OGRVRTDataSource><br>&nbsp;&nbsp;&nbsp;&lt;OGRVRTLayer name="data"><br><br>&lt;SrcDataSource>MYSQL:test,user=user,password=password,port=3306,tables=data1&lt;/SrcDataSource><span class="Apple-converted-space">&nbsp;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SrcSQL>SELECT * FROM data1&lt;/SrcSQL><span class="Apple-converted-space">&nbsp;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;GeometryType>wkbPoint&lt;/GeometryType><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;GeometryField encoding="PointFromColumns" x="Long" y="Lat"/><span class="Apple-converted-space">&nbsp;</span><br>&nbsp;&nbsp;&nbsp;&lt;/OGRVRTLayer><br>&lt;/OGRVRTDataSource><br><br>#<br>&nbsp;# Start of layer definitions<br>&nbsp;#<br><br>&nbsp;LAYER<br>&nbsp;&nbsp;&nbsp;NAME "MyAqui"<br>&nbsp;&nbsp;&nbsp;STATUS DEFAULT<br>&nbsp;&nbsp;&nbsp;TYPE POINT<br>&nbsp;&nbsp;&nbsp;CONNECTIONTYPE OGR &nbsp;<br>&nbsp;&nbsp;&nbsp;CONNECTION "aquidata.ovf"<br>&nbsp;&nbsp;&nbsp;DATA "data"<br>&nbsp;&nbsp;&nbsp;CLASS<span class="Apple-converted-space">&nbsp;</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NAME "MyClass"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;STYLE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SYMBOL 'circle'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;SIZE 15<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;COLOR 0 255 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;END<br>&nbsp;&nbsp;&nbsp;END<br>END<br><br><br>Thanks so much for any help in advance.<br></span></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">--&nbsp;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Ben Madin</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">REMOTE INFORMATION</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">t : +61 8 9192 5455</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">f :&nbsp;+61 8 9192 5535</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">m : 0448 887 220</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Broome&nbsp; &nbsp;WA&nbsp; &nbsp;6725</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><a href="mailto:ben@remoteinformation.com.au">ben@remoteinformation.com.au</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 12px/normal Helvetica; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-tab-span" style="white-space:pre"><span class="Apple-style-span" style="white-space: pre; ">                                                        </span></span>Out here, it pays to know...</div></div><br class="Apple-interchange-newline"></span> </div><br></div></div></div></body></html>