Skip to main content

Has anybody attempted a nearest neighbour with breaklines/obstacles?

 

It's not as simple as creating zones and assigning an ID to to use as a group-by in the NeighborFinder.

 

Consider a lake where the distance has to go around the lakeshore instead of as the crow flies.

No solution yet. For obstacles I thought creating a network and using the ShortesPathFinder might work. But then you get the shortest path following the obstacle, which is not the shortest possible:

2021-06-09_06h59_33Edit: This is probably harder than it seems. It looks like maze solving. Maybe it is possible to implement an existing maze solving algorithm instead of inventing your own.


After reviewing the above image and creating an not so ideal example I guess this is much like a maze solving problem.

Obstacles can cause new points that will make other paths shorter. So the solutions seems to be generating lines from every point to every point. trowing away all invalid paths (through obstacles) and then get the shortest path. It looks much like a maze solving problem.WB2


Reply