Solved

Fixing street names all in lower case

  • 24 April 2024
  • 2 replies
  • 30 views

Userlevel 1
Badge +7

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

 

icon

Best answer by nielsgerrits 24 April 2024, 12:51

View original

2 replies

Userlevel 6
Badge +33

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.

Badge +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)

 

Reply