1

I have an .csv coordinate file with the following header

num xc yc xmin ymin xmax ymax

I want to tranform the x/y coordinates on each line of this file to lat / long (LL84)

I am using the following workspace

enter image description here

The output file is a csv file with the lat/long. The problem I have is FME writing the lat/long to the output file in a different line for each pair of coordinates xc/yc , xmin/ymin, xmax/ymax and not in the same line as it is in the input csv. So the results look something like this,

enter image description here

Is it possible to get it to work or I have to output three different csv files and merge them ?

asked Sep 29, 2012 at 15:37

2 Answers 2

2

Chain three AttributeReprojector transformers together, each operating on a different pair of attributes. No need to use PointAdders or BoundsExtractors.

CSV Reader -> AttrReprojector1 -> AttrReprojector2 -> AttrReprojector3 -> CSV Writer

answered Sep 29, 2012 at 17:44
2
  • excellent. Worked great. In this case initial attribute values are replaced by the reprojected attribute values.If someone wants to keep the initial attribute values (ie the xc/yc,xmin/ymin,/xmax/ymax) coordinates in the initial reference system) as well ?? Commented Sep 30, 2012 at 17:08
  • 1
    An AttributeCopier transformer before you start reprojecting should do the trick. Commented Sep 30, 2012 at 19:15
1

The attribute links are not apparent from your picture, but im guessing you have xmin and xmax from boundextractor2 and ymin and ymax from boundsextractor3. When you split your workflow into 3 branches you are effectively making 3 features from one. I think the only thing you need is 1 2dpoint adder (creates an actual spatial feature) -> reprojector -> bounds_extractor, from which you get all 4 attributes.

answered Sep 29, 2012 at 16:33
2
  • I have xc/yc from BoundExtractor_1, xmin/ymin from BoundExtractor_2 and xmax/ymax from BoundExtractor_3. I have 6 coordinate attributes and 1 identifier (number). Using a 2d point adder doesnt allow me to populate all 6 coordinates to the output file rather one pair of x/y. Commented Sep 29, 2012 at 17:09
  • True, but you get the other 4 from bounds extractor Commented Sep 29, 2012 at 17:20

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.