Skip to main content
Solved

Is it possible to assign different attributes from different csv files to the same attribute for further processing?


Forum|alt.badge.img

I want to read different csv files that includes coordinates and do some calculation with this coordinates. The attribute names differer from file to file: x, y or a, b or lon, lat ... The calculation is the same for all input files. I have created internal names for the coordinates like wgs84_lon and wgs84_lat. I want to create parameters to let the user assign which attributes in the source csv includes the values for wgs84_lon and wgs84_lat like

x >>> wgs84_lon

y >>> wgs84_lat

I have used an dynamic csv reader and tried to use the AttributeCreator and publish some of its parameters but this did not work for me :-(

I am looking for a solution that works with FME Desktop and FME Server.

Can anybody help me?

Best answer by ebygomm

Take a look at the AttributeDereferencer, this will let you take a user parameter specifying the attribute containing the coordinate and assign it to your internal name

View original
Did this help you find an answer to your question?

3 replies

ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • Best Answer
  • July 23, 2020

Take a look at the AttributeDereferencer, this will let you take a user parameter specifying the attribute containing the coordinate and assign it to your internal name


Forum|alt.badge.img
  • Author
  • July 24, 2020
ebygomm wrote:

Take a look at the AttributeDereferencer, this will let you take a user parameter specifying the attribute containing the coordinate and assign it to your internal name

Thank you for this - works like a charm... Never heard of this transformer before...


takashi
Influencer
  • July 24, 2020

Hi @frank, the AttributeCreator with this setting assigns the value of attribute whose name is specified through a User Parameter (Text) e.g. LATITUDE_ATTR.

Alternatively the AttributeRenamer with this setting renames specified attribute to your desired name. However, the AttributeRenamer won't expose the output attribute names - wgs84_lat, wgs84_lon in this case, so you will have to expose them with a subsequent AttributeExposer if necessary.

Since the Input Attribute column doesn't have option to select a User Parameter, you need to type the parameter name "$(parameter name)" manually. This usage might be a kind of hack...

 


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