<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">To follow up on this :<div><br></div><div><blockquote type="cite"><span class="Apple-style-span" style="-webkit-text-stroke-width: -1; ">The catch here is that to maintain compatibility with the rest of the system, I am using ms4w 1.5.5</span></blockquote><div><br></div><div>This was the problem.</div><br><blockquote type="cite"><span class="Apple-style-span" style="-webkit-text-stroke-width: -1; ">1. How can I find if I am truly getting no points at all, or they are not displaying.</span></blockquote><div><br></div><div>I stumbled across an email reply from Frank W suggesting that the ogr link in mapserver didn't work properly for odbc in ogr 1.3.2, which is what was compiled into ms4w 1.5.5. Solution - try to upgrade.</div><div><br></div><blockquote type="cite">2. How do I set up expressions to specify that the third column in my sql statement (response) is the classitem and to class based on it.</blockquote><div><br></div><div>This was straight-forward enough once the SQL was working.</div><div><div><br></div><div><br></div><div>On 26/09/2008, at 2:47 PM, <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"><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.5);"><b>From: </b></span><span style="font-family:'Helvetica'; font-size:medium;">Ben Madin <<a href="mailto:ben@remoteinformation.com.au">ben@remoteinformation.com.au</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.5);"><b>Date: </b></span><span style="font-family:'Helvetica'; font-size:medium;">26 September 2008 12:16:46 PM<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.5);"><b>To: </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.5);"><b>Subject: </b></span><span style="font-family:'Helvetica'; font-size:medium;"><b>Re: [mapserver-users] RE:mapserver + MS SQL</b><br></span></div><br>G'day all,<br><br>I have a similar problem to this, but slightly more basic, and slightly more outdated!<br><br>I have a MS SQL table with investigations in, and the latitude and longitude of said investigations. I wanted to be able to make a map, using OGR / ODBC to connect to MS SQL, and display the points classed by the level of investigation.<br><br>I created the OGR connection :<br><br><OGRVRTDataSource><br> <OGRVRTLayer name='mmapdata'><br> <SrcDataSource>ODBC:mmap/private@mmap</SrcDataSource><br> <SrcSQL>select rep.id, rep.latitude as latitude, rep.longitude as longitude, upper(left(rlu1.lookupfull,1))+substring(rlu1.lookupfull,2,len(rlu1.lookupfull)) as response from reports rep join results res1 on (res1.reportid = rep.id and res1.resulttypeid = 17 and res1.del=0) join resultlookup rlu1 on (rlu1.resulttypesid = 17 and rlu1.id = res1.resultvalue) where projectid = 30</SrcSQL><br> <GeometryType>wkbPoint</GeometryType><br> <GeometryField encoding='PointFromColumns' x='longitude' y='latitude'/><br> </OGRVRTLayer><br></OGRVRTDataSource><br><br>and tested it :<br><br>C:\Documents and Settings\Administrator>C:\ms4w\tools\gdal-ogr\ogrinfo C:\ms4w\Apache\htdocs\mmap\mapserver\xot1.ovf -ro -al<br>INFO: Open of `C:\ms4w\Apache\htdocs\mmap\mapserver\xot1.ovf'<br>using driver `VRT' successful.<br><br>Layer name: mmapdata<br>Geometry: Point<br>Feature Count: 1978<br>Extent: (0.000000, -43.173000) - (153.570000, 0.000000)<br>Layer SRS WKT:<br>(unknown)<br>id: Integer (10.0)<br>latitude: String (7.0)<br>longitude: String (7.0)<br>response: String (256.0)<br>OGRFeature(mmapdata):0<br> id (Integer) = 8887<br> latitude (String) = -34.922<br> longitude (String) = 138.599<br> response (String) = Specimens sent to the Laboratory<br> POINT (138.59899999999999 -34.921999999999997 0)<br><br>OGRFeature(mmapdata):1<br> id (Integer) = 10128<br> latitude (String) = -18.280<br> longitude (String) = 143.530<br> response (String) = Specimens sent to the Laboratory<br> POINT (143.53 -18.28 0)<br><br>OGRFeature(mmapdata):2<br> id (Integer) = 10129<br> latitude (String) = -16.920<br> longitude (String) = 145.770<br> response (String) = Investigation<br> POINT (145.77000000000001 -16.920000000000002 0)<br><br><br>So far, so good.<br><br>Then I built it into a map file :<br><br>MAP<br> EXTENT 110 -45 160 -8<br> FONTSET "/ms4w/Apache/htdocs/mmap/mapserver//fonts/fontset.txt"<br> IMAGECOLOR 203 230 255<br> IMAGETYPE gif<br> SYMBOLSET "/ms4w/Apache/htdocs/mmap/mapserver//symbols/colour.sym"<br> SHAPEPATH "C:\ms4w\Apache\htdocs\mmap\mapserver"<br> SIZE 600 600<br> STATUS ON<br> UNITS DD<br> NAME "basemap"<br><br> OUTPUTFORMAT<br> NAME "gif"<br> MIMETYPE "image/gif"<br> DRIVER "gd/gif"<br> EXTENSION "gif"<br> IMAGEMODE "PC256"<br> TRANSPARENT FALSE<br> END<br><br> LEGEND<br> IMAGECOLOR 255 255 255<br> KEYSIZE 20 8<br> KEYSPACING 5 4<br> LABEL<br> ANGLE 0.000000<br> ANTIALIAS TRUE<br> FONT "lucida"<br> MAXSIZE 256<br> MINSIZE 4<br> SIZE 7<br> TYPE TRUETYPE<br> BUFFER 2<br> COLOR 0 0 0<br> FORCE FALSE<br> MINDISTANCE -1<br> MINFEATURESIZE -1<br> OFFSET 0 0<br> OUTLINECOLOR 255 255 250<br> PARTIALS TRUE<br> POSITION UR<br> SHADOWCOLOR 250 250 250<br> SHADOWSIZE 2 2<br> END<br> POSITION LL<br> STATUS EMBED<br> TRANSPARENT TRUE<br> END<br><br><br> LAYER<br> DATA "ausregion"<br> GROUP "Australia"<br> METADATA<br> END<br> NAME "ausregionlayer"<br> SIZEUNITS DD<br> STATUS DEFAULT<br> TOLERANCEUNITS PIXELS<br> TYPE POLYGON<br> UNITS METERS<br> CLASS<br> METADATA<br> END<br> STYLE<br> ANGLE 360<br> COLOR 245 245 220<br> SYMBOL 0<br> END<br> END<br> END<br><br><br> LAYER<br> CONNECTION "<OGRVRTDataSource><br> <OGRVRTLayer name='mmapdata'><br> <SrcDataSource>ODBC:mmap/password@mmap</SrcDataSource><br> <SrcSQL>select rep.latitude as latitude, rep.longitude as longitude, upper(left(rlu1.lookupfull,1))+substring(rlu1.lookupfull,2,len(rlu1.lookupfull)) as response from reports rep join results res1 on (res1.reportid = rep.id and res1.resulttypeid = 17 and res1.del=0) join resultlookup rlu1 on (rlu1.resulttypesid = 17 and rlu1.id = res1.resultvalue) where projectid = 30</SrcSQL><br> <GeometryType>wkbPoint</GeometryType><br> <GeometryField encoding='PointFromColumns' x='longitude' y='latitude'/><br> </OGRVRTLayer><br></OGRVRTDataSource>"<br> CONNECTIONTYPE OGR<br> DATA "mmapdata"<br>CLASSITEM response<br> METADATA<br> END<br> NAME ".xot1"<br> SIZEUNITS PIXELS<br> STATUS DEFAULT<br> TOLERANCEUNITS PIXELS<br> TYPE POINT<br> UNITS METERS<br> CLASS<br> NAME "Field investigation"<br> EXPRESSION "investigation"<br> LABEL<br> SIZE MEDIUM<br> TYPE BITMAP<br> BUFFER 0<br> COLOR 0 0 0<br> FORCE FALSE<br> MINDISTANCE -1<br> MINFEATURESIZE -1<br> OFFSET 0 0<br> PARTIALS FALSE<br> POSITION AUTO<br> END<br> METADATA<br> END<br> STYLE<br> ANGLE 360<br> COLOR 166 206 227<br> SIZE 10<br> SYMBOL 1<br> END<br> END<br><br>etc<br><br>and try :<br><br>C:\Documents and Settings\Administrator>c:\ms4w\tools\mapserv\shp2img.exe -m C:\ms4w\Apache\htdocs\nahis\mapserver\tmp\NAHISdf7c8a22c2b16b33730aa228fac405bb.map<br> -l .xot1 -o C:\test.gif<br>scalefactor = 12<br><br>and I get the map with the borders etc, but no points (the legend show up OK). Even if I remove the classitem and expressions, I still don't get any points.<br></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; ">-- </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 : +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 WA 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></body></html>