Freebase geo search
I'm wondering if it's possible to get, for example, all events that occurred in a geographical area, as defined by lat/long coordinates. For instance a rectangular area on the shores of Normandy should pull up some battle events. I've tried straight MQL, and also the service at http://api.freebase.com/api/servi开发者_如何学Cce/geosearch?help, but I'm having no luck. Any hints, or examples anywhere?
Thanks for any help you can give!
You could get the topics for the given area ([0,0,50,50] in my example): http://api.freebase.com/api/service/geosearch?location=[0,0,50,50]&location_type=/location/location&inside=true&indent=1&format=ids
And then get the events that happened there:
[{
"id": null,
"locations": [{
"id|=": [
"/en/algeria",
"/en/austria",
"/en/austria",
"/en/andorra",
"/en/andorra",
"/en/asia",
"/en/albania",
"/en/albania",
"/en/armenia",
"/en/armenia",
"/en/azerbaijan",
"/en/azerbaijan",
"/en/ankara",
"/en/aegean_sea",
"/en/anatolia",
"/en/athens",
"/en/abensberg",
"/en/casa_batllo",
"/en/park_guell",
"/en/casa_mila"
]
}],
"name": null,
"type": "/time/event"
}]
精彩评论