OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: JamesF1 on 04 Feb 2010, 18:46:21

Title: Connected Graph of Roads
Post by: JamesF1 on 04 Feb 2010, 18:46:21
For a little project I'm working on at the moment, I need to find a good way of getting the connectivity of roads on Chernarus (or any other island for that matter).  Basically, I want to create a weighted graph (with the weights being distances between junctions, in hundreds of metres) of all the roads, with junctions and dead-ends obviously serving as the vertices, and the road lengths in between being the edges.

I've been able to draw out the graph for Utes without too much effort, but even that resulted in 37 vertices and 35 edges... and took me an age to represent in my input format in my script.  What I need is something that's a little bit quicker.  Any reasonable suggestion is welcomed, as I don't fancy spending literally hundreds of hours working out the connectivity of the entirety of the Chernarussian road network!

Thanks in advance, guys  :good:
Title: Re: Connected Graph of Roads
Post by: kju on 04 Feb 2010, 21:20:10
ruebe seems to work in the same area. Check some CIT tickets of him:
http://dev-heaven.net/users/723

He has posted in BIF too I guess.
Title: Re: Connected Graph of Roads
Post by: JamesF1 on 04 Feb 2010, 21:43:54
Interesting reading, kju, thanks for that  :good:

Unfortunately, it seems as though he's just dreaming of the same features I am... but, in the meanwhile, I'm trying to come up with an alternative solution.  I thought about setting up a script that allowed me to click all the vertices I wanted on the map and, via the clipboard, dump the data to a third-party app.  Then another script which would allow me to provide connectivity of the nodes, etc.  But the more I think about it, the less viable it seems...

Update:
After talking it over with ruebe a bit via PM, it seems as though we're gonna have to wait for BIS to implement a function to retrieve routing tables (or allow them to be exported from Visitor) before my project is going to work... that is, unless I fancy spending a huge number of hours manually plotting everything (which, funnily enough, I don't :D).