Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have a field of street names in all caps. Some of the names begin with numbers i.e. 9TH ST. I need to put the names into proper case. I've tried various versions of code but they haven't worked. I think it's getting tripped up on the leading number thing. I assume I need code that will check for a number and skip over it if it finds one and then continue with case changes, but I don't know how to write it. Any ideas would be appreciated.

share|improve this question
2  
Hi Don-- What kind of code can you use? Also, there different ideas of "proper" casing; what's yours? ie. 9th St or 9th ST... How about MLK St, MacArthur Blvd... de la Cruz Blvd or De La Cruz Blvd. It can get complicated :-) –  andytilia Sep 26 '12 at 16:35
3  
what GIS software are you using? What coding language are you using or hoping to use? –  RyanDalton Sep 26 '12 at 18:52
add comment

1 Answer 1

If you like Python, how about the titlecase module? http://muffinresearch.co.uk/archives/2008/05/27/titlecasepy-titlecase-in-python/

It's decent, and works for English. Of course there will always be exceptions or gray areas (see my comment under the question above).

share|improve this answer
    
I'm using ArcMap 10. I need Python or VB script. I've tried .title() and it chokes. I'm just looking to upper case the first letter of each word or abbreviation i.e. 9th St or N Dakota St Thanks. –  Don Sep 27 '12 at 13:05
    
How did .title() choke? –  andytilia Sep 27 '12 at 13:20
    
OK. I got .title() to work this morning. Not sure what i did differently this time. Thanks. –  Don Sep 27 '12 at 13:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.