Solved

How to generate new line along lines ?


Badge +3

@nielsgerrits​  I have a road shape file with numerous segments (links), all of which share the same road id. Now the user has provided me with csv data, claiming that this is the bad route from chainage 0.75 to chainage 5.1. In order to highlight the road, I must add another line geometry (a long line) on top of road features. The created line must overlay eactly on top of road. the created line begins at link 1 (0.75 chainage far)and extends to link 9 at a 5.1 chainage. How do I accomplish this with fme? 

I tried a lot of different things, but none worked. Actual line length and chainage length are two different metrics. We can take the proportionately dividing road length since chainage length is accurate

What I mean is that if the real length of the line is 1.5 km and the start chainage and end chainage (attributes) difference is 1 km, then it becomes 100 m = 150 m in geom length.

 

sample source shape file attached

and source shape ,desired output line, how it looks like( jpg files)

 

icon

Best answer by hkingsbury 11 April 2023, 22:02

View original

4 replies

Userlevel 5
Badge +29

Here's a workbench which i believe achieves what you're after...

image

Badge +3

Here's a workbench which i believe achieves what you're after...

image

@hkingsbury​ Thanks! it is working. it worked in this particular 2 decimals case. if there are 3 decimal values then i need to split the lines like 0.005 ?

Userlevel 5
Badge +29

@hkingsbury​ Thanks! it is working. it worked in this particular 2 decimals case. if there are 3 decimal values then i need to split the lines like 0.005 ?

Heres another version with the constraint set as a parameter

 

Badge +3

@hkingsbury​ Thanks! it is working. it worked in this particular 2 decimals case. if there are 3 decimal values then i need to split the lines like 0.005 ?

Thank you! H Kingsbury.

Reply