Skip to main content

Hallo fme-community i hope you can help me again. I working for an template which should generate a OpenDRIVE structure. I take the data of streets from OSM and wanna try to fill some information into my structure. The workflow is like

.

I have just rly much questions because i have rly hard problems with fme to work as i want (first try with it). My template looks like

 

And in this template i wanna try to change my subtemplate "GEOMETRY" to calculate the length and some other attributes from one note to the next one.

The problem is i just give my template the lanes as you can see in the workflow that i give my subtemplate 3 lines. And if i run this i get this as result.

My first question is now how can i split this 3 incoming lines up in 3 roads that i get the first 3 nodes in the first road (marked as 1) and the next 4 nodes into the next road (marked as 2) and so on. I tried it with an if sentence but it doesn't works so i deleted it. The split between the roads work but not that i put just the nodes from the first line into the first road, he put me every node from all 3 lanes into every road.

 

I hope i described my problem as you understand it. I need rly help i tried to solve this but nothing works.

Thanks for your time!

If the number of input features to the GEOMETRY port was three and you need to surround the elements generated from the features by three parent elements for each feature, try surrounding the expression by the parent tag, as in:

<parent>{
    expression that generates <geometry> elements
}</parent>

If the number of input features to the GEOMETRY port was three and you need to surround the elements generated from the features by three parent elements for each feature, try surrounding the expression by the parent tag, as in:

<parent>{
    expression that generates <geometry> elements
}</parent>

Now it looks like:

0684Q00000ArMK5QAN.png

but i want not to group the first 3 and the next 4 i want that the <road> just have the first "parent" and the next road have the next "parent". Now its the same as before just grouped by single lane-nodes. Or is my implementation false ?

 

<parent>{
    
let $x := fme:get-list-attribute("_indices{}.x")
let $y := fme:get-list-attribute("_indices{}.y")

for $i in (1 to {fme:get-attribute("size_points")})
return
    <geometry s="{fme:get-attribute("s")}" x="{$x($i]}" y="{$yg$i]}" hdg="@atan2(@YValue(),@XValue())" length="{fme:get-attribute("_length")}" > <line/> </geometry>
 }</parent>

Reply