Skip to main content
Question

Left/Right side of lines


Forum|alt.badge.img

Hello FME users,

 

I have a set of lines that make up a polygon. I need to determine which side(left or right) of the line is "looking" outside of the polygon.

 

Lines are not oriented the same, end point of one is not always a start point of next line and so on.

 

 

LeftRightSpatialCalculator can't do the job because I don't have anything to Candidate.

 

Thank you in advance.

 

Milos

 

3 replies

erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • June 21, 2019

Create the polygons by using the AreaBuilder.

Then use the LeftRightCalculator with line as Base and polygons as Candidate.

This should show you if a polygon is left or right from the line.


Forum|alt.badge.img
  • Author
  • June 24, 2019
erik_jan wrote:

Create the polygons by using the AreaBuilder.

Then use the LeftRightCalculator with line as Base and polygons as Candidate.

This should show you if a polygon is left or right from the line.

This doesn't work for me. It gives me only polygon as an output and in feature information relative position as undefined for every line.


Forum|alt.badge.img
  • Author
  • June 25, 2019

I had an idea how to solve this but i don't know is it valid and i had some additional problems.

 

My idea is to build polygon from lines, use Bufferer with small - buffer zone then use Chopper to decompose new polygon then use LeftRightSpatialCalculator to determine the side.

 

New problems are:

-I lost id of lines because of AreaBuilder.

-I gained extra line where angle is close to 360.

 

As a final result i need to have informations for only input lines.

 

I have uploaded my workspace and some simple test data.

example.fmw

test.zip


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