Heirachical index of places

35 views
Skip to first unread message

Nick

unread,
Dec 2, 2006, 6:12:51 PM12/2/06
to geonames
Hello
I would like to create a heirachical bookmark for the openstreetmap
editor Josm.

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?

Anthony Cartmell

unread,
Dec 3, 2006, 4:30:42 AM12/3/06
to geon...@googlegroups.com
> 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

noiv

unread,
Dec 3, 2006, 6:43:49 AM12/3/06
to geonames
Here you can see what's possible with the geonames dataset:

http://exploreourpla.net/development/labeled-permalinks-for-google-maps-with-geonames-org-ajax-and-xml/#Example

Hierarchy goes down to streetlevel in US
and gives reasonable results for other countries.

--
noiv

Nick

unread,
Dec 3, 2006, 11:39:02 AM12/3/06
to geonames
Anthony, Openstreetmap is an effort to make a free complete map dataset
of the whole world. A UK census dataset wouldn't address the issue I
need, even if the license were permissive.

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

barryhunter

unread,
Dec 3, 2006, 11:52:16 AM12/3/06
to geonames
See this thread:
http://forum.geonames.org/gforum/posts/list/82.page

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 -

Anthony Cartmell

unread,
Dec 3, 2006, 12:17:35 PM12/3/06
to geon...@googlegroups.com
> Anthony, Openstreetmap is an effort to make a free complete map dataset
> of the whole world. A UK census dataset wouldn't address the issue I
> need, even if the license were permissive.

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!

Marc

unread,
Dec 3, 2006, 12:37:46 PM12/3/06
to geon...@googlegroups.com
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

Marc

Barry Hunter

unread,
Dec 3, 2006, 1:12:19 PM12/3/06
to geon...@googlegroups.com
On 03/12/06, Marc <ma...@geonames.org> wrote:

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
 
They almost certainly couldn't be used by geonames, as the datasets are covered by the infamous Crown Copyright.
 
 
However I do have some experience with Super Output Areas, available as CD's including digital boundaries:
 
For these its been confirmed that these couldn't be used directly to classify a online gazetteer, as this would be reprodusing a substantial part of the database. (in the opinion of the people I spoke to at ONS)
 
However it might be possible (never got a clear answer) to use this as long as the resolution (eg only using 1km resolution) was kept low.
 
I have the CD's for all parts of the UK, but haven't undertaken the amount of work required to get counties, and therefore being able to put into practice and demonstrate if it would be legally possible.
 
--

Anthony Cartmell

unread,
Dec 3, 2006, 5:15:52 PM12/3/06
to geon...@googlegroups.com
> For these its been confirmed that these couldn't be used directly to
> classify a online gazetteer, as this would be reprodusing a substantial
> part
> of the database. (in the opinion of the people I spoke to at ONS)
>
> However it might be possible (never got a clear answer) to use this as
> long
> as the resolution (eg only using 1km resolution) was kept low.

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

Nick

unread,
Dec 4, 2006, 12:07:51 PM12/4/06
to geonames
It seems ordinary users could do a lot to help improve the
classification of place names from Geonames. This may even be a
different project as Geonames seems a project to create a flatfile
name->LatLon mapping which in itself is of course useful, but somewhat
different to what I need.

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

Marc

unread,
Dec 4, 2006, 5:18:50 PM12/4/06
to geon...@googlegroups.com
Nick

> Geonames seems a project to create a flatfile
> name->LatLon mapping which in itself is of course useful, but somewhat
> different to what I need.
The flat file contains much more information than just name->latLng and
it is not the only way to access the database, it is just the most
convenient way to load the full data base for most users. Loading an xml
file into a relational data base is a real pain whereas loading a flat
file is a piece of cake.

> 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.
It seems there is an error with the capital feature code for the capital
of the administrative subdivision 'Lewisham'. At the moment Catford is
listed as the capital. Is this wrong?
Geonames is using the FIPS subdivsions for the UK and it is planned to
use the ISO 3166-2 codes :
http://en.wikipedia.org/wiki/ISO_3166-2:GB
> A solution could be to use a ... wiki approach
There is a wiki-style edit interface for geonames.

> This way, we can have a consensus on the heirachy. Allowing users to
> build the structure almost from the ground-up.
I did not yet had the time to look at the links Barry and Anthony have
given. We should use as much official data as possible before
considering other steps.

> A query for
> level1=GB returns all counties including London and Rutland perhaps
> with a lat/lon in the county.
This is already supported :
http://www.geonames.org/search.html?q=adm1&country=GB

> 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.
The web service already supports this, the parameters are called
adminCode1,adminCode2,...

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

Reply all
Reply to author
Forward
0 new messages