On 06/10/10 14:03, Mark Goodge wrote:
I'm currently building an application which will need to use reverse
geocoding - that is, starting with geographic location data and/or
postcodes and returning a human-readable placename. There are several
ways of doing that, via both downloadable datasets of APIs, but none of
them seem to address a particular issue I have, which is that I need to
know the type of location and return the appropriate level of placename.
That is, for locations in rural areas and villages, I want the village
or hamlet name, but for locations in towns or cities I want the
town/city name rather than the district within it.

I'm currently working on something similar which will effectively be an API which makes a call to Mapit (either the MySociety one or a local install) and then adds place name data.

For example, for M13 9PL you might get back:

[mapit data]
placename: { area: "Manchester", country: "England" }

The place name data is pulled from a database which has columns like this:

Postcode Regex | Area       | Country
-------------------------------------
M13 *          | Manchester | England

The hard part is populating the place name database - I'm aiming to scrape wikipedia for the post towns to begin with and then gradually refine the results over time.

Paul

--
Paul Waring
http://www.pwaring.com

_______________________________________________
Mailing list [email protected]
Archive, settings, or unsubscribe:
https://secure.mysociety.org/admin/lists/mailman/listinfo/developers-public

Reply via email to