Skip to main content
Solved

How to generate new line along lines ?


f.kemminje
Contributor
Forum|alt.badge.img+11

@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)

 

Best answer by hkingsbury

f.kemminje wrote:

@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

 

View original
Did this help you find an answer to your question?

4 replies

hkingsbury
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • April 10, 2023

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

image


f.kemminje
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • April 11, 2023
hkingsbury wrote:

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 ?


hkingsbury
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • Best Answer
  • April 11, 2023
f.kemminje wrote:

@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

 


f.kemminje
Contributor
Forum|alt.badge.img+11
  • Author
  • Contributor
  • April 12, 2023
f.kemminje wrote:

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


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