connect mysql by using ogr

Murat BEYHAN beyhan at DEPREM.GOV.TR
Fri Sep 15 07:40:11 EDT 2006


Dear Greg and friends;

Finally I have solved to read data form mysql database than draw map by using
those data.
I have created Peag Ground Acceleration map for the earthquake which data are
stored in MySql. But I would like to display map for all earthquake which are
described in the Mysql table as eq-id column.
I have querid mysql database by using ovf file as following

<OGRVRTDataSource>
    <OGRVRTLayer name="acceleration">
       
<SrcDataSource>MYSQL:database,user=user,password=pass_wd,host=100.00.00.21,port=3306,tables=d_pgadata1</SrcDataSource>
        <SrcSQL>SELECT eq_id,latitude,longitude,acceleration from d_pgadata1
where eq_id like '%200006060242%' </SrcSQL>
        <GeometryType>wkbPoint</GeometryType>
        <GeometryField encoding="PointFromColumns" x="longitude" y="latitude"/>
    </OGRVRTLayer>
</OGRVRTDataSource>

As you see when I create map by layer OGR this will just the eq_id like
'%200006060242%'.
But I would like to change this eq_id by interactively for example who will
like to see 200609151300 earthquake PGA map he/she can change sql statement in
ovf file by using php or html commands fromweb...

Do you have any idea is it possible or not.

Please I wellcome any kind of information about it..
Thank you 
Murat
But I would like to make php file for displaying other

On Fri, 15 Sep 2006 08:21:43 +1000, Greg Luker wrote
> Hi Murat,
> 
> Have you found a solution to your problem yet? I'm a beginner 
> mapserver user and I'm using mapserver with MySQL. I am reading 
> point locations from a MySQL database using OGRVRT  and drawing 
> those points on a map. Is this what you want to do. I could send my 
> mapfile to you if that would help.
> 
> Thanks,
> Greg.
> 
> Greg Luker
> GIS Lab Manager, Southern Cross University
> Lismore, AUSTRALIA.
> gluker at scu.edu.au
> phone 61 2 66203026
> 
> -- 
> 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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060915/46d9b951/attachment.html


More information about the mapserver-users mailing list