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

Enhanced query filter in Ports for restrictive countries #28

Closed genthalili closed 3 weeks ago

genthalili commented 4 months ago

The query should be scaled per each condition:

  1. terminals rather to include ONLY terminal ports
  2. country rather to include ONLY from countries (same country for port as the origin)
  3. to_country rather to include ONLY to countries (ports that delivers only to destination country)

Add a parameter : strict, default as False. When set to True force ALL queries to match, otherwise will apply queries as per the list above, one after one, if condition N returns nothing, then go return result of condition N-1, unless N=1