リアルタイムのツイートを収集してコレクションに保存しています。コレクション内のレコードから情報を抽出したいと考えています。
"place" : { "country_code" : "US", "url" : "http://api.twitter.com/1/geo /id/01fbe706f872cb32.json", "country" : "United States", "place_type" : "city", "bounding_box" : { "type" : "Polygon", "coordinates" : [ [ [ -77.119759, 38.791645 ], [ -76.909393, 38.791645 ], [ -76.909393, 38.995548 ], [ -77.119759, 38.995548 ] ] ] }, "full_name" : "Washington, DC", "attributes" : { }, "id" : "01fbe706f872cb32", "name" : "Washington" }
座標情報が必要なだけなので、pymongoを使用して次のことを試みます。
cursor = coll.find({"place.bounding_box.type" : "Polygon"},{"coordinates" : 1}, tailable = True, timeout = False)
しかし、これは境界ボックスがキーである座標を返しません。
このデータを返すにはどうすればよいですか?
ありがとう