Skip to main content
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
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.
Hi,

 

 

How about the LeftRightSpatialCalculator transformer?

 

 

Itay
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
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

 

 


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

 


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.
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