Skip to main content
Question

working out distance but not line of sight


Forum|alt.badge.img

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?

5 replies

itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • January 31, 2017

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!


Forum|alt.badge.img

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


redgeographics
Celebrity
Forum|alt.badge.img+50

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.


takashi
Evangelist
  • February 10, 2017

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

Generates this red line.


itay
Supporter
Forum|alt.badge.img+17
  • Supporter
  • February 10, 2017
takashi wrote:

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

Generates this red line.

Very nice @takashi!

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings