Skip to main content
Question

Line on Area Overlayer: left and right

  • September 13, 2013
  • 7 replies
  • 54 views

jelle
Contributor
Forum|alt.badge.img+16
  • Contributor
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

jelle
Contributor
Forum|alt.badge.img+16
  • Author
  • Contributor
  • September 13, 2013
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.

fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • September 13, 2013
Hi,

 

 

How about the LeftRightSpatialCalculator transformer?

 

 

Itay

takashi
Influencer
  • September 13, 2013
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

jelle
Contributor
Forum|alt.badge.img+16
  • Author
  • Contributor
  • September 16, 2013
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

 

 


gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • September 16, 2013
u could check wether coordinates of the objects, ie insidepoint, are west/east oriented (a sorter ont related objects will do i think).

 


kimo
Contributor
Forum|alt.badge.img+10
  • Contributor
  • February 27, 2014
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.

jelle
Contributor
Forum|alt.badge.img+16
  • Author
  • Contributor
  • February 27, 2014
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?

 

 


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