Get longitude and latitude of a Tweet


Hey together,

We are trying to get the longitude and latitude of Tweets (with a specific hashtag) via Processing.

Our problem is that we receive the GeoLocation of a Tweet in one variable but not the longitude and latitude as separated values (in order to use them for further functions).

This is an extraction of our code:

try {

QueryResult result =;

ArrayList tweets = (ArrayList)


for (int i=0; i<tweets.size (); i++) {

  //all Tweets

  Status t = (Status)tweets.get(i);

  String user = t.getUser().getName();

  String msg = t.getText();

  GeoLocation geo = t.getGeoLocation(); 


catch(TwitterException te) {

println("Could not connect: " +




Has anyone a solution for us?

Thanks in advance :slight_smile:

Marina and Thea