using OGR to connect MySQL
Murat BEYHAN
beyhan at DEPREM.GOV.TR
Mon Aug 21 07:16:12 PDT 2006
Dear Friends,
[root at sakura murat]# mapserv -v
MapServer version 4.8.4 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=PDF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_CLIENT SUPPORTS=THREADS INPUT=TIFF
INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE DEBUG=MSDEBUG
By the consider command mapserv -v I have already installed mapserver with ogr
functionality. Is it true?
Any way I will try to find newest version of OGR.
Thanks
On Mon, 21 Aug 2006 17:09:34 +0300, Volkan Ulukut wrote
> Murat,
> Even if you had the newest ogr version you have to configure it with
> mysql option to be able to connect directly to mysql, cause it's off
> by default.
>
> -----Original Message-----
> From: Fawcett, David [mailto:David.Fawcett at STATE.MN.US]
> Sent: Monday, August 21, 2006 4:57 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] using OGR to connect MySQL
>
> Murat,
>
> The MySQL direct connect functionality is relatively new to OGR. You
> will need a relatively recent release of OGR, particularly if you are
> running Linux. You will then need to re-compile MapServer with the new
> OGR.
>
> Based on your error message, it doesn't appear that you have a
> version of OGR that supports direct connections to MySQL.
>
> On somewhat older versions, you can set up a ODBC connection to MySQL
> and then use OGR to connect to that, but I don't see ODBC support listed
> in your error message either.
>
> Essentially, you will need a newer version of OGR/MapServer.
>
> David.
>
> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-
> USERS at LISTS.UMN.EDU] On Behalf Of Murat BEYHAN Sent: Monday, August
> 21, 2006 7:42 AM To: MAPSERVER-USERS at LISTS.UMN.EDU Subject:
> [UMN_MAPSERVER-USERS] using OGR to connect MySQL
>
> 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.
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
--
Open WebMail Project (http://openwebmail.org)
--
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