Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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 ?

share|improve this question
add comment

2 Answers 2

up vote 2 down vote accepted

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

share|improve this answer
    
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 ?? –  Nik Sep 30 '12 at 17:08
1  
An AttributeCopier transformer before you start reprojecting should do the trick. –  Raven Sep 30 '12 at 19:15
add comment

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.

share|improve this answer
    
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. –  Nik Sep 29 '12 at 17:09
    
True, but you get the other 4 from bounds extractor –  U2ros Sep 29 '12 at 17:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.