Skip to main content
Question

Parsing attribute values


I have a workspace that compares a PATH HIERARCHY data set attribute of video file names to a GeoMedia Feature data set attribute of sewer segment names and does a feature merger on the two datasets when there is a match.  Sewers are usually videod from upstream to downstream and the video files are named according to the direction in which the camera was travelling.  My workspace gets quite a few matches BUT...there are occasions where the videos are named from downstream to upstream which causes my feature merger to send that video name to the incomplete branch.  I would like to parse the video name attribute and use the result to create a new attribute that is the reverse.  So 'MH07-121 to MH07-122' would become 'MH07-122 to MH07-121' in the new attribute.   Could someone please suggest an approach that would accomplish this for me?   Thanks.

3 replies

fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • May 16, 2013
Hi,

 

 

I would parse the attribute value with a regular expression = string searcher and reconcatenate the matching parts (string concatenator) to form the new value.

 

 

Hope this helps.

fmelizard
Safer
Forum|alt.badge.img+18
  • Safer
  • May 16, 2013
As always there are more than one way to do things in FME, so if you value is separated by ' to' you can use that as the delimeter value in the attribute splitter   and then reconcatenate the list values. 

takashi
Influencer
  • May 19, 2013
Yes, there should be some approaches.

 

I would use StringSearcher, Tester and StringReplacer.

 

 

Takashi

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