-1
$\begingroup$

I have such problem -- I have to compute shortest path going from node A to node B, but with condition the path goes through some area C. Area means multiple nodes C1, C2, C3... Cn. It has to go just through one of them, but of course it can go through all of them.

Actual scenario -- OpenStreetMap data, and I go from some node to another node, but I would like to ride near some lake. It does not matter for me, if I go left/right/etc of the lake, but I have to "touch" it -- so in this case, all nodes surrounding the lake is my area C.

Computing two paths like A-C1 and C1-B may give optimal path but it is not a guarantee.

So how to do it precisely?

$\endgroup$

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy