Skip to main content

Working with crossborder maps that get their data from two different datasets. 

There are many ways to approach this, and I am toying with the idea to convert the attributes and their values from dataset A to the standard of dataset B. The benefit would be easier downstream processing. 

A simple example:

Dataset A: attribute ‘Lakes’, value ‘yes’

Dataset B: attribute ‘water’, value ‘1’

Then do some FME-magic to convert everything from A to the standard of B, ie ‘lakes’ → ‘water’ and ‘yes’ → ‘1’

I imagine that the only reasonably fast way to set this up  would be by utilizing an external lookup table, csv or similar. How would one go about to change both the attribute and values from an external lookup table? I would like to keep it dynamic and easily editable, so preferably avoiding the AttributeValueMapper. 

Have you looked into the SchemaMapper?


Have you looked into the SchemaMapper?

Yes, but only by reading the documentation, I have never used this transformer. As I understand it can be used to remap the attribute names, but I would need some other method to change the values?


It is also possible to change AttributeValues based on some values.

Be aware that the new Attributes might not be exposed and the old attributes are shown as Missing after the transformer, this is normal behavior.

 

Take a look at the Filters part of this page:

https://docs.safe.com/fme/html/FME-Form-Documentation/FME-Transformers/Transformers/schemamapper.htm

 

In your case it would be:

WaterAttribute | OldWaterValue | NewWaterValue

lakes | yes | 1

And then use this to create a Filter with the SchemaMapper.

 

But we normaly do all conversion with the other tools:

TestFilter to filter the Lakes

AttributeRenamer to rename Lakes to water

AttributeValueMapper to map 1 to yes or yes to 1

 

Way more intuitive than the SchemaMapper.

 


Reply