Skip to main content

Hi!

I am reading OSM data in the .osm format and trying to write out selected key-value pairs based on the key name.

The key value pairs are in two lists: tag().k and tag(),v. I would like to extract all the keys which equal "name" from tag().k and write the associated values from tag().v to a name attribute.

I am having difficulty figuring out the best (or any) way to do this. I would like to accomplish this task just using the existing transformers if possible.

Thank you!

Just a little clarification. The tags that I am looking for are not always in the same index position. Also, I would like to leave the "name" attribute blank if there is not key for "name."


While the tag().k and tag().v exist, you will also find the "name" attribute exist anyway. So you don't need to work with the list of key and values. For example the tag{3}.k = name tag{3}.v = Malibu State Creek Park

but FME also creates attribute name = Malibu State Creek Park


While the tag().k and tag().v exist, you will also find the "name" attribute exist anyway. So you don't need to work with the list of key and values. For example the tag{3}.k = name tag{3}.v = Malibu State Creek Park

but FME also creates attribute name = Malibu State Creek Park

Thank you!! Should have seen this.


Reply