MySQL OGR VRT
Eijnden, B. van den (Bart)
b.vdeijnden at AGI.RWS.MINVENW.NL
Mon Apr 3 22:07:06 PDT 2006
Hi David,
I might have pointed you in the wrong direction wrt DATA before, looking at
your example I think it should be the name of the OGRVRTLayer and not the
name of the table, so:
DATA "aqidata"
Best regards,
Bart
-----Oorspronkelijk bericht-----
Van: UMN MapServer Users List
[mailto:MAPSERVER-USERS at LISTS.UMN.EDU]Namens Fawcett, David
Verzonden: maandag 3 april 2006 21:11
Aan: MAPSERVER-USERS at LISTS.UMN.EDU
Onderwerp: [UMN_MAPSERVER-USERS] MySQL OGR VRT
I am attempting to use MySQL as the datasource for a simple point layer.
I am using MapServer 4.6.1 (gdal 1.3.1).
Here is my .ovf file:
<OGRVRTDataSource>
<OGRVRTLayer name="aqidata">
<SrcDataSource>MYSQL:aqiTest,user=xxx,password=xx,host=192.168.1.100,por
t=3306,tables=testdata</SrcDataSource>
<SrcLayer>testdata</SrcLayer>
<GeometryField encoding="PointFromColumns" x="x" y="y"/>
</OGRVRTLayer>
</OGRVRTDataSource>
When I use ogrinfo (gdal 1.3.1) directly on the .ovf file, it shows me
layer with nine point features in it.
When I try to use it within MapServer, I get the error:
msDrawMap(): Image handling error. Failed to draw layer named 'MyAqi'.
msOGRFileOpen(): OGR error. Open failed for OGR connection
`aqidata.ovf'. Failed to open datasource
`MYSQL:aqiTest,user=xxx,password=xx,host=192.168.1.100,port=3306,tables=
testdata'.
Here is the layer definition:
(I have tried it with and without the DATA line)
LAYER
NAME MyAqi
STATUS DEFAULT
TYPE POINT
CONNECTIONTYPE OGR
CONNECTION "aqidata.ovf"
DATA "testdata"
TRANSPARENCY 30
CLASS
NAME "None"
STYLE
SYMBOL 'circle'
SIZE 15
COLOR 0 255 0
END
END
END
I have searched the archives, but can't find anything that fits exactly.
Any ideas?
David.
PS. Many thanks to Frank for some preliminary help.
Disclaimer
************************************************************************
Aan dit bericht kunnen geen rechten worden ontleend. Dit bericht is
uitsluitend bestemd voor de geadresseerde. Als u dit bericht per abuis
hebt ontvangen, wordt u verzocht het te vernietigen en de afzender te
informeren. Wij adviseren u om bij twijfel over de juistheid of de
volledigheid van de mail contact met afzender op te nemen.
This message shall not constitute any rights or obligations.
This message is intended solely for the addressee.
If you have received this message in error, please delete it and
notify the sender immediately. When in doubt whether this message
is correct or complete, please contact the sender.
************************************************************************
More information about the MapServer-users
mailing list