using OGR to connect MySQL
Murat BEYHAN
beyhan at DEPREM.GOV.TR
Mon Aug 21 05:41:52 PDT 2006
Dear Friends,
I'm trying to connect MySQL database to draw earthquake epicenters on the map
that the data are stored in mysql like
ID, Latitude, Longitude, magnitude
1 30 40 3.5
2 31 41 5.5
.
.
.
I have tried to test ogr with the following command as explaeined in the
Document on Webpages' Mapserver.
ogrinfo /var/www/html/map/agidata.ovf
The agidata.ovf file is as follow.
<OGRVRTDataSource>
<OGRVRTLayer name="aqidata">
<SrcDataSource>MYSQL:eqinfo,user=root,password=mysql_123,host=localhost,port=3306,tables=deneme</SrcDataSource>
<SrcSQL>SELECT ID,Lat,Lon,Mag FROM deneme</SrcSQL>
<GeometryType>wkbPoint</GeometryType>
<GeometryField encoding="PointFromColumns" x="lat" y="lon"/>
</OGRVRTLayer>
</OGRVRTDataSource>
But I haven't achieved. The following messages is appearing on the screen.
[murat at sakura mapdata]$ ogrinfo /var/www/html/map/agidata.ovf
ERROR 1: Unable to create Xerces C++ based GML reader, Xerces support
not configured into GDAL/OGR.
ERROR 1: File /var/www/html/map/agidata.ovf appears to be GML but the GML
reader can't
be instantiated, likely because Xerces support wasn't
configured in.
FAILURE:
Unable to open datasource `/var/www/html/map/agidata.ovf' with the following
drivers.
-> ESRI Shapefile
-> UK .NTF
-> SDTS
-> TIGER
-> IHO S-57 (ENC)
-> MapInfo File
-> DGN
-> GML
-> AVCBin
-> REC
-> Memory
-> PostgreSQL
How can I fix this problem...
Thank You....
Murat
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the MapServer-users
mailing list