Skip to main content

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?

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


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...


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...

 


Reply