Murat,<br><br>Perhaps you can use the CAST operator to convert the data type to varchar.<br><br>On Monday, March 5, 2012, Murat Beyhan <<a href="mailto:beyhan@deprem.gov.tr">beyhan@deprem.gov.tr</a>> wrote:<br>> Chaitanya,<br>
><br>> Thanks for your help, I try to use concat to create view from database<br>> which is storing start and end of the point of the line<br>> as follows.<br>><br>><br>> create view lineview6 as select eq_id,<br>
> CONCAT('LINESTRING(',lon1,'',lat1,',',lon2,'',lat2,')') as geom from<br>> sfault<br>><br>><br>><br>> but at the previous problem still could not solve<br>> as you said geom field should be string but view automatically decided<br>
> the format of the geom column randomly (now is var). then the select sql<br>> result of the view as follows and mapserver does not draw line.<br>><br>><br>> SQL result<br>> Host: localhost<br>> Database: dynamic<br>
> Generation Time: Mar 05, 2012 at 09:52 AM<br>> Generated by: phpMyAdmin 3.3.10 / MySQL 5.1.55<br>> SQL query: SELECT * FROM `lineview6` LIMIT 0, 30 ;Rows: 1<br>><br>> eq_id<br>> geom<br>
> 20100308023229<br>> LINESTRING(38.7901 40.0811,38.7428<br>> 40.0311)<br>><br>><br>> and structure of the lineview6 is as follows<br>><br>> eq_id varchar(14)<br>> geom var(51)<br>><br>> please excuse me for this<br>
><br>> murat<br>><br>><br>><br>> On Fri, 2012-03-02 at 21:38 +0530, Chaitanya kumar CH wrote:<br>>> Please refer to my previous posts.<br>>> Modify the SQL select command. Use the CONCAT function instead of the<br>
>> + operator to create the wkt.<br>>><br>>> It should be something like this: CONCAT('LINESTRING(', x1, ' ', y1,<br>>> ',', x2, ' ', y2, ')')<br>>> You may have to change the order of the points.<br>
>><br>>> On Fri, Mar 2, 2012 at 9:24 PM, Murat Beyhan <<a href="mailto:beyhan@deprem.gov.tr">beyhan@deprem.gov.tr</a>><br>>> wrote:<br>>> Chaitanya,<br>>><br>>> I store data in table not view as I told you before becasue I<br>
>> 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<br>>> 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<br>
>> 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<br>>> 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<br>>> 7,5 7, 5 5)))<br>>> * A GeometryCollection consisting of two Point values and<br>
>> one<br>>> LineString:<br>>><br>>> GEOMETRYCOLLECTION(POINT(10 10), POINT(30 30),<br>>> 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>
>><br>>> murat<br>>><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<br>>> string format.<br>
>> ><br>>> > On Fri, Mar 2, 2012 at 9:12 PM, Murat Beyhan<br>>> <<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<br>
>> change VRT<br>>> > file.<br>>> > in order to read data from such table storing data<br>>> as<br>>> > linestring<br>
>> ><br>>> > regards<br>>> ><br>>> > murat<br>><br><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br><br>+91-9494447584<br>17.2416N 80.1426E<br>