MySql Spatial Database

Murat BEYHAN beyhan at DEPREM.GOV.TR
Thu Oct 5 09:53:54 EDT 2006


Frank,
I'm really getting love mapserver.
Its easy to learn and to do any kind of powerful map.
But There is another problem.I store the data in the mysql and draw it but How
can I query data stored in mysql by using ogr.
I mean how can I send variable from php to OGR

I would like to make select statement for the ogr. But How?
By following expression I can draw point layer. But the data are not in
spatial database. They are Just table and I read the column from table for lat
lon and by using connectiontype ogr connection I can draw point.
My second issiu to draw polygone layer stored in Mysql spatial database. OK O
have succeeded to do, too. And third issiu to draw only one district which
data stored in Mysql spatial databese.
So I think I have to construct one select statement as follows but How can I
construct select statement for the mysql spatial database. I dont have any
experiences. Could you give me some point about that. If I could this I can
finalize my study then will be ready to publish it on the net.
Regards 
Murat

<OGRVRTDataSource>
    <OGRVRTLayer name="koymrk">
       
<SrcDataSource>MYSQL:bina,user=root,password=mysql_123,host=localhost,port=3306,tables=zoneson</SrcDataSource>
        <SrcSQL>SELECT lat,lon,koyadi from zoneson  </SrcSQL>
        <GeometryType>wkbPoint</GeometryType>
        <GeometryField encoding="PointFromColumns" x="lon" y="lat"/>
    </OGRVRTLayer>
</OGRVRTDataSource>
~



On Thu, 05 Oct 2006 09:41:41 -0400, Frank Warmerdam wrote
> Murat BEYHAN wrote:
> > Dear Frank,
> > Thank you very much for your advice.
> > Now I store various kind of data in mysql database than I connect to database
> > and read data and draw layers on the map. It's really fantastic. Thank you to
> > mapserver,too.
> 
> Murat,
> 
> It is great to hear you have been successful.
> 
> Best regards,
> -- 
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | President OSGeo, http://osgeo.org
> 
> -- 
> 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