Skip to main content

Hi

Odd one. I need to work out the distance between two points however I need it to exclude an area so the distance would need to work around the area instead of working it out as line of sight?

Any ideas?

My take on it would be to create a line between the two points and clip it with the area .

Then clip the area with the lines to break up the area and transform it into lines (geometrycoercer)

Join the outside line segments and area lines and calculate the length.

Hope this works > untested!


Hi,

I would suggest the following approach: use Hull accumulator transformer to create a convex/concave polygon which includes start/end points + all obstacle polygons. Then convert that polygon into a line geometry - so you will have a loop which connects the start/end points and goes around all obstacles. Split that closed line into two segments and select the shortest one.

Thought it sounds very simple, please realize that Hull transformer does all heavy lifting.

Hope that it helps.

Kind regards,

Sasha


Sounds similar to something I worked on recently (a shipping route visualiser, given 2 points it would draw a route between them, only using water of course)

I generated a dense hex grid for the oceans, then used the cell edges (lines) as input for the ShortestPathFinder. This woud require (if we decide to go ahead with this project) some manual editing to make sure the network properly connects in tight spaces such as the Strait of Dover, Strait of Gibraltar, Suez Canal, Panama Canal etc.

I like the suggestion made by @alexandervstepa though, I'll have to give that a try.


I tested @itay's idea. It seems to work fine :-)

Generates this red line.


I tested @itay's idea. It seems to work fine :-)

Generates this red line.

Very nice @takashi!

 


Reply