genthalili / searoute-py

A python package to calculate the shortest sea route between two points on Earth.
Apache License 2.0
63 stars 14 forks source link

Not getting consistent and expected route over voyage #38

Open MasterMindSudo opened 4 days ago

MasterMindSudo commented 4 days ago

When including the original point, it tries to connect to a shortest next point , but it is too close to the shore and not connecting to a better waypoint image image image image Should be connecting to the upper waypoint image image image image It finally gave in after the vessel passed the next way point image this is how i call the searoute package route = sr.searoute(origin, destination, units=units,restrictions=['suez','panama','northwest'], append_orig_dest = True )
any where i can tweak the setting to make sure the route does not take the waypoint that is too close to the shore like in the first few images? thanks

genthalili commented 3 days ago

The reason it's returning the result you see, it's due to the network how it's configured:

image

As you can see there are not many points and edges around this area, and some edges are relatively close to the shore. The append_orig_dest allows to add two extra edges, at the begining from your origin (lon, lat) and at the end to you destination (lon,lat).