Closed bluefish007 closed 1 year ago
Hi @bluefish007 ,
The issue is coming from the network which is not in the most perfect shape, I'm updating time to time but it's quite difficult to detect all missing connections like this, as it's quite time consuming...
Thanks for reporting this, I'll improve it for the next release v1.0.10
In red highlighted the missing connection in the network geojson:
Thank you for your answer and explanation!
From Palermo to Palma it also looks awkward:
Same issue, the maritime network is really a mess, it requires a real fondamental clean. https://github.com/genthalili/searoute-py/blob/main/searoute/data/marnet_densified_v2.geojson
PS: It was taken from the eurostat/searoute initially, but some of the crossing lines are not correctly connected with each other and especially some ports not represented correctly.
Feel free to collaborate and help me improve the network : https://github.com/genthalili/searoute-py/blob/main/searoute/data/marnet_densified_v2.geojson :) .
How can I help to improve the network?
Not sure how familiar you are with geojson format... but what you can do is check if you can develop a function which will detect all crossing lines(LineStrings) that are not touching each other, like in the above example (screenshot) I showed. Then as a second step is to add common "points" in both LineStrings, as this is causing most of issues.
The other option is do this manually, but it's lot of time consuming.
Anyways, this will not fix everything (however at least 80-90% of issues will be), the rest need to be fixed manually, like missing direct connections etc.., I usually do it here : https://vector.rocks/
I think I can develop a function to detect and fix the geojson.
But at the moment I am not yet familiar with geojson and have not yet fully understood the problem. Can you please explain this again. How can I identify that there is no connection at the crossing at the example? (How did you find this crossing? At least visually it looks like a crossing...)
Fixed in the merge and latest version 1.1.0 :
Why this strange route?
origin = [2.650544, 39.571625] # Palma destination = [2.1734, 41.3850] # Barcelona