Question

Line on Area Overlayer: left and right

  • 13 September 2013
  • 7 replies
  • 5 views

Badge +11
Hi Guys, 

 

 

I'm reading TomTom MultiNet shapfiles. For certain roads, I need to add an extra administrative level (province, level A2 in Belgium). 

 

The LineonArea Overlayer works fine and returns 2 areas when the line is exactly on the border. In MultiNet, the topology should be all right, so there will never be three areas.

 

 

So, the list resulting of the Overlayer will contain 2 elements at the most. I now need a way to define which province is on the left and which province is on the right, according to the direction of the line. 

 

 

I can't find any existing transformers doing this, but I hope I'm missing out on this one. Any ideas?

 

 

 

best regards, 

 

Jelle

7 replies

Badge +11
I did not find this on my own, but what I will try is to use the OffsetCurveGenerator for those objects where there are two areas and rerun the LineOnArea Overlayer for these objects. Let's see how far this gets me.
Userlevel 4
Badge +13
Hi,

 

 

How about the LeftRightSpatialCalculator transformer?

 

 

Itay
Userlevel 2
Badge +17
Hi Jelle,

 

 

I agree with Itay, the LeftRightSpatialCalculator can be used to test a polygon or point is located in which side of a line.

 

Be aware that the transformer doesn't define the location when the candidate polygon touches with the base line. I would replace the polygon with its inside point before testing using the InsidePointReplacer.

 

 

Takashi
Badge +11
Hi Itay and Takashi, 

 

 

thanks for the help. I'll give it a try. As always, the implementation itself won't be the most difficult part. Knowing the existence of a transformer is the toughest.

 

 

 

best regards, 

 

Jelle

 

 

Badge +3
u could check wether coordinates of the objects, ie insidepoint, are west/east oriented (a sorter ont related objects will do i think).

 

Badge +1
I have spent a day on this problem already. The approach that I took was to add offset midpoints on each line, tag them left and right and then do a pointOnpolygon Overlay and relate the results back. It is all a bit involved because I am having trouble with updating the fields afterwards. Using the centre of the polygon is too far away for reliable offsets.
Badge +11
In the end, I was able to solve this with a LineOnAreaOverlay. I knew either the left or the right side of the original line objet. The empty side, I could fill in with the other value, resulting from the overlay.

 

It is unclear to me what you mean with the troubles for updating the fields. The PointOnArea overlay should add the area attributes to the point. Why would you need the centre of the polygon?

 

 

Reply