Skip to main content
Solved

Create lines from attribute data with loop

  • August 7, 2018
  • 2 replies
  • 42 views

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3429 replies
  • 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
  • Author
  • 3 replies
  • August 14, 2018

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