Skip to main content
Solved

Fixing street names all in lower case


scarter
Contributor
Forum|alt.badge.img+10

Hello Forum,

 

I have an externally supplied dataset which includes a street name. Some of the street name entries are all in lower case (e.g.: royal road) where it should be Royal Road. However some entries are fine.

This is part of a larger regular data process, so I’d like to build in a process that fixes street names to proper upper/lower case (e.g.: royal road would become Royal Road).

 

Is this possible in FME Form?

 

 

Thanks,

Stuart

 

Best answer by nielsgerrits

One way to do this is to use the StringCaseChanger set to Full Title Case.

Or use the function

@FullTitleCase(@Value(Street_name))

in an AttributeCreator.

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

2 replies

nielsgerrits
VIP
Forum|alt.badge.img+54
  • Best Answer
  • April 24, 2024

One way to do this is to use the StringCaseChanger set to Full Title Case.

Or use the function

@FullTitleCase(@Value(Street_name))

in an AttributeCreator.


patrick.gress
Contributor
Forum|alt.badge.img+3

You could use a python caller, too:

 

    def input(self, feature: fmeobjects.FMEFeature):
        street = feature.getAttribute('street')
        street_fix = ' '.join(map(str.capitalize, street.split(' ')))
        feature.setAttribute('street', street_fix)
        self.pyoutput(feature)

 


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