<div dir="ltr">Hi Greg,<div><br></div><div style>You can try like this simple example with 2 crossing lines:</div><div style><br></div><div style><font face="courier new, monospace">CREATE TABLE split(id serial,geom geometry);</font></div>

<div style><font face="courier new, monospace">INSERT INTO split(geom) VALUES(ST_GeometryFromText('LINESTRING(0 0,1 1)'));<br></font></div><div style><font face="courier new, monospace">INSERT INTO split(geom) VALUES(ST_GeometryFromText('LINESTRING(0 1,1 0)'));<br>

</font></div><div style><font face="courier new, monospace"><br></font></div><div style><font face="courier new, monospace">SELECT ST_Dump(ST_Split(a.geom,b.geom)) FROM split a, split b WHERE <a href="http://a.id">a.id</a> != <a href="http://b.id">b.id</a>;</font><br>

</div><div style><br></div><div style>This should return 4 line segments.</div><div style><br></div><div style>Daniel</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, May 7, 2013 at 9:16 AM, Greg Allensworth <span dir="ltr"><<a href="mailto:gregor@greeninfo.org" target="_blank">gregor@greeninfo.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">A few weeks ago, Steve Mather posted, and one of his questions was about splitting up a trail network so as to create intersections, but without splitting unnecessarily.<br>


<br>
<a href="http://pgrouting-users.974093.n3.nabble.com/pgrouting-users-A-vs-Dijkstra-and-the-nature-of-the-A-implementation-td4025099.html" target="_blank">http://pgrouting-users.974093.<u></u>n3.nabble.com/pgrouting-users-<u></u>A-vs-Dijkstra-and-the-nature-<u></u>of-the-A-implementation-<u></u>td4025099.html</a><br>


<br>
The reply was basically "it's not that hard" which is good to hear, though I'm still trying to wrap my head around how exactly I would do this. Any explanation of the logic would be helpful there.<br>
<br>
<br>
This fellow at StackExchange posted some code, but but he says that it has problems that again I don't quite follow.<br>
<br>
<a href="http://gis.stackexchange.com/questions/34687/how-to-split-osm-roads-into-individual-segments-at-intersections" target="_blank">http://gis.stackexchange.com/<u></u>questions/34687/how-to-split-<u></u>osm-roads-into-individual-<u></u>segments-at-intersections</a><br>


<br>
Any comments on his approach, and what would be going wrong with it also creating the unsplit original segments?<br>
<br>
<br>
-- <br>
Greg Allensworth, Web GIS Developer<br>
BS  A+  Network+  Security+  Linux+  Server+<br>
GreenInfo Network - Information and Mapping in the Public Interest<br>
564 Market Street, Suite 510  San Francisco CA 94104<br>
PH: 415-979-0343 x302  FX: 415-979-0371    email: <a href="mailto:gregor@greeninfo.org" target="_blank">gregor@greeninfo.org</a><br>
Web: <a href="http://www.GreenInfo.org" target="_blank">www.GreenInfo.org</a>     <a href="http://www.MapsPortal.org" target="_blank">www.MapsPortal.org</a><br>
<br>
Subscribe to MapLines, our e-newsletter, at <a href="http://www.GreenInfo.org" target="_blank">www.GreenInfo.org</a><br>
______________________________<u></u>_________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org" target="_blank">Pgrouting-users@lists.osgeo.<u></u>org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/pgrouting-<u></u>users</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse">Georepublic UG & Georepublic Japan<br>eMail: <a href="mailto:daniel.kastl@georepublic.de" style="color:rgb(66,99,171)" target="_blank">daniel.kastl@georepublic.de</a><br>

Web: <a href="http://georepublic.de/" style="color:rgb(66,99,171)" target="_blank">http://georepublic.de</a></span>
</div>