[mapserver-users] OGRVRT Data Sources and SQL server

Chris Jackson webturtles at gmail.com
Tue May 29 01:57:30 PDT 2012


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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120529/69f64f39/attachment-0001.html>


More information about the mapserver-users mailing list