[OSM-dev] extracting house-number from string
Udo Giacomozzi
udo.osm at nova-sys.net
Tue Mar 17 13:22:44 GMT 2009
Hello Stefan,
Tuesday, March 17, 2009, 1:51:36 PM, you wrote:
SB> "1st street 1234"
SB> Street = 1st street
SB> houseno = 1234
SB> I didn't see how the algo would prefer 1234 over 1st because both are numbers...
Well, you could give the last number precedence.
Or do you have an example where the house number is at the beginning and the
string ends with another number?
Either way, in a situation where you have two possibilities (either "1234"
is the house number or "1ST") it shouldn't be a problem to try both
addresses (ie. lookup in database). Seems rather simple to me.
By the way, is the input field for the city a different one, or can
the user put country + city + street + house number all in one string?
For example, Google understands this one:
Via 4 Novembre 2, 25010 Limone sul Garda, Brescia, Lombardia, Italia
It also works omitting the "Via" (Italian for "Street"):
4 Novembre 2, 25010 Limone sul Garda, Brescia, Lombardia, Italia
This means:
(Via) 4 Novembre <-- street name
25010 <-- ZIP code
Limone sul Garda <-- city
Brescia <-- province
Lombardia <-- region
Italia <-- guess what.. ;-)
Udo
More information about the dev
mailing list