Hi Chris You need to define the primary key in your .ovf file:
<FID>farmgate_id</FID> I put the .ovf file in the same directory as my .map file, then Mapserver can find it: CONNECTION "./farmgates.ovf" All thebest, Robert >>> Chris Jackson <[email protected]> 29/05/2012 8:57 p.m. >>> Hi Robert Thanks for the reply, you have got me to a point where ogrinfo commandline processes an ovf file using sql authentication fine. However it will still not display using shp2img commandline (other layer in mapfile draws fine). My layer definition is fairly simple, but I am scratching my head to think what is stopping the layer from drawing! The points are in standard lat/long so using WGS84 (layer and map projection). Cheers Chris ovf contains <OGRVRTDataSource> <OGRVRTLayer name="omreg1"> <SrcDataSource>ODBC:user/xxxxxxx@conn</SrcDataSource> <SrcSQL>SELECT * FROM dbo.Site</SrcSQL> <GeometryType>wkbPoint</GeometryType> <LayerSRS>EPSG:4326</LayerSRS> <GeometryField encoding="PointFromColumns" x="SiteLong" y="SiteLat"/> </OGRVRTLayer> </OGRVRTDataSource> Layer defined as: LAYER NAME "test" TYPE POINT CONNECTIONTYPE OGR CONNECTION "omreg.ovf" # the name and path to the virtual.ovf file, relative to shapepath may work? DATA "omreg1" # the name of the OGRVrtLayer STATUS ON LABELITEM "SiteName" #may need to use table.name or just name depending on your OVF file. PROJECTION "init=epsg:4326" END CLASS SYMBOL 1 SIZE 6 COLOR 255 0 0 LABEL SIZE MEDIUM TYPE BITMAP COLOR 0 0 0 END END END This email and any attachments are confidential and intended solely for the addressee(s). If you are not the intended recipient, please notify us immediately and then delete this email from your system. This message has been scanned for Malware and Viruses by Websense Hosted Security. www.websense.com _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
