Solved

Create lines from attribute data with loop

  • 7 August 2018
  • 2 replies
  • 9 views

Badge

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

icon

Best answer by ebygomm 7 August 2018, 17:53

View original

2 replies

Userlevel 1
Badge +10

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

Badge

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

Reply