Sort order of numbered streets?

I was recently striding in St. Pete Beach, FL, where there are a lot of numbered streets, starting at the south end with “1st Ave” and going north up to about “90th Ave”.

I noticed that the first street listed for St. Pete is not “1st Ave”, it’s “10th Ave”. The list continues to “19th Ave”, then “1st Avenue”, then “1st Palm Point Street”. Then, after all the "1"s, come the "20"s, after the "20"s, comes the "2"s, then the "30"s, then the "3s, and so one.

I could probably find my “programmer’s hat” somewhere, and speculate on the sort… But I really thought @JamesChevalier might like to see a new post without the word “missing” in the subject. :slight_smile:

I suspect it has to do with the ASCII value of the characters in the street name string, not the numerical value of the the street number 0x31 0x30 (“10”) comes before 0x31 0x73 (“1s”).

Anyway, as I was planning my next trip to SPB (74.25% of 167 streets), I was reminded of this, and thought I would post. Next trip I should have my first completed city.

Thank you, Eric

PS, sorry if you saw before the edit, I forgot the “monkey” (I used to work with a Polish team, and that’s what they say for @, instead of “at”), and I picked it up. The actual word they used was “malpa”, Polish for monkey.

1 Like

Bumping with screenshots

‘1 Alley’ being the last listed for 1s & ‘15th Street’ jumping the line

‘2 Alley’ & ‘3 Alley’ not being sequentially next to each other

1 Like

It looks like numbers are sorted prior to spaces.


It looks like it’d be possible to change this (some examples of how in here), but I have no interest in adding that complexity while a simple .order(:name) gets us close enough.


Computer scientists would have named this “02 Alley”. :slight_smile:


Computer Scientists would have named it 01 Alley, and started the numbering of alleys at 00.