<div>In the same trailing of that question and the answer, that select statement would run the function st_union in that table, without the need to create a new table or geometry column?</div>
<div> </div>
<div>Sorry to use this post for this, just tought its a quite novice question, so more people could use the answer.</div>
<div> </div>
<div>Thx</div>
<div> </div>
<div>Att.</div>
<div> </div>
<div>George<br><br></div>
<div class="gmail_quote">On Wed, Apr 30, 2008 at 7:20 PM, Paragon Corporation <<a href="mailto:lr@pcorp.us">lr@pcorp.us</a>> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Bob,<br><br>If I understand you correctly, I think you want to use one of the following<br><br>SELECT somefield, ST_Union(the_geom)<br>
FROM sometable<br>GROUP BY somefield<br><br>So lets say you want to collapse 3 rows into 1 then you just need to group<br>by some common field.<br><br>E.g. if somefield = 1 for your 3 records, then those would get rolled into<br>
the same record.<br><br>The above will give you a LINESTRING or MULTILINESTRING.  If you have all<br>LINESTRINGS, then may be more efficient to do this.  The below will first<br>collapse all with common somefield into a MULTILINESTRING and then the<br>
LineMerge will do the best it can to stitch back into a single line string.<br>This is not possible with completely disjoint linestrings.<br><br>SELECT somefield, ST_LineMerge(ST_Collect(the_geom))<br>FROM sometable<br>GROUP BY somefield<br>
<br><br>If you are using the older version of Postgis, you can just take out the ST_<br>in the examples I have above.<br><br>Hope that helps,<br>Regina<br>
<div>
<div></div>
<div class="Wj3C7c"><br>-----Original Message-----<br>From: <a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a><br>[mailto:<a href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a>] On Behalf Of Bob<br>
Pawley<br>Sent: Wednesday, April 30, 2008 12:40 PM<br>To: PostGIS Users Discussion<br>Subject: [postgis-users] Line To Path<br><br>Is there a method of converting three lines that require three rows into a<br>path that occupies a single row??<br>
<br>Bob Pawley<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" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><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" target="_blank">http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br>