Please refer to my previous posts.<br>Modify the SQL select command. Use the CONCAT function instead of the + operator to create the wkt.<br><br>It should be something like this: CONCAT('LINESTRING(', x1, ' ', y1, ',', x2, ' ', y2, ')')<br>
You may have to change the order of the points.<br><br><div class="gmail_quote">On Fri, Mar 2, 2012 at 9:24 PM, Murat Beyhan <span dir="ltr"><<a href="mailto:beyhan@deprem.gov.tr">beyhan@deprem.gov.tr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Chaitanya,<br>
<br>
I store data in table not view as I told you before becasue I could not<br>
declare column as string, then I create a new table and select<br>
fault(line) column as linestring. in mysql WKT support these format<br>
<br>
<br>
* A LineString with four points:<br>
<br>
LINESTRING(0 0, 10 10, 20 25, 50 60)<br>
<br>
Note that point coordinate pairs are separated by commas.<br>
<br>
* A Polygon with one exterior ring and one interior ring:<br>
<br>
POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7, 5 5))<br>
* A MultiPoint with three Point values:<br>
<br>
MULTIPOINT(0 0, 20 20, 60 60)<br>
* A MultiLineString with two LineString values:<br>
<br>
MULTILINESTRING((10 10, 20 20), (15 15, 30 15))<br>
* A MultiPolygon with two Polygon values:<br>
<br>
MULTIPOLYGON(((0 0,10 0,10 10,0 10,0 0)),((5 5,7 5,7 7,5 7, 5 5)))<br>
* A GeometryCollection consisting of two Point values and one<br>
LineString:<br>
<br>
GEOMETRYCOLLECTION(POINT(10 10), POINT(30 30), LINESTRING(15 15, 20 20))<br>
<br>
<br>
How to modify wkt geometry in string format<br>
in map file it is already defined as<br>
<GeometryType>wkbLineString</GeometryType><br>
like this.<br>
<br>
I really sorry for giving trouble to you. Thanks<br>
<span class="HOEnZb"><font color="#888888"><br>
murat<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Fri, 2012-03-02 at 21:19 +0530, Chaitanya kumar CH wrote:<br>
> Modify the table to store the line as a wkt geometry in string format.<br>
><br>
> On Fri, Mar 2, 2012 at 9:12 PM, Murat Beyhan <<a href="mailto:beyhan@deprem.gov.tr">beyhan@deprem.gov.tr</a>><br>
> wrote:<br>
> Chaitanya,<br>
><br>
> I mean What should I do,<br>
> Still could not draw a simple line on the map,<br>
> Please how can I overcome this issue. How can I change VRT<br>
> file.<br>
> in order to read data from such table storing data as<br>
> linestring<br>
><br>
> regards<br>
><br>
> murat<br>
> On Fri, 2012-03-02 at 21:08 +0530, Chaitanya kumar CH wrote:<br>
> > I was talking about the geometry format of the line. You<br>
> have to<br>
> > decide for yourselves about the efficiency.<br>
> ><br>
> > On Fri, Mar 2, 2012 at 8:57 PM, Murat Beyhan<br>
> <<a href="mailto:beyhan@deprem.gov.tr">beyhan@deprem.gov.tr</a>><br>
> > wrote:<br>
> > Chaitanya,<br>
> ><br>
> > What do you prefer and which way more fast to draw<br>
> line and<br>
> > point<br>
> > because I also draw point about 160000 and I use<br>
> wkbpoint.<br>
> ><br>
> > Any way how to change and What I will change in the<br>
> vrt.<br>
> ><br>
> > could you tell something about it<br>
> > thanks<br>
> ><br>
> ><br>
> > On Fri, 2012-03-02 at 20:23 +0530, Chaitanya kumar<br>
> CH wrote:<br>
> > > Murat,<br>
> > ><br>
> > > You specified the encoding for GeometryField in<br>
> the VRT as<br>
> > WKT. OGR<br>
> > > expects a WKT if you do that. Either change the<br>
> data or the<br>
> > VRT.<br>
> > ><br>
> > > On Fri, Mar 2, 2012 at 6:42 PM, Murat Beyhan<br>
> > <<a href="mailto:beyhan@deprem.gov.tr">beyhan@deprem.gov.tr</a>><br>
> > > wrote:<br>
> > > I have to say this is not view<br>
> > > this is a table created.<br>
> > ><br>
> > > Because I could not declare type of geom<br>
> field as a<br>
> > string<br>
> > > than I create<br>
> > > geometry field column in spatial mysql<br>
> database..<br>
> > ><br>
> > ><br>
> > > On Fri, 2012-03-02 at 18:39 +0530,<br>
> Chaitanya kumar<br>
> > CH wrote:<br>
> > > > Murat,<br>
> > > ><br>
> > > > Can you show a sample output of your<br>
> view?<br>
> > > > SELECT * FROM geom;<br>
> > > ><br>
> > > > On Fri, Mar 2, 2012 at 6:12 PM, Murat<br>
> Beyhan<br>
> > > <<a href="mailto:beyhan@deprem.gov.tr">beyhan@deprem.gov.tr</a>><br>
> > > > wrote:<br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > > Dear Chaitanya,<br>
> > > ><br>
> > > > I see what you explain first I<br>
> convert lat<br>
> > lon data<br>
> > > to string<br>
> > > > then I<br>
> > > > concatenate them to string<br>
> again. But I<br>
> > would like<br>
> > > to ask<br>
> > > > I have already add data to mysql<br>
> table as<br>
> > follows is<br>
> > > this also<br>
> > > > correct<br>
> > > > because when I browse table it<br>
> seems it<br>
> > store data<br>
> > > in geometry<br>
> > > > field<br>
> > > > but mapserver gives error<br>
> > > > Unable to identify source field<br>
> 'fault'<br>
> > for<br>
> > > geometry.<br>
> > > > any way<br>
> > > > I will try to convert data first<br>
> then I<br>
> > can return<br>
> > > back you.<br>
> > > > Regards...<br>
> > > ><br>
> > > > ps.<br>
> > > ><br>
> > > > ogrinfo<br>
> > > ><br>
> > ><br>
> ><br>
> MYSQL:dynamic,user=root,password=mysql_123,host=localhost,port=3306,tables=geom<br>
> > > > INFO: Open of<br>
> > > ><br>
> > ><br>
> ><br>
> `MYSQL:dynamic,user=root,password=mysql_123,host=localhost,port=3306,tables=geom'<br>
> > > > using driver `MySQL'<br>
> successful.<br>
> > > > 1: geom (None)<br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > > it say none in geom<br>
> > > > may be first I have to do what<br>
> you say<br>
> > > > thanks<br>
> > > > Murat<br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > > --<br>
> > > > Best regards,<br>
> > > > Chaitanya kumar CH.<br>
> > > ><br>
> > > > <a href="tel:%2B91-9494447584" value="+919494447584">+91-9494447584</a><br>
> > > > 17.2416N 80.1426E<br>
> > > ><br>
> > ><br>
> > > > --<br>
> > > > This message has been scanned for<br>
> viruses and<br>
> > > > dangerous content by MailScanner, and is<br>
> > > > believed to be clean.<br>
> > ><br>
> > ><br>
> > ><br>
> > > Murat BEYHAN<br>
> > ><br>
> > > Jeofizik Y.Müh.<br>
> > > T.C. Başbakanlık<br>
> > > Afet ve Acil Durum Yönetimi Başkanlığı<br>
> > > Deprem Dairesi Başkanlığı<br>
> > > Eskişehir Yolu 12. Km.<br>
> > > Lodumlu/ANKARA<br>
> > > Tel: 312 2872680-1556<br>
> > > <a href="mailto:email%3Abeyhan@deprem.gov.tr">email:beyhan@deprem.gov.tr</a><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > --<br>
> > > This message has been scanned for viruses<br>
> and<br>
> > > dangerous content by MailScanner, and is<br>
> > > believed to be clean.<br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > --<br>
> > > Best regards,<br>
> > > Chaitanya kumar CH.<br>
> > ><br>
> > > <a href="tel:%2B91-9494447584" value="+919494447584">+91-9494447584</a><br>
> > > 17.2416N 80.1426E<br>
> > ><br>
> > > --<br>
> > > This message has been scanned for viruses and<br>
> > > dangerous content by MailScanner, and is<br>
> > > believed to be clean.<br>
> ><br>
> ><br>
> ><br>
> > Murat BEYHAN<br>
> ><br>
> > Jeofizik Y.Müh.<br>
> > T.C. Başbakanlık<br>
> > Afet ve Acil Durum Yönetimi Başkanlığı<br>
> > Deprem Dairesi Başkanlığı<br>
> > Eskişehir Yolu 12. Km.<br>
> > Lodumlu/ANKARA<br>
> > Tel: 312 2872680-1556<br>
> > <a href="mailto:email%3Abeyhan@deprem.gov.tr">email:beyhan@deprem.gov.tr</a><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > This message has been scanned for viruses and<br>
> > dangerous content by MailScanner, and is<br>
> > believed to be clean.<br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > Best regards,<br>
> > Chaitanya kumar CH.<br>
> ><br>
> > <a href="tel:%2B91-9494447584" value="+919494447584">+91-9494447584</a><br>
> > 17.2416N 80.1426E<br>
> ><br>
> > --<br>
> > This message has been scanned for viruses and<br>
> > dangerous content by MailScanner, and is<br>
> > believed to be clean.<br>
><br>
> --<br>
><br>
> Murat BEYHAN<br>
> Geophysical Engineer, M.Sc.<br>
> Prime Ministry<br>
> Disaster and Emergency Management Presidency<br>
> Earthquake Department<br>
> Address: Eskisehir Yolu 12. Km.<br>
> Lodumlu/ANKARA<br>
> Tel: 312 2872680-1556<br>
> <a href="mailto:email%3Abeyhan@deprem.gov.tr">email:beyhan@deprem.gov.tr</a><br>
><br>
><br>
><br>
> --<br>
> This message has been scanned for viruses and<br>
> dangerous content by MailScanner, and is<br>
> believed to be clean.<br>
><br>
><br>
><br>
><br>
><br>
> --<br>
> Best regards,<br>
> Chaitanya kumar CH.<br>
><br>
> <a href="tel:%2B91-9494447584" value="+919494447584">+91-9494447584</a><br>
> 17.2416N 80.1426E<br>
><br>
> --<br>
> This message has been scanned for viruses and<br>
> dangerous content by MailScanner, and is<br>
> believed to be clean.<br>
<br>
<br>
<br>
Murat BEYHAN<br>
<br>
Jeofizik Y.Müh.<br>
T.C. Başbakanlık<br>
Afet ve Acil Durum Yönetimi Başkanlığı<br>
Deprem Dairesi Başkanlığı<br>
Eskişehir Yolu 12. Km.<br>
Lodumlu/ANKARA<br>
Tel: 312 2872680-1556<br>
<a href="mailto:email%3Abeyhan@deprem.gov.tr">email:beyhan@deprem.gov.tr</a><br>
<br>
<br>
<br>
<br>
--<br>
This message has been scanned for viruses and<br>
dangerous content by MailScanner, and is<br>
believed to be clean.<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br><br>+91-9494447584<br>17.2416N 80.1426E<br>