tags:

views:

42

answers:

1

On streaming API results there are three location responses; coordinates,place and geo.

I am assuming that if tweet is sent by e.g. iphone then coordinates are there. If it's sent from web, twitter doesn't know the exact coordinates, so it gives a Place bounding box.

I couldn't understand the difference between top level geo & coordinates fields, they appear to be the same thing, but sometimes those values are different then each other. Sometimes order is different sometimes values.

I couldn't find a documentation on this, could u tell me what is the difference between them ? and is my assumption correct on bounding box?

Thanks, Devrim

[coordinates] => Array (
    [type] => Point
    [coordinates] => Array (
        [0] => -87.9
        [1] => 42.95
    )
)
[place] => Array (
    [bounding_box] => Array (
        [type] => Polygon
        [coordinates] => Array (
            [0] => Array (
                [0] => Array (
                    [0] => -87.925183
                    [1] => 42.922616
                )
                [1] => Array (
                    [0] => -87.882582
                    [1] => 42.922616
                )
                [2] => Array (
                    [0] => -87.882582
                    [1] => 42.961715
                )
                [3] => Array (
                    [0] => -87.925183
                    [1] => 42.961715
                )
            )
        )
    )
[geo] => Array (
    [type] => Point
    [coordinates] => Array (
        [0] => 42.95
        [1] => -87.9
    )
)
+1  A: 

From my understanding, these are side effects from different parts of the API. The 'geo' part is from the original geo-tagging functionality, which has been around for quite some time.

The 'place' stuff is from the quite recent place functionality, which is designed to allow user locations to be tied back to an actual place (ie: "San Francisco", "Jim's Cafe, North Beach"), rather than just a lat/lon. See here for the original announcement:

http://groups.google.com/group/twitter-api-announce/browse_thread/thread/e7fc06e4a8cb7150

A lot of this functionality is still quite new (and overlaps somewhat with the very new annotations feature) so how you use it will somewhat depend on your app and what it does.

Cheers!

Fenn.

Fenn