[Mapserver-users] OGR unable to access datasource
Van Ulden, Joost
jvanulde at nrcan.gc.ca
Wed Jan 28 16:06:56 PST 2004
Hi all, some talk of connecting to a datasource through OGR got me excited.
I am trying to connect to a Microsoft SQL Server database called
geosemantica. My points are in a table called Desc_story and the coordinate
fields are story_x and story_y. I have set up a system DSN and tested the
connection. It checks out find. Anyone have an idea as to what I am doing
wrong?
Everytime I try to render the map I get the following error (the file is
definitely there):
msDrawMap(): Image handling error. Failed to draw layer named 'OGRPoints'.
msOGRFileOpen(): OGR error. Open failed for OGR connection
`c:\inetpub\wwwroot\MS_DEMO\ogr.ovf'. File not found or unsupported format.
Here is my layer:
LAYER
NAME OGRPoints
TYPE POINT
CONNECTIONTYPE OGR
CONNECTION "c:\inetpub\wwwroot\MS_DEMO\ogr.ovf"
DATA "Desc_story"
STATUS default
CLASS
COLOR 255 0 0
END
END
Contents of ogr.ovt:
<OGRVRTDataSource>
<OGRVRTLayer name="Desc_story">
<SrcDataSource>ODBC:foo/foo at geosemantica</SrcDataSource>
<SrcLayer>Desc_story</SrcLayer>
<GeometryType>wkbPoint</GeometryType>
<LayerSRS>WGS84</LayerSRS>
<GeometryField encoding="PointFromColumns" x="Desc_story.story_x"
y="Desc_story.story_y"/>
</OGRVRTLayer>
</OGRVRTDataSource>
Thank you in advance.
============================================
Joost van Ulden
Programmer/Analyst
Natural Resources Canada / Ressources naturelles Canada
Geological Survey of Canada / Commission geologique du Canada
101 - 605 Robson Street / 101 - 605 rue Robson
Vancouver, B.C. / Vancouver (C.-B.)
V6B 5J3
Office/Bureau: 604.666.7525
fax/telecopieur: 604.666.1124
jvanulde at nrcan.gc.ca
============================================
More information about the MapServer-users
mailing list