Filtering the filtered stream based on geo location



The “locations” parameter can be used to specify multiple bounding boxes, for example, one for San Francisco and one for New York City. I have a need to tell which tweet is from which bounding box. I imagine I can example the “coordinates” to see if there is an overlap between the tweet’s “bounding box” and the bounding boxes specified in the parameters. Is there an easier/faster way to do this? Perhaps there is a field in the “tweet” corresponding to which “locations” bounding box a tweet correspond to? In my application, I have potentially ~20 bounding boxes so it’s important for me to separate the tweets by geo location quickly/efficiently.




There is nothing built in to the API to achieve this. You will have to post process each Tweet manually by looking at the Tweet’s lat long and determining which of your bounding boxes it falls.