Skip to main content
Question

working out distance but not line of sight

  • January 31, 2017
  • 5 replies
  • 28 views

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?

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

itay
Supporter
Forum|alt.badge.img+18
  • 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+62

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
Celebrity
  • February 10, 2017

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

Generates this red line.


itay
Supporter
Forum|alt.badge.img+18
  • Supporter
  • February 10, 2017

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

Generates this red line.

Very nice @takashi!