| Author |
Message |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 04/08/2010 01:25:24
|
petermetzger
Joined: 04/08/2010 01:17:44
Messages: 3
Offline
|
Hi,
I'm stumped as to how I can accomplish the following.
Using the general "http://ws.geonames.org/searchJSON", I need to run a standard query, returning only results that match the adminCode1 value of "WI" or "MN".
So far, I can get results for one state at a time, but not both. I tried setting the operator parameter to "OR", however, this returns oodles of results that don't pertain to the original query.
Therefore, a query for "Rice" with the country parameter set to "US" should return only results from Wisconsin and Minnesota.
Any advice?
Thanks in advance,
Peter
|
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 04/08/2010 09:46:42
|
geotree
Joined: 23/07/2007 18:28:40
Messages: 138
Location: France
Offline
|
There is no way to get "MN or WI" in a single query.
You may perform a full US query then filter the results to keep only MN and WI :
http://ws.geonames.org/searchJSON?country=US&q=Rice&fcode=PPL
or perform 2 queries then merge results :
http://ws.geonames.org/searchJSON?country=US&q=Rice&fcode=PPL&adminCode1=WI
http://ws.geonames.org/searchJSON?country=US&q=Rice&fcode=PPL&adminCode1=MN
|
Christophe
geotree.geonames.org
geotree.geonames.org/geotree.html |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 04/08/2010 21:24:53
|
marc
Joined: 08/12/2005 07:39:47
Messages: 4501
Offline
|
I will put it in the 'nice-to-have' folder, maybe we have someday time to implement it.
Best
Marc
|
 |
|
|
 |
![[Post New]](/gforum/templates/default/images/icon_minipost_new.gif) 05/08/2010 21:49:39
|
petermetzger
Joined: 04/08/2010 01:17:44
Messages: 3
Offline
|
That'd be great! It's not a huge deal doing some of the filtration on my end, but it'd definitely be convenient to have implemented on the server-side.
Thanks again,
Peter
|
|
|
 |
|
|