Skip to main content
Solved

Extracting XYZ for linestring and writing to excel

  • November 12, 2015
  • 9 replies
  • 44 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

 

View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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
Evangelist
  • 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
Forum|alt.badge.img+9
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
Contributor
Forum|alt.badge.img+19
  • Contributor
  • 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
Evangelist
  • November 17, 2015
vijai wrote:
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+43
  • Safer
  • November 17, 2015
vijai wrote:
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
david_r wrote:

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
Evangelist
  • November 18, 2015
vijai wrote:

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

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings