Create lines from Coordinates stored in a Table
+1
I have table that contains records with among other things a Origin X, Origin Y, Destination x, and Destination y, values as separate fields. I would like to take this information and create line feature for each record from this data. Is there a transformer that can do this or do I need to combine the Origin and Destination fields into a single X and Y coordinate first?
Hi Chris,
one way could be by using a 2DPointReplacer on OriginX / OriginY, followed by a 2DPointAdder on DestinationX / DestinationY. This should give you a line connecting the two coordinate pairs.
If you need to join these line segments too, take a look at the LineJoiner (hint: your input needs to be sorted first).
David
Reply
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.