views:

224

answers:

2

Hi Friends,

I have one query in which I really stuck at that. I have port database with waypoints and also routing points which I need to use in distance calculation between two ports. I have done lots of R&D to find formula which gives me distance between two points. I also need shortest route which is possible.

I have reviewed online tools which allow user to calculate the distance. But I want to do the same at my own. I have reviewed Port World Distance Calculator. I reviewed the Great Circle formula to achieve that but I don't know that how we avoid landscapes in sea distance and in which direction I need to find distance for second port.

A: 

The simpliest that comes - just create a table in your database like:

port1id : port2id : distance

number of ports are limited, and this table will give you flexibility to set correct distance

volody
Sorry Dear but there are more than 4000 ports in the system. And a user also want to use route system like he wants to use canals or not, sometimes user needs to select long route as because short route may costly then long route. I also need to draw a route in google map. you can review http://www.portworld.com/map/ for more idea.
Ashish Ranpara
You can also introduce extreme points of every continent like Panama canal, Cape Town, etc. Then group ports by areas and use Graph theory http://en.wikipedia.org/wiki/Graph_theory to find closest path
volody
another source is http://en.wikipedia.org/wiki/Motion_planning
volody
A: 

BLM-Shipping can help you. It is one of the world best distance table!

boloomo