Skip to main content
Solved

Create lines from attribute data with loop


freddie_kwak
Forum|alt.badge.img

Hello,

 

My name is Fred from the Netherlands and i have a problem creating lines from attribute values. I hope somebody can help me!

In the attached file beschoeiing.xlsx you can see the RD-coordinates (dutch EPSG:28992) of line objects in 3 different columns:

Option 1: rds coordinaten X- and Y-coordinate cobined in one feature

 

Option 2.1: rds X: only X-coordinate in a feature

 

Option 2.2: rds Y: only Y-coordinate in a feature

 

(use option 1 or combine option 2.1 and 2.2)

I want to create line objects from this data. I think i have to loop through the coordinates, but i do not know how to do that. After looping i need to make geometry (lines). I want the features "naam", "nummer" and "object id" from the excel file attached to the line-geometry.

Can somebody help me please?

Kind regards,

 

Fred

 

PS1: (i'm not completely new to FME, but i'm not (yet) a super-user)

 

PS2: i hope you understand my english ;-)

Best answer by ebygomm

You shouldn't need to loop anything.

There are many ways you could build geometries from your sample data e.g.

1. Split the coordinate list with an attribute splitter at the ; then explode this list, split again at the comma, use the resulting attributes to create points and then connect with a linebuilder

2. Manipulate the string to look like wkt and build with that

create-lines.fmwt

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

2 replies

ebygomm
Influencer
Forum|alt.badge.img+39
  • Influencer
  • Best Answer
  • August 7, 2018

You shouldn't need to loop anything.

There are many ways you could build geometries from your sample data e.g.

1. Split the coordinate list with an attribute splitter at the ; then explode this list, split again at the comma, use the resulting attributes to create points and then connect with a linebuilder

2. Manipulate the string to look like wkt and build with that

create-lines.fmwt


freddie_kwak
Forum|alt.badge.img

Thank you verry much Elizabeth for your help and answer! It's verry helpfull!


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