<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Browsable city names, grouped by sub divisions?"]]></title>
		<link>http://forum.geonames.org/gforum/posts/list/4.page</link>
		<description><![CDATA[Latest messages posted in the topic "Browsable city names, grouped by sub divisions?"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Browsable city names, grouped by sub divisions?</title>
				<description><![CDATA[ I want to be able to make a browsable list of cities, grouped together by their relevant administrative divisions, where applicable. I also want to make it so that the URL can represent a logical grouping. For example:

/ca
/usa
/uk
/ca/ontario/
/ca/ontario/ottawa
/uk/devon/seaton

Each time the user types in a component to the path he would be presented with the appropriate children. When appropriate I mean in some cases the children of a country are 'admin1', such as for the USA and Canada and in other cases, such as the UK it would be 'admin2'. The idea is to be able to generate something equivalent to the display seen as Kijiji (http://www.kijiji.com/), but automatically.

So far I have written code to do some of this, but I don't yet have any suitable logic for deciding what users expect to see as a geoname grouping. I might simply define a configuration file that would show the order. For example:

Canada=CC/ADMIN1/CITY
UK=CC/ADMIN2/CITY
USA=CC/ADMIN1/CITY

Does anyone have any suggestions as to the best way to go about implementing what I am wanting to do?

I could probably cheat and simply add the Geoname id at the end, but I would like to see if there is a good way of representing the tree as a path. 

Additionally, is there any easy way to  find the children/parent of a given entry? I don't see any appropriate fields, so imagine I would need to asume country -> adm1 -> adm2 -> adm3 -> city?]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1380.page#5781</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1380.page#5781</link>
				<pubDate><![CDATA[Sun, 26 Apr 2009 20:57:09]]> GMT</pubDate>
				<author><![CDATA[ ajmas]]></author>
			</item>
			<item>
				<title>Re:Browsable city names, grouped by sub divisions?</title>
				<description><![CDATA[ there is no general rule how to do this. It depends on the number of cities you want to display for each region. In any case don't forget that place names are not unique and the url built with the name is not necessarily unique, it may also change over time.

Best

Marc]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1380.page#5793</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1380.page#5793</link>
				<pubDate><![CDATA[Mon, 27 Apr 2009 20:46:40]]> GMT</pubDate>
				<author><![CDATA[ marc]]></author>
			</item>
	</channel>
</rss>