My Sea Router Turned a 50-Mile Canal Crossing Into a 10,337-Mile Detour

https://hackernoon.imgix.net/images/TElkbzNNNaRKSoKtDYEB1zOmXYw2-01d3ccj.png

I asked my sea router for a route from the Atlantic side of Panama to the Pacific side. It returned 10,337 nautical miles, going all the way around South America. The Panama Canal is about 50 nautical miles long.

The router is auto-sea-way, an open-source routing graph I generated for the whole ocean surface of the planet. I built it because I could not find one with enough detail for Rhumb, the marine navigation app I make. The first version worked well enough to be encouraging, right up to Panama.

The router was reading its input data correctly. My mistake was in what I thought that data described. Anyone who builds on a dataset they did not make has a version of this bug. Mine was easy to notice because it was ten thousand miles long.

Where my ocean came from

The existing open-source sea routers work from hand-drawn...

Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE

Read more