The levels being approximately
Country
county/state
Unitary authority
town
Or a similarly recognisable structure across countries. Once the town
is selected, the user can zoom into the correct area.
Would Geonames be the right database to use for this application? If
so, does Geonames somehow associate which town is in which unitary
authority, which unitary authority is in which county/state?
Are there any other databases which may be more suitable for my needs?
It is possible to calculate parish, ward, district, and county/unitary
authority for a location from the census data for the UK (England+Wales,
Scotland) although the database tables are quite big. You would also need
to check the licensing requirements to see whether you would be able to
use the data free or for a fee.
I don't know of anything that does the whole world.
Anthony
--
www.fonant.com - Quality web sites
Hierarchy goes down to streetlevel in US
and gives reasonable results for other countries.
--
noiv
Noiv, I am aware that the geonames dataset gives a point location for
county/state unitary authority and town. I am asking if the dataset has
more than just a mapping of name->LatLon.
Does it have references to each 'parent' area so I can create a
heirachy as below?
UK
|--Cheshire
|--Cumbria
|--London
|--|
| ----Brent
| ----Camden
| ----Hillingdon
| ----|
| ------Cowley
| ------Hayes
| ------Ickenham
| ------Uxbridge
|--Kent
|--|
|----Ashford
|----Bromley
|----|
|------Chiselhurst
|------Hayes
|------Petts Wood
|----Maidstone
Geonames does have the link for many countries (mainly the data is
sourced from the GNS database which includes the administrative
divisions for locations)
eg:http://ws.geonames.org/hierarchy?geonameId=1
also this data is available in the downloads section.
However notably the county divisions for UK are missing, both on the
problem of finding a 'open' data set to use (as its missing in GNS),
and also exactly what 'vintage' of counties to use
(historical/ceremonial/administrative etc)
Hope that helps,
Barry
- www.nearby.org.uk - www.geograph.org.uk - www.trigtools.co.uk -
Being a user of geonames, and a member of this list, I'm aware of that ;)
I assumed that, since you asked about "unitary authorities" you wanted UK
data. As far as I can tell geonames does not have this info, but the UK
census data does (I use it to good effect). The UK census output areas
have detailed polygons, and you are allowed to use the data for "back
office" work for no fee: roughly speaking this seems to mean that you can
use it to process your own data, but you can't make the data available to
anyone else (such as by displaying the polygons on a map).
I don't know whether you could use the census data to generate a hierarchy
and then make that generally available. Being a less detailed output it
might be allowable: none of the original Ordnance Survey data of the
output area polygons would be available. But IANAL, and even less an
expert on copyright and crown copyright.
Cheers!
Do you have a pointer to the UK census polygons? So we can check their
licence and possibly use it to enrich the geonames data set.
Cheers
Marc
Antony,
Do you have a pointer to the UK census polygons? So we can check their
licence and possibly use it to enrich the geonames data set.
Cheers
I am using the output area polygons to convert a geographical point into
its highways authority, and parish, for reporting hazards and obstructions
for cyclists. Since I am only using the polygon data for "internal
business use" it was considered covered by the "click-use" license [1] and
the OS "Standard Licensed Use" [2], by the powers that be. I suppose you
could, in theory, do millions of queries, and hence reconstruct the
polygons, but it practice this wouldn't be possible.
This may mean that geonames could use the data to construct the hierarchy
of placename/county/region for the UK using the data, as indeed I could.
Reverse-engineering the hierarchy to get the output area polygons would
not be possible with any accuracy.
[1] http://www.opsi.gov.uk/click-use/psi-licence-information/index.htm
[2] http://www.statistics.gov.uk/census2001/pdfs/OS_OA_License.pdf
For example, I know Lewisham is a 3-constituency local authority with
21 wards, and I know what those constituencies and wards are. I also
know Shooters Hill is a ward of little particular interest, and
probably in the borough of Bexleyheath, yet Lewisham (pop 220,000) is
classified as PPLX like Shooters Hill (pop ~6000), whilst the London
Borough of Lambeth (which is equivalent to Lewisham) is classified as
PPLA along with Liverpool. Some really serious mismatch in
classification terms.
A solution could be to use an openstreetmap-like wiki approach and a
global XML bookmark which everyone shares. Users can add, edit, remove
or update the bookmark based on a list of place names from OpenGeodata.
This way, we can have a consensus on the heirachy. Allowing users to
build the structure almost from the ground-up.
Given the current classification is fairly random, we'd probably want a
new database which reflects the manually entered heirachy different
places are given on the bookmark.
A query for
level1=GB returns all counties including London and Rutland perhaps
with a lat/lon in the county.
A query level1=GB&Level2=London
Hopefully returns all London boroughs perhaps with a lat/lon in each
borough
level1=GB&level2=London&level3=Lewisham
hopefully returns all towns in Lewisham along with a lat/lon in each
town.
I could use this as a basis for a bookmark, and in each bookmark,
direct users to a geonames page to enter a new place in the parent
bookmark.
If someone wanted to enter a new borough in London, they'd do
http://www.geonames.org/update.pl?level1=GB&level2=London&update=true
Where they could select any location in the GB geonames database then
add it to the London bookmark.
To add a town to Lewisham;
http://www.geonames.org/update.pl?level1=GB&level2=London&level3=Lewisham&update=true
http://www.geonames.org/export/geonames-search.html
> If someone wanted to enter a new borough in London, they'd do
> http://www.geonames.org/update.pl?level1=GB&level2=London&update=true
A web services to programmatically update and insert places into the
geonames database already exist, though undocumented and not yet
officially released. Manual inserts and edits are possible with the
wiki-interface.
Cheers
Marc