[Freebase-discuss] Geosearch help

Shawn Simister narphorium at gmail.com
Wed May 5 23:07:40 UTC 2010


Has anyone here tried using the Geosearch API 
<http://www.freebase.com/docs/geosearch>? I'm looking to do some simple 
point-in-polygon queries and I'm not able to get my test query working.

I uploaded a GeoJSON polygon as the geometry for the political district 
of Ottawa Centre <http://www.sandbox-freebase.com/view/m/0fgt7x> on 
sandbox. Now I'm trying to query for all political districts that 
contain the point (-75.696659, 45.419916) by calling the API like this:

http://www.sandbox-freebase.com/api/service/geosearch?location={"type":"Point","coordinates":[-75.696659,45.419916]}&type=/government/political_district&contains=true&indent=1 
<http://www.sandbox-freebase.com/api/service/geosearch?location=%7B%22type%22:%22Point%22,%22coordinates%22:%5B-75.696659,45.419916%5D%7D&type=/government/political_district&contains=true&indent=1>

The problem is that it only returns one result which is Ontario; not 
Ottawa Centre. In fact, I still can't find the shape even if I query for 
it by name:

http://www.sandbox-freebase.com/api/service/geosearch?location=Ottawa+Centre&location_type=/government/political_district&indent=1 
<http://www.sandbox-freebase.com/api/service/geosearch?location=Ottawa+Centre&location_type=/government/political_district&indent=1>

Is there some reason why my shape wouldn't be indexed by the Geosearch 
API? I can't think of what else could be causing this.

Shawn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freebase.com/pipermail/freebase-discuss/attachments/20100505/8110fdc6/attachment.htm 


More information about the Freebase-discuss mailing list