<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Largest 10 cities algorithm"]]></title>
		<link>http://forum.geonames.org/gforum/posts/list/4.page</link>
		<description><![CDATA[Latest messages posted in the topic "Largest 10 cities algorithm"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Largest 10 cities algorithm</title>
				<description><![CDATA[ Hello,

When browsing largest cities though the web interface, 10 largest cities in the rectangle are shown.

Could you please hint an algorithm for querying 10 "largest" items from a rectangle? Is this some kind of R-Tree modification?

Thanks.]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1055.page#4638</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1055.page#4638</link>
				<pubDate><![CDATA[Wed, 10 Sep 2008 22:20:57]]> GMT</pubDate>
				<author><![CDATA[ Kpoxman]]></author>
			</item>
			<item>
				<title>Re:Largest 10 cities algorithm</title>
				<description><![CDATA[ The rectangle index is handled by the database. Just use a spatially enabled database like postgres.


Marc]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1055.page#4642</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1055.page#4642</link>
				<pubDate><![CDATA[Thu, 11 Sep 2008 07:19:03]]> GMT</pubDate>
				<author><![CDATA[ marc]]></author>
			</item>
			<item>
				<title>Re:Largest 10 cities algorithm</title>
				<description><![CDATA[ Rectangle index is not a problem. It can be just an R-Tree (GiST) or, as you said, using spatial extentions (for example, PostGis for Postrges).

But rectangle index does not bring an effective solution for for querying 10 largest cities from a rectangle.

Obviously, something like

SELECT * FROM cities WHERE coordinates INSIDE (alt1, lng1, alt2, lng2) ORDER BY population LIMIT 10;

is far from optimal even if INSIDE relation is handled by spatial index.]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1055.page#4672</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1055.page#4672</link>
				<pubDate><![CDATA[Sat, 13 Sep 2008 22:14:27]]> GMT</pubDate>
				<author><![CDATA[ Kpoxman]]></author>
			</item>
	</channel>
</rss>