genthalili / searoute-py

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

Not getting consistent and expected route over voyage #38

Open MasterMindSudo opened 5 months ago

MasterMindSudo commented 5 months 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 5 months 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).