[pgrouting-users] Splitting a network to create intersections

Daniel Kastl daniel at georepublic.de
Mon May 6 19:44:21 PDT 2013


Hi Greg,

You can try like this simple example with 2 crossing lines:

CREATE TABLE split(id serial,geom geometry);
INSERT INTO split(geom) VALUES(ST_GeometryFromText('LINESTRING(0 0,1 1)'));
INSERT INTO split(geom) VALUES(ST_GeometryFromText('LINESTRING(0 1,1 0)'));

SELECT ST_Dump(ST_Split(a.geom,b.geom)) FROM split a, split b WHERE a.id !=
b.id;

This should return 4 line segments.

Daniel



On Tue, May 7, 2013 at 9:16 AM, Greg Allensworth <gregor at greeninfo.org>wrote:

> 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.
>
> http://pgrouting-users.974093.**n3.nabble.com/pgrouting-users-**
> A-vs-Dijkstra-and-the-nature-**of-the-A-implementation-**td4025099.html<http://pgrouting-users.974093.n3.nabble.com/pgrouting-users-A-vs-Dijkstra-and-the-nature-of-the-A-implementation-td4025099.html>
>
> 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.
>
>
> This fellow at StackExchange posted some code, but but he says that it has
> problems that again I don't quite follow.
>
> http://gis.stackexchange.com/**questions/34687/how-to-split-**
> osm-roads-into-individual-**segments-at-intersections<http://gis.stackexchange.com/questions/34687/how-to-split-osm-roads-into-individual-segments-at-intersections>
>
> Any comments on his approach, and what would be going wrong with it also
> creating the unsplit original segments?
>
>
> --
> Greg Allensworth, Web GIS Developer
> BS  A+  Network+  Security+  Linux+  Server+
> GreenInfo Network - Information and Mapping in the Public Interest
> 564 Market Street, Suite 510  San Francisco CA 94104
> PH: 415-979-0343 x302  FX: 415-979-0371    email: gregor at greeninfo.org
> Web: www.GreenInfo.org     www.MapsPortal.org
>
> Subscribe to MapLines, our e-newsletter, at www.GreenInfo.org
> ______________________________**_________________
> Pgrouting-users mailing list
> Pgrouting-users at lists.osgeo.**org <Pgrouting-users at lists.osgeo.org>
> http://lists.osgeo.org/**mailman/listinfo/pgrouting-**users<http://lists.osgeo.org/mailman/listinfo/pgrouting-users>
>



-- 
Georepublic UG & Georepublic Japan
eMail: daniel.kastl at georepublic.de
Web: http://georepublic.de
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/pgrouting-users/attachments/20130507/b0a0e455/attachment.html>


More information about the Pgrouting-users mailing list