We are currently using YQL to query geo data for towns and counties in the UK. At the moment, we can use the following query to find all towns named Boston
:
select * from geo.places where text="boston" and placeTypeName="Town"
The issue is, that we would like to specify the county and country to generate more specific results. I have tried the following query, but it returns 0 results:
select * from geo.places where (text="boston" and placeTypeName="Town") and (text="lincolnshire" and placeTypeName="County")
How can I query 3 field types to return the results I need? Essentially, we would like to query the following fields:
text
and placeTypeName="Town"
text
and placeTypeName="County"
text
and placeTypeName="Country"
This may be an option maybe: https://developer.yahoo.com/blogs/ydnsevenblog/solving-location-based-services-needs-yahoo-other-technology-7952.html
As it mentions: Turning text into a location You can also turn a text (name) into a location using the following code:
This wrapper call uses our Placemaker Service under the hood and automatically disambiguates for you. This means that Paris is Paris, France, and not Paris Hilton; London is London, England, and not Jack London.