Hi Robert and Jeff<br><br>I tried those steps (think FID is optional) and no further - more blank outputs using shp2img (ms bebugging at 5 - no errors at all, happily finds layer and draws it - apparently! - should rename my layer to snowflakes or white cats....). Have run shp2img debugging - nothing obvious, but couldn't print out output (can send screenshot if anyone interested). Not sure how to retrieve the sql query sent (Jeff?).<br>
<br>I have grabbed the output from ogrinfo (see below - no extents...does that mean something) - seems to be working ok to the untrained eye! Mapfile below too (NB. have tried with and without projections at map and layer level), I am baffled, will start to use a later version of ms4w and check on another server too.<br>
<br>Cheers<br>Chris<br><br>ogrinfo output: <br><br>INFO: Open of `d:/xxx/xxx/omreg2.ovf'<br> using driver `VRT' successful.<br><br>Layer name: omreg1<br>Geometry: Point<br>Feature Count: 5<br>Layer SRS WKT:<br>
GEOGCS["WGS 84",<br> DATUM["WGS_1984",<br> SPHEROID["WGS 84",6378137,298.257223563,<br> AUTHORITY["EPSG","7030"]],<br> AUTHORITY["EPSG","6326"]],<br>
PRIMEM["Greenwich",0,<br> AUTHORITY["EPSG","8901"]],<br> UNIT["degree",0.01745329251994328,<br> AUTHORITY["EPSG","9122"]],<br> AUTHORITY["EPSG","4326"]]<br>
SiteKeyID: Integer (10.0)<br>SiteID: Integer (10.0)<br>SiteType: String (255.0)<br>SiteName: String (255.0)<br>SiteLat: Real (0.0)<br>SiteLong: Real (0.0)<br>OGRFeature(omreg1):1<br> SiteKeyID (Integer) = 2269<br> SiteID (Integer) = 1<br>
SiteType (String) = Regulated tidal exchange <br> SiteName (String) = Abbotts Hall (Stage 1)<br> SiteLat (Real) = 0.84556009184722<br> SiteLong (Real) = 51.7846475991705<br> POINT (51.784647599170498 0.84556009184722)<br>
<br>My mapfile now is this:<br><br>MAP<br>UNITS meters<br>EXTENT -15 30 40 70<br>SIZE 600 500<br>SHAPEPATH "d:\xxx\xxx\"<br>SYMBOLSET "../common/symbols/symbols-pmapper.sym"<br>FONTSET "../common/fonts/msfontset.txt"<br>
RESOLUTION 96<br>IMAGETYPE png<br>INTERLACE OFF<br>CONFIG "PROJ_LIB" "D:\xxx\proj\nad\"<br>CONFIG "GDAL_DATA" "D:\xxx\gdaldata\"<br>CONFIG "MS_ERRORFILE" "D:\xxxxx\tmp\ms_error.txt"<br>
DEBUG 5<br> PROJECTION<br> #"init=epsg:4326"<br> "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs no_defs"<br> END<br><br>#<br># Image formates for GD<br>#<br>OUTPUTFORMAT<br> NAME "png"<br>
DRIVER "GD/PNG"<br> MIMETYPE "image/png"<br> IMAGEMODE RGB<br> FORMATOPTION INTERLACE=OFF<br> TRANSPARENT OFF<br> EXTENSION "png"<br>END<br><br>OUTPUTFORMAT<br> NAME "png8"<br>
DRIVER "GD/PNG"<br> MIMETYPE "image/png"<br> IMAGEMODE PC256<br> FORMATOPTION INTERLACE=OFF<br> TRANSPARENT OFF<br> EXTENSION "png"<br>END<br><br>OUTPUTFORMAT<br> NAME "jpeg"<br>
DRIVER "GD/JPEG"<br> MIMETYPE "image/jpeg"<br> IMAGEMODE RGB<br> FORMATOPTION "QUALITY=70"<br> EXTENSION "jpg"<br>END<br><br><br>OUTPUTFORMAT<br> NAME GTiff<br> DRIVER "GDAL/GTiff"<br>
MIMETYPE "image/tiff"<br> IMAGEMODE RGB<br> FORMATOPTION "TFW=YES"<br> #FORMATOPTION "COMPRESS=PACKBITS"<br> EXTENSION "tif"<br>END<br><br>OUTPUTFORMAT<br> NAME imagemap<br>
MIMETYPE "text/html"<br>
FORMATOPTION SKIPENDTAG=OFF<br> DRIVER imagemap<br>END<br><br><br> LAYER<br> NAME "test"<br> TYPE POINT<br> CONNECTIONTYPE OGR<br> CONNECTION "omreg2.ovf" # have also tried ./omreg2.ovf - both files in same folder - no luck with either<br>
DATA "omreg1" <br> PROJECTION<br> #"init=epsg:4326"<br> "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs no_defs"<br> END<br> STATUS ON<br> CLASS<br> SYMBOL 1<br> SIZE 6<br>
COLOR 255 0 0<br> LABEL<br> SIZE MEDIUM<br> TYPE BITMAP<br> COLOR 0 0 0<br> END<br> END<br>END<br><br>END #Map<br><br><div class="gmail_quote">On 29 May 2012 21:54, Robert Sanson <span dir="ltr"><<a href="mailto:Robert.Sanson@asurequality.com" target="_blank">Robert.Sanson@asurequality.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Chris<br>
<br>
You need to define the primary key in your .ovf file:<br>
<br>
<FID>farmgate_id</FID><br>
<br>
I put the .ovf file in the same directory as my .map file, then Mapserver can find it:<br>
<br>
CONNECTION "./farmgates.ovf"<br>
<br>
All thebest,<br>
<br>
Robert<br>
<br>
<br></blockquote></div>