These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Feature Request: API call for jump routes

Author
Cryten Jones
Advantage Inc
#1 - 2015-07-31 17:59:46 UTC  |  Edited by: Cryten Jones
Hoping that a Dev sees this as it's for them really.

Would it be possible to have an API call that returns a jump route and jump count? Something like

route.xml.aspx?startSystemID=1234&endSystemID=5678&setting=shortest


Returning:

[results]
[route]
[system] Name and SystemID goes here[/system]
[system] Name and SystemID goes here[/system]
[system] Name and SystemID goes here[/system]
[system] Name and SystemID goes here[/system]
[/route]
[jumps]4[/jumps]
[results]



Not sure that 100% accurate but I am sure it's enough to get the idea. (Had to use [ rather than < as the forum blocks them)

Thanks
Mr Mac
Dark Goliath
#2 - 2015-07-31 20:55:20 UTC
iirc EVE-Central has route api
Jack Hayson
The Scope
Gallente Federation
#3 - 2015-07-31 21:29:29 UTC
Why not just build one yourself?
Cryten Jones
Advantage Inc
#4 - 2015-07-31 22:43:28 UTC
Jack Hayson wrote:
Why not just build one yourself?


Because I lack the skills ... why else :-)
Jack Hayson
The Scope
Gallente Federation
#5 - 2015-08-01 00:08:17 UTC  |  Edited by: Jack Hayson
Well, you could do it with a breadth first search algorithm.

Here is something I put together with PHP+MYSQL.
Sorry if the code is a bit "funky" - I'm not a professional IT dude. (Maybe I'll try cleaning it up tomorrow when I'm less drunk. xD )

Example:
http://everoute.net78.net/routeExample.php
Code download:
https://www.dropbox.com/s/0ffwklm7pr9nhiy/route.zip?dl=0

It can calculate shortest and safe routes. (not safest though - for that you would need a more advanced algorithm)

Should be reasonably fast.
My laptop takes roughly 15 minutes to fill the cache with every possible route in eve. You don't need to do that though - calculating them on demand and then caching them is fast enough.(takes less than a second)

EDIT: Fixed a minor bug. (lowsec starts at <0.45 not <0.5)