[OSM-talk] Postcode searches in Namefinder
David Earl
david at frankieandshadow.com
Sun Nov 30 19:00:42 GMT 2008
I've implemented some changes to the experimental UK postcode searches
in the Namefinder.
And for everyone I also made it ignore leading and trailing numbers in
the first search term, so searching for "31 Hinton Road, Fulbourn" or
"Via Giordano 14, Milano" will still get a hit even though you quoted
the number (which is ignored - in the longer term, I propose to process
these with respect to the Karlsruhe schema for house numbers)
It's not the full address parsing I mentioned recently, but it is one
small step in making things a bit more flexible.
Postcode changes:
1. you can now search for UK postcode prefixes, e.g. CB21. These are
just OSM nodes.
2. You can qualify your search with a postcode or postcode prefix or a
place name in combination with this, e.g.
The Bakers Arms, CB21
The Bakers Arms, Fulbourn CB21
The Bakers Arms, Fulbourn, CB21
The Bakers Arms, CB21 5DZ
The Bakers Arms, Fulbourn CB21 5DZ
The Bakers Arms, Fulbourn, CB21 5DZ
In the latter three cases the last part of the postcode is ignored. For
historical cultural reasons, this is more likely to be used naturally by
Londoners, as in "Cadogan Square, London SW1" or just "Cadogan Square,
SW1" (You still need the comma for the time being). A postcode (prefix)
on its own acts as if it were a place name, and with a place name acts
as if it were in the is_in, and the place has to be within 60km of the
postcode - the largest postcode area in Caithness is about that big (you
did know that if you put a third term it looks in the is_in - as in "The
Bakers Arms, Fulbourn, UK"? Commas required there).
3. Full postcode searches (i.e. searching just for "CB21 5DZ") won't
produce wild results any more hopefully. It's still possible the
postcode may not get a comprehensible address to search for, but once it
does it shouldn't give you a result elsewhere in the world. (Previously
it might have determined that the postcode was Foo Street, Barton, but
then located a Barton somewhere else in the world which also happened to
have a Foo Street within searching distance of it and return that
instead. Because it now qualifies the search with the postocde prefix as
above, it has to find the closest instance of the street to that
postcode area centroid).
4. You only get one result back for a full postcode search. Previously
you could get extraneous alternatives elsewhere also listed.
Problems to trac as usual please.
David
More information about the talk
mailing list