| Author |
Message |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 13/07/2010 18:58:31
|
mattis
Joined: 13/07/2010 18:54:18
Messages: 3
Offline
|
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:
Code:
$.getJSON("http://ws.geonames.org/searchJSON?",
{ 'name': 'stockholm',
'maxRows': 10,
'fcode': 'PPL*',
'population': '0',
'type': 'json'},
As you see, I am messing around with the population variable. Can it be sent to the geonames service?
Thank you in advance.
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 13/07/2010 20:37:06
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4501
Offline
|
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
|
 |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 13/07/2010 22:27:45
|
mattis
Joined: 13/07/2010 18:54:18
Messages: 3
Offline
|
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?
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 14/07/2010 10:20:21
|
geotree
Joined: 23/07/2007 18:28:40
Messages: 138
Location: France
Offline
|
mattis wrote:
Do you know any way that I could filter out only the "real" cities/towns out of the database?
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
|
Christophe
geotree.geonames.org
geotree.geonames.org/geotree.html |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 14/07/2010 12:34:10
|
mattis
Joined: 13/07/2010 18:54:18
Messages: 3
Offline
|
geotree wrote:
mattis wrote:
Do you know any way that I could filter out only the "real" cities/towns out of the database?
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
Yep, I am filtering it on my end of the transaction now. I just wanted to minimize the traffic.
Thank you guys!
|
|
|
 |
|
|