1

I have a simple shapefile (point) that has only ID in the attribute table. I can transform shp to csv but this only gets the ID into the CSV file.

What transformer/settings do I need to read the x,y coordinates of each point in the shapefile and pass them to the CSV writer?

asked Oct 31, 2013 at 22:34

1 Answer 1

3

Use the CoordinateExtractor transformer. According to the documentation:

Retrieves the value of the x, y, and z coordinate at the specified index into attributes. A negative index can be used to indicate the position relative to the end of the feature (-1 is the last coordinate, -2 the second last, and so on). The index can be entered as an integer, or may be taken from the value of another attribute by selecting the attribute name from the pull-down list. If the index is invalid, then the translation will be terminated.

If the feature was two-dimensional, then the Z attribute will be given the default value specified.

If the feature was a multi-part feature (aggregate), each part’s coordinates are indexed sequentially.

answered Oct 31, 2013 at 22:40
1
  • Indeed! Thanks. I knew I had forgotten some trivial things after being away from the program a while! Commented Oct 31, 2013 at 22:43

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.