Forum #15 - Topic #104 - Message List
Hi there,
I've been working with pgRouting for a few months and I'm really delighted with its functionality. I just have one question: has anyone figured out a fast and elegant way of dealing with routes that begin and/or end in the middle of an edge (e.g. mid-block addresses)?
The only way I can think of is by inserting into my database two temporary edges that connect the mid-edge vertex to the vertices of the original edge. Not a bad solution, but I'd love to stay away from that extra database overhead -- and the need to clean up the temporary records in the database.
Has anyone else come up with a good way of dealing with this?
Thanks, Jordan
-
Message #393
Hi Jordan,
You don't need to insert temporary edges into the database. You can create them using substring function of PostGIS and then append them to your result set with UNION.
You can look at the demo here - http://wrs.postlbs.org/geobase.html, just click on the pen icon at the upper right coner and then try to start and end with a middle of any edge.
anton01/23/08 10:38:23

