Solved

Extracting XYZ for linestring and writing to excel

  • 12 November 2015
  • 9 replies
  • 3 views

Badge
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, )
icon

Best answer by vijai 17 November 2015, 14:17

View original

9 replies

Userlevel 4
Hi

 

 

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

 

 

David
Badge +7
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.
Userlevel 2
Badge +17
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
Badge
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

 

Userlevel 4
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?

Userlevel 4
Badge +25
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

Badge

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

Userlevel 4

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.

Badge
Thanks friends,

 

 

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

 

 

Vijai

 

Reply