Question

Neighbour with break lines


Badge +22
  • Contributor
  • 1959 replies

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.


2 replies

Userlevel 6
Badge +32

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.

Userlevel 3
Badge +17

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