GeoNames Home | Postal Codes | Download / Webservice | About 

GeoNames Forum
  [Search] Search   [Recent Topics] Recent Topics   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Exclude a featureClass  XML
Forum Index -> General
Author Message
mike.cbi



Joined: 27/06/2012 21:19:37
Messages: 4
Offline

I am trying to exclude items with a featureClass of S from my search. I tried using a query like this:

http://api.geonames.org/searchJSON?q=Africa&maxRows=3&style=FULL&featureClass=A&featureClass=H&featureClass=L&featureClass=P&featureClass=R&featureClass=T&featureClass=U&featureClass=V

However, with this particular search "Africa" brings up South Africa first and the continent itself does not show up in the results. If I add featureClass=S as a query parameter, then the same search returns the continent first. The continent record, though, has a featureClass of L, which I'm including.

Is what I'm attempting to do possible, or is there a different way of doing it?

Thanks,
Mike
marc



Joined: 08/12/2005 07:39:47
Messages: 4501
Offline

Mike

The list of featureClasses results in an OR query and it seems that this affects the sort order.
It will be easier to search with name=Africa. Then the search will only be executed over the place name. With the q parameter all attributes are searched and the number of results is much bigger.

Best Regards

Marc

[WWW]
 
Forum Index -> General
Go to:   
Powered by JForum 2.1.5 © JForum Team