distance calculation between two ports with PostgreSQL and Postgis
-
26-09-2019 - |
Question
I'm using PostgreSQL with PostGis and have shapes of all countries loaded.
How can I calculate the shortes sea route between two ports (without intersecting a country shape)
is there a 'standard solution'?
Solution
you could use graph theory so long as you have a set of sea-lane type way-points defined. these would be points along the ship travel lanes with maybe nautical miles between each one indicated. then use a min path algorithm to find the best travel lane.
of course inreal life this problem has many more variables than just distance i would think.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow