Question

Left/Right side of lines

  • 21 June 2019
  • 3 replies
  • 30 views

Badge

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

Userlevel 2
Badge +16

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.

Badge

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.

Badge

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

Reply