Suman,<br><br>Also try ST_LineMerge for merging the indivudal linestring elements of a single multilinestring into a single linestring (where the lines connect).  ST_Union is expensive, although I believe work has been done on aggregated geometry functions in the later/latest postgis releases.<br>
<br>Steve<br><br><br><div class="gmail_quote">2009/9/16 Suman Chatterjee <span dir="ltr">&lt;<a href="mailto:schatterjee@addisontx.gov">schatterjee@addisontx.gov</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Pavel!<br>
Thanks a lot for your help. St_union is really helpful. Now I am able to do it<br>
<font color="#888888">Suman<br>
</font><div><div></div><div class="h5"><br>
-----Original Message-----<br>
From: Pavel Iacovlev [mailto:<a href="mailto:iacovlev.pavel@gmail.com">iacovlev.pavel@gmail.com</a>]<br>
Sent: Wednesday, September 16, 2009 8:44 AM<br>
To: Suman Chatterjee<br>
Cc: <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
Subject: Re: [mapserver-users] multilinestring and linestring<br>
<br>
1) You can convert multiple multilinestrings into 1 multilinestring<br>
with st_union<br>
2) st_multi()<br>
<br>
On Wed, Sep 16, 2009 at 4:30 PM, Suman Chatterjee<br>
&lt;<a href="mailto:schatterjee@addisontx.gov">schatterjee@addisontx.gov</a>&gt; wrote:<br>
&gt; Hi all,<br>
&gt;<br>
&gt; I want to know :<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; 1)       Is there any way to convert many Multilinestring geometry into one<br>
&gt; linestring geometry?<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; I need to enter linestring geometry into a table with check constraint<br>
&gt; &quot;enforce_geotype_the_geom&quot; meant for Multilinestring . So I need to convert<br>
&gt; the linestring to a multilinestring<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; 2)       How can I convert a linestring to a multilinestring?<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Thanks<br>
&gt;<br>
&gt; Suman<br>
&gt;<br>
&gt; *******************************************************************************************************************<br>
&gt;<br>
&gt; This e-mail and any files or attachments transmitted with it contains<br>
&gt; Information that is confidential and privileged. This document may contain<br>
&gt; Protected Health Information (PHI) or other information that is intended<br>
&gt; only for the use of the individual(s) and entity(ies) to whom it is<br>
&gt; addressed. If you are the intended recipient, further disclosures are<br>
&gt; prohibited without proper authorization. If you are not the intended<br>
&gt; recipient, any disclosure, copying, printing, or use of this information is<br>
&gt; strictly prohibited and possibly a violation of federal or state law and<br>
&gt; regulations. If you have received this information in error, please delete<br>
&gt; it and notify Hamid Khaleghipour at 972-450-2868 immediately. Thank you.<br>
&gt;<br>
&gt; *******************************************************************************************************************<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; mapserver-users mailing list<br>
&gt; <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
--<br>
<a href="http://iap.md" target="_blank">http://iap.md</a>, The future is open<br>
_______________________________________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</div></div></blockquote></div><br>