Hi Rupert...<br><br>I think an easy way to do this is something like:<br><br>select * from yourTempTable<br>where GeometryType(LineMerge(the_geom)) = 'MULTILINESTRING'<br><br>If the diferents linestrings in a multilinestring can be joined into one linestring without gaps then the LineMerge function will return a 'Linestring' geometry; otherwise it will return a 'Multilinestring' geometry and that may be what you want. However this doesn't check if the endPoint of each linestring in your multilinestring is the same point as the startPoint of the next linestring in your multilinestring. I don't know if I'm very clear about that so I give you some examples:
<br><br>select AsText(LineMerge(GeometryFromText('MULTILINESTRING((0 0, 1 1),(1 1, 2 2),(2 2, 3 3))')))<br><br>it will return Linestring as expected;<br><br>select AsText(LineMerge(GeometryFromText('MULTILINESTRING((0 0, 1 1),(2 2, 3 3),(4 4, 5 5))')))
<br><br>it will return a Multilinestring as expected;<br><br>select AsText(LineMerge(GeometryFromText('MULTILINESTRING((0 0, 1 1),(2 2, 3 3),(1 1, 2 2))')))<br><br>it will return a Linestring, cause the join of the 3 linestring has no gaps even when the linestrings are not joined in order.
<br><br>I hope I was clear enough.<br><br>Rodrigo.<br><br><br><div><span class="gmail_quote">On 8/6/07, <b class="gmail_sendername">Rupert</b> <<a href="mailto:rndguzmanjr@gmail.com">rndguzmanjr@gmail.com</a>> wrote:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi List,<br><br>How can I check for line continuity in TEMP Table ?<br>The table consists of 1200 records, where the_geom is
<br>MULTILINESTRING. I want to know which records have<br>discontinuous lines, like the attached image.<br><br>Regards,<br><br>Rupert<br><br><br><br><br>_______________________________________________<br>postgis-users mailing list
<br><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users
</a><br><br><br></blockquote></div><br>