Skip to main content
Solved

Extracting XYZ for linestring and writing to excel

  • November 12, 2015
  • 9 replies
  • 75 views

Forum|alt.badge.img
Kindly need help to extract XYZ for each vertex of linestring (CAD) to a excel file along with the attributes (layer name, first point, end point, color, )

Best answer by vijai

Hello ,

 

 

Thanks for your suggestions, I could reach more than half way of my required output.

 

I ended in extracting vertex coordinates attributes for each line string with unique ID, I still need to give ID for first and last vertex for each line string . Any more suggestions??

 

 

Thanks

 

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.

9 replies

david_r
Celebrity
  • November 12, 2015
Hi

 

 

You can use the VertexExtractor from the FME Store, it will convert a polyline into points, preserving all the input attributes.

 

 

David

roland.martin
Contributor
Forum|alt.badge.img+11
  • Contributor
  • November 12, 2015
You could also just use a Chopper, set to chop at 1 vertex - this will retain the attributes. Add a CoordinateExtractor to get the coordinate values, and write those out into your spreadsheet.

takashi
Celebrity
  • November 13, 2015
Hi,

 

 

Regarding layer name and color:

 

A format attribute called "fme_feature_type" stores the layer name. You can expose this attribute in the "Format Attributes" tab of the reader feature type properties dialog.

 

For color, see the "fme_color" (pen color) and "fme_fill_color" (fill color), or format specific attributes which store color information. e.g. "igds_color" and "igds_fill_color" for the DGN format.

 

 

If you need to extract only coordinates of first and end points, you can also use two CoordinateExtractors in a series. Set 0 to the Index parameter for the first point, -1 for the end point.

 

 

Takashi

Forum|alt.badge.img
  • Author
  • Best Answer
  • November 17, 2015
Hello ,

 

 

Thanks for your suggestions, I could reach more than half way of my required output.

 

I ended in extracting vertex coordinates attributes for each line string with unique ID, I still need to give ID for first and last vertex for each line string . Any more suggestions??

 

 

Thanks

 


david_r
Celebrity
  • November 17, 2015
Hello ,

 

 

Thanks for your suggestions, I could reach more than half way of my required output.

 

I ended in extracting vertex coordinates attributes for each line string with unique ID, I still need to give ID for first and last vertex for each line string . Any more suggestions??

 

 

Thanks

 

I'm not sure I understand the question, could you please give an example?


mark2atsafe
Safer
Forum|alt.badge.img+59
  • Safer
  • November 17, 2015
Hello ,

 

 

Thanks for your suggestions, I could reach more than half way of my required output.

 

I ended in extracting vertex coordinates attributes for each line string with unique ID, I still need to give ID for first and last vertex for each line string . Any more suggestions??

 

 

Thanks

 

I wonder if this question provides the solution?

https://knowledge.safe.com/questions/19945/database-schema-to-custom-writer-format-ev-extensi.html


Forum|alt.badge.img
  • Author
  • November 18, 2015

I'm not sure I understand the question, could you please give an example?

vertex-id-placer.jpg

David,

Hope the above image explains my need, I did some workout , but could not get a result just like above

Regards

Vijai


david_r
Celebrity
  • November 18, 2015

vertex-id-placer.jpg

David,

Hope the above image explains my need, I did some workout , but could not get a result just like above

Regards

Vijai

Try inserting a CoordinateCounter before the VertexExtractor. After the VertexExtractor, if _vertex_number = 0 then it's your first coordinate. If _vertex_number = (_coordcount -1) then it's your last coordinate. You can then set the text for the UID column accordingly.

Hope this helps.


Forum|alt.badge.img
  • Author
  • November 22, 2015
Thanks friends,

 

 

I found the way to extract the Vertex (first, last, mid) for a line string with UID and other attributes.

 

 

Vijai