<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "Fetching JSON data via AJAX, how to filter by population?"]]></title>
		<link>http://forum.geonames.org/gforum/posts/list/4.page</link>
		<description><![CDATA[Latest messages posted in the topic "Fetching JSON data via AJAX, how to filter by population?"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Fetching JSON data via AJAX, how to filter by population?</title>
				<description><![CDATA[ Hi!
I am trying to remove all the fcode > PPL that have population=0 (because obviously there's not three Stockholms' in Sweden (the two wrong locations have population = 0).

Here's part the code that fetches the data:

<span class="genmed"><b>Code:</b></span><br>
		<div style="overflow: auto; width: 100%;">
		<pre>$.getJSON&#40;"http://ws.geonames.org/searchJSON?",
			{ 'name': 'stockholm',
			'maxRows': 10,
			'fcode': 'PPL*',
			'population': '0',
			'type': 'json'},</pre>
		</div>

As you see, I am messing around with the population variable. Can it be sent to the geonames service?

Thank you in advance.]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1980.page#8046</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1980.page#8046</link>
				<pubDate><![CDATA[Tue, 13 Jul 2010 18:58:31]]> GMT</pubDate>
				<author><![CDATA[ mattis]]></author>
			</item>
			<item>
				<title>Re:Fetching JSON data via AJAX, how to filter by population?</title>
				<description><![CDATA[ The search service does not support a parameter 'population'.

Why shouldn't there not be three places called 'Stockholm' in Sweden? If the population of a place is unknown then it just means that it is probably a small place it does not mean the place does not exist. This wouldn't make any sense.


Marc]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1980.page#8047</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1980.page#8047</link>
				<pubDate><![CDATA[Tue, 13 Jul 2010 20:37:06]]> GMT</pubDate>
				<author><![CDATA[ marc]]></author>
			</item>
			<item>
				<title>Fetching JSON data via AJAX, how to filter by population?</title>
				<description><![CDATA[ 
Darned. I think you are right. I even looked into a Swedish atlas but it didn't have them. Finally I looked into the Swedish map service Eniro, and yeah, there it is and the coordinates match up pretty well.

Thank you Marc.

Do you know any way that I could filter out only the "real" cities/towns out of the database? ]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1980.page#8048</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1980.page#8048</link>
				<pubDate><![CDATA[Tue, 13 Jul 2010 22:27:45]]> GMT</pubDate>
				<author><![CDATA[ mattis]]></author>
			</item>
			<item>
				<title>Fetching JSON data via AJAX, how to filter by population?</title>
				<description><![CDATA[ <p></p>

		<cite>mattis wrote:</cite><br>
		<blockquote>
Do you know any way that I could filter out only the "real" cities/towns out of the database? &nbsp;
		</blockquote>

You may have a look to the dump directory :
http://download.geonames.org/export/dump/

especially those files :
- cities1000.zip : all cities with a population > 1000 (ca 80.000)
- cities5000.zip : all cities with a population > 5000 (ca 40.000)
- cities15000.zip : all cities with a population > 15000 (ca 20.000)

You may also use search webservice, then filter result to keep only places with population > n]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1980.page#8052</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1980.page#8052</link>
				<pubDate><![CDATA[Wed, 14 Jul 2010 10:20:21]]> GMT</pubDate>
				<author><![CDATA[ geotree]]></author>
			</item>
			<item>
				<title>Fetching JSON data via AJAX, how to filter by population?</title>
				<description><![CDATA[ <p></p>

		<cite>geotree wrote:</cite><br>
		<blockquote><p></p>

		<cite>mattis wrote:</cite><br>
		<blockquote>
Do you know any way that I could filter out only the "real" cities/towns out of the database? &nbsp;
		</blockquote>

You may have a look to the dump directory :
http://download.geonames.org/export/dump/

especially those files :
- cities1000.zip : all cities with a population > 1000 (ca 80.000)
- cities5000.zip : all cities with a population > 5000 (ca 40.000)
- cities15000.zip : all cities with a population > 15000 (ca 20.000)

You may also use search webservice, then filter result to keep only places with population > n&nbsp;
		</blockquote>

Yep, I am filtering it on my end of the transaction now. I just wanted to minimize the traffic.

Thank you guys!]]></description>
				<guid isPermaLink="true">http://forum.geonames.org/gforum/posts/list/1980.page#8053</guid>
				<link>http://forum.geonames.org/gforum/posts/list/1980.page#8053</link>
				<pubDate><![CDATA[Wed, 14 Jul 2010 12:34:10]]> GMT</pubDate>
				<author><![CDATA[ mattis]]></author>
			</item>
	</channel>
</rss>