If your objective is to develop a routing program over the sea returning various maritime routes from (origin,destination) pairs, you should rather rely on a linear mesh covering the seas, instead of polygons. I had exactly the same goal and I did something using:
- The shipping lane dataset "Oak Ridge National Labs CTA Transportation Network Group, Global Shipping Lane Network, World, 2000" available on geocommon. I did not find any more detailled dataset despite this question...
- The Dijskra shortest path finder in geotools. If you know a bit of Java, it is rather easy to use. You have to load the maritime lines from the SHP file, transform it into a graph using the
FeatureGraphGenerator, assign some weight to the edges with
EdgeWeighter, and compute the shortest path with
DijkstraShortestPathFinder. Tada! I find PGrouting a bit to big for just computing shortest paths.
It is possible to densify the input dataset to get more detailled routes, but then execution time should increase.
Here is an example of output (the red line):
EDIT: I have released a library/program implementing the approach mentioned above - Here it is: SeaRoute. Feel free to reuse/contribute !