<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
Gustavo,<div><br class="webkit-block-placeholder"></div><div>It sounds like the dump command may work for you.</div><div><br class="webkit-block-placeholder"></div><div>However it seems to me that you still may be trying to tackle a slightly different issue:</div><div><br class="webkit-block-placeholder"></div><div>how to convert your multilinestrings into single linestrings (each on a row) and merge them in such a way to be collected along with all other contiguous linestrings that share end/start points.</div><div><br class="webkit-block-placeholder"></div><div>A moment ago in IRC bitner kindly helped me work out these steps that may be helpful for you:</div><div><br class="webkit-block-placeholder"></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 13px; "><font face="Lucida Grande" size="3" color="#555555" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(85, 85, 85); font-size: 12px; ">--Create testing multipolygon data with two linestrings that share endpoints and another that is free floating</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 13px; "><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">drop</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">table</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">if</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">exists</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> lines;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 13px; "><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">create</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">table</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> lines (</font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">id</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> serial,</font><font face="Lucida Grande" size="3" color="#777700" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(119, 119, 0); font-size: 12px; ">the_geom</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#990066" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(153, 0, 102); font-size: 12px; ">geometry</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; ">);</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 13px; "><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">INSERT</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">into</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> lines (</font><font face="Lucida Grande" size="3" color="#777700" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(119, 119, 0); font-size: 12px; ">the_geom</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; ">) </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">values</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> (</font><font face="Lucida Grande" size="3" color="#990066" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(153, 0, 102); font-size: 12px; ">geomfromtext</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; ">(</font><font face="Lucida Grande" size="3" color="#ff3399" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(255, 51, 153); font-size: 12px; ">'MULTILINESTRING((4.8938679245283 46.3443396226415,33.313679245283 73.7028301886792,49.5872641509434 80.0707547169811),(49.5872641509434 80.0707547169811,90.9583136792453 89.2813679245283,54.3363797169811 103.03608490566,29.0620872641509 103.293985849057,12.2125589622641 107.1625,11.1624233831055 106.590266209164,10.4214805264064 107.529010012923,11.2220067193803 108.417488521584,12.2326314413493 107.778056025276),(37.506947728971 97.6302534161404,12.1756482134062 82.9892270906306))'</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; ">,-1));</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal 'Lucida Grande'; min-height: 13px; font-size: 12px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 13px; "><font face="Lucida Grande" size="3" color="#555555" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(85, 85, 85); font-size: 12px; ">--Disaggregate multilines into linestrings, one per row</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 13px; "><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">drop</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">table</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">if</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">exists</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> single_lines;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 13px; "><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">SELECT</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> generate_series(1,(Select ST_NumGeometries(</font><font face="Lucida Grande" size="3" color="#777700" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(119, 119, 0); font-size: 12px; ">the_geom</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; ">))) </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">as</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">id</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; ">,</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 13px; "><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; ">ST_GeometryN(</font><font face="Lucida Grande" size="3" color="#777700" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(119, 119, 0); font-size: 12px; ">the_geom</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; ">, generate_series(1, ST_NumGeometries(</font><font face="Lucida Grande" size="3" color="#777700" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(119, 119, 0); font-size: 12px; ">the_geom</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; ">))) </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">AS</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#777700" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(119, 119, 0); font-size: 12px; ">the_geom</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 13px; "><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">into</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> single_lines </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">FROM</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> lines;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal 'Lucida Grande'; min-height: 13px; font-size: 12px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 13px; "><font face="Lucida Grande" size="3" color="#555555" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(85, 85, 85); font-size: 12px; ">--Collect and merge all linestrings</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 13px; "><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">drop</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">table</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">if</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">exists</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> bitner_collected;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 13px; "><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">SELECT</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#990066" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(153, 0, 102); font-size: 12px; ">st_linemerge</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; ">(Collect(</font><font face="Lucida Grande" size="3" color="#777700" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(119, 119, 0); font-size: 12px; ">the_geom</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; ">)) </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">as</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#777700" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(119, 119, 0); font-size: 12px; ">the_geom</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 13px; "><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">into</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> bitner_collected </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">from</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> single_lines;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal 'Lucida Grande'; min-height: 13px; font-size: 12px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 13px; "><font face="Lucida Grande" size="3" color="#555555" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(85, 85, 85); font-size: 12px; ">--Disagregate the resulting multilinestring resulting in continguous linestrings, again one per row</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 13px; "><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">drop</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">table</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">if</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">exists</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> single_lines_again;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 13px; "><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">SELECT</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> generate_series(1,(Select ST_NumGeometries(</font><font face="Lucida Grande" size="3" color="#777700" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(119, 119, 0); font-size: 12px; ">the_geom</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; ">))) </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">as</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">id</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; ">, ST_GeometryN(</font><font face="Lucida Grande" size="3" color="#777700" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(119, 119, 0); font-size: 12px; ">the_geom</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; ">, generate_series(1, ST_NumGeometries(</font><font face="Lucida Grande" size="3" color="#777700" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(119, 119, 0); font-size: 12px; ">the_geom</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; ">))) </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">AS</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font><font face="Lucida Grande" size="3" color="#777700" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(119, 119, 0); font-size: 12px; ">the_geom</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> </font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-size: 13px; "><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">into</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> single_lines_again </font><font face="Lucida Grande" size="3" color="#0000cc" style="font: normal normal normal 11px/normal 'Lucida Grande'; color: rgb(0, 0, 204); font-size: 12px; ">FROM</font><font face="Lucida Grande" size="3" style="font: normal normal normal 11px/normal 'Lucida Grande'; font-size: 12px; "> bitner_collected;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 11px;"><br></span></font></div></div><div><br class="webkit-block-placeholder"></div><div>Cheers,</div><div><br class="webkit-block-placeholder"></div><div>Dane</div><div><br class="webkit-block-placeholder"></div><div>ps. please anyone let me know if the text formatting is helpful or just annoying.</div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div>On Feb 6, 2008, at 9:30 AM, Kevin Neufeld wrote:</div><div><div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi Gus,</div><div>Glad to help!</div><div>Actually, it is documented, (<a href="http://postgis.refractions.net/docs/ch06.html#id2704158">http://postgis.refractions.net/docs/ch06.html#id2704158</a>) though I agree it definitely could be clearer, i.e. with some examples.</div><div>Here are some more links/examples to PostgreSQL's set returning functions...</div><div><a href="http://www.postgresql.org/docs/8.2/static/xfunc-sql.html">http://www.postgresql.org/docs/8.2/static/xfunc-sql.html</a></div><div><a href="http://www.postgresql.org/docs/8.2/static/functions-srf.html">http://www.postgresql.org/docs/8.2/static/functions-srf.html</a></div><div><br></div><div>Hope this helps,</div><div>-- Kevin</div><div><br></div><div>Gustavo Ces wrote:</div> <blockquote type="cite"><div>thanks Kevin!</div><div><br></div><div>   Now i understand which was the problem!</div><div>   And you run faster, how to extract geometry from geometry_dump type (?) was the next question! :)</div><div>   It´s not documentated, so i supose it´s a composite type and you know how to access it after search that type in database, don´t you?</div><div><br></div><div><br></div><div><br></div><div>Gus</div><div>----- Original Message ----- From: "Kevin Neufeld" <<a href="mailto:kneufeld@refractions.net">kneufeld@refractions.net</a>></div><div>To: "PostGIS Users Discussion" <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>></div><div>Sent: Wednesday, February 06, 2008 5:22 PM</div><div>Subject: Re: [postgis-users] multiline to linestring</div><div><br></div><div><br></div> <blockquote type="cite"><div>Hi Gus,</div><div><br></div><div>As noted from your error, ST_Dump() is a set returning function, ie. you need to perform something like 'select * from dump(...)'</div><div><br></div><div>Try this:</div><div>select geom from dump(</div><div> (select linemerge(collect(the_geom)) from lines)</div><div>);</div><div><br></div><div>Cheers,</div><div>-- Kevin</div><div><br></div><div>Gustavo Ces wrote:</div> <blockquote type="cite"><div>Hi all,</div><div> i´ve got a problem with ST_Dump() ( well, actually this one doesn´t exist )</div><div>and dump() function. I´m working with</div><div> "PostgreSQL 8.2.3 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.4.2 (mingw-special)"</div><div>"POSTGIS="1.2.1" GEOS="2.2.3-CAPI-1.1.1" PROJ="Rel. 4.5.0, 22 Oct 2006" USE_STATS"</div><div> I want to convert linestrings from multilinestrings, with linemerge, to obtain united linestrings in overlapping points</div><div>with this sentence:</div><div> select dump(linemerge(collect(the_geom))) from lines</div><div> but i obtain:</div><div> ERROR: set-valued function called in context that cannot accept a set</div><div>Estado SQL:0A000</div><div>The result of:</div><div> select astext(LineMerge(Collect(the_geom))) from lines</div><div> is:</div><div><br></div><div>"MULTILINESTRING((4.8938679245283 46.3443396226415,33.313679245283 73.7028301886792,49.5872641509434 80.0707547169811,90.9583136792453 89.2813679245283,54.3363797169811 103.03608490566,29.0620872641509 103.293985849057,12.2125589622641 107.1625,11.1624233831055 106.590266209164,10.4214805264064 107.529010012923,11.2220067193803 108.417488521584,12.2326314413493 107.778056025276),(37.506947728971 97.6302534161404,12.1756482134062 82.9892270906306))"</div><div> with numgeometries=2, the logic result with my original data.</div><div>How can i extract those linestrings separately?</div><div> Gus</div><div>------------------------------------------------------------------------ </div><div><br></div><div>_______________________________________________</div><div>postgis-users mailing list</div><div><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a></div><div><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a></div><div><br></div> </blockquote><div>_______________________________________________</div><div>postgis-users mailing list</div><div><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a></div><div><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a> </div> </blockquote><div><br></div><div>_______________________________________________</div><div>postgis-users mailing list</div><div><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a></div><div><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a></div> </blockquote><div>_______________________________________________</div><div>postgis-users mailing list</div><div><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a></div><div><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a></div> </blockquote></div><br></div></body></html>