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

Routes from Caspian see #1

Closed siggemannen closed 1 year ago

siggemannen commented 1 year ago

Hello! And thanks for a nice lib! I gave it a try and it generates some nice routes. The route from Caspian See to Black See looks a bit suspect, see attached image: image

From what i could find in Google, the vessels are supposed to go through the Volgograd -> Volga-Don channel, something like this: image

I checked the code and i guess one can adjust the big geojson file with "better route", but not sure exactly what's the methology to do this. Is it just a random line string needed, or is there a logic to how to generate those?

genthalili commented 1 year ago

Hi @siggemannen, thanks for checking out the lib and for reporting this issues !

Indeed, this error is caused by the geojson file, I usually use https://vector.rocks/ to change LineStrings or add a new one. The network is not super optimal, there is room for improvement for sure, so time to time while using this lib and when I detect strange routes, I update and improve it.

You also can remark that there are some straight lines now connecting the globe side by seide, this was the solution to make connections between Australia and US (Pacific Ocean) routes as in version 1.0.7 was not possibel.

After upgrating to 1.0.8 it should be able to access the Caspian sea as you suggested.

Please check it and let me know before I close this issue.

image

siggemannen commented 1 year ago

Thanks for taking a look! The new route looks very good. And i see regarding the linestrings, maybe i can make a couple of patches myself later. I have a really large voyage database :D

I use python pip and couldn't upgrade to version 1.08, cause it says that this is the latest version. I'm running following:

`

pip install searoute upgrade ... Requirement already satisfied: searoute in c:\users\siggemannen\appdata\roaming\python\python38\site-packages (1.0.7) ERROR: Could not find a version that satisfies the requirement upgrade ERROR: No matching distribution found for upgrade `

Do i need to do something else to get the new version perhaps?

genthalili commented 1 year ago

I think the right command is pip install --upgrade searoute then when you do pip show searoute should show the version 1.0.8

siggemannen commented 1 year ago

Yes, that did the trick. Looks good now! Thanks a lot!