From: Haider H. <hai...@eb...> - 2014-09-27 20:53:54
|
I want to represent my city's road network in geotool's graph object. Since road network is hybrid, it has one way roads and two ways roads. I cannot find a graph generator that allows to generate directed and undirected edges in same graph. There are graph generators for all directed or all undirected edges. So what is the most efficient way of representing road network in geotool's graph object. Directivity is important for me because I have to run routing algorithms, plus adding two edges (in both directions) for two roads is not efficient solution as most roads are two way. Other option is to use undirected edges for all roads and using a Map<Pair<node_id1, node_id2>,boolean> that tells which ways you can traverse the edge like two way or one way. I posted this question on stackoverflow: http://stackoverflow.com/questions/26044947/how-to-represent-bidirectional-edge-using-directedlinestringgraphgenerator-in-ge Regards, Haider |