difference between geo and coordinates in status

7933 views
Skip to first unread message

Kim

unread,
Oct 26, 2010, 1:34:25 PM10/26/10
to Twitter Development Talk
Hi,
Apologies if this has been answered before, but I couldn't find the
answer anywhere.

I'm using the Streaming API and, based on the data I've seen so far,
the coordinates and geo fields appear to contain duplicate info. If a
status contains 1 of these fields, then it contains both, and the only
difference is the order of lat and lon. I've included an example
below.

Is this correct? Is one of these fields legacy, and if so, which one?

{
...
"coordinates": {
"type": "Point",
"coordinates": [
-74.147244,
40.638104
]
},
...
"geo": {
"type": "Point",
"coordinates": [
40.638104,
-74.147244
]
},
}


Thanks!
Kim

Matt Harris

unread,
Oct 26, 2010, 3:07:39 PM10/26/10
to twitter-deve...@googlegroups.com
Hi Kim,

This was discussed in another thread in the group:

You should find the answer your question there.

Best
@themattharris
Developer Advocate, Twitter
http://twitter.com/themattharris



--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: http://groups.google.com/group/twitter-development-talk

Kim

unread,
Oct 26, 2010, 3:36:50 PM10/26/10
to Twitter Development Talk
Hi Matt,
I'm probably missing something, but that thread seems to be describing
the difference between place coordinates, as opposed to the
coordinates field that's at the status level (same level as geo, as
shown in my example above). Those coordinates appear to be redundant
with geo.

Thanks,
Kim

On Oct 26, 12:07 pm, Matt Harris <thematthar...@twitter.com> wrote:
> Hi Kim,
>
> This was discussed in another thread in the group:
>
> http://groups.google.com/group/twitter-development-talk/browse_thread...
>
> You should find the answer your question there.
>
> Best
> @themattharris
> Developer Advocate, Twitterhttp://twitter.com/themattharris

Matt Harris

unread,
Oct 26, 2010, 5:07:15 PM10/26/10
to twitter-deve...@googlegroups.com
Hi Kim,

Thanks for following up - I did think you were referring to the place coordinates not the status coordinates.

In the status object there is a geo block and a coordinates block. Both contain the same information but one is in human readable form (the geo block -- lat,lon) whilst the other is in geojson form (the coordinates block -- lon, lat).

The reason for both fields is historical and due to us wanting to keep backwards compatibility. When developing you should use the coordinates block as this is the geojson friendly format.

Best,
@themattharris
Developer Advocate, Twitter
http://twitter.com/themattharris

Kim

unread,
Oct 26, 2010, 5:39:25 PM10/26/10
to Twitter Development Talk
Excellent, thanks for the info!
-Kim

On Oct 26, 2:07 pm, Matt Harris <thematthar...@twitter.com> wrote:
> Hi Kim,
>
> Thanks for following up - I did think you were referring to the place
> coordinates not the status coordinates.
>
> In the status object there is a geo block and a coordinates block. Both
> contain the same information but one is in human readable form (the geo
> block -- lat,lon) whilst the other is in geojson form (the coordinates block
> -- lon, lat).
>
> The reason for both fields is historical and due to us wanting to keep
> backwards compatibility. When developing you should use the coordinates
> block as this is the geojson friendly format.
>
> Best,
> @themattharris

David W

unread,
Nov 17, 2010, 8:22:08 AM11/17/10
to Twitter Development Talk
Is it fair to say that both geo and coordinates have effectively been
replaced by place? Or is there circumstances when you would still use
coordinates over place?

In other words - if I were building a brand new client from scratch
would I pay any attention to geo or coordinates, or only concern
myself with place?

Cheers,
dw.

On Oct 26, 9:07 pm, Matt Harris <thematthar...@twitter.com> wrote:
> Hi Kim,
>
> Thanks for following up - I did think you were referring to the place
> coordinates not the status coordinates.
>
> In the status object there is a geo block and a coordinates block. Both
> contain the same information but one is in human readable form (the geo
> block -- lat,lon) whilst the other is in geojson form (the coordinates block
> -- lon, lat).
>
> The reason for both fields is historical and due to us wanting to keep
> backwards compatibility. When developing you should use the coordinates
> block as this is the geojson friendly format.
>
> Best,
> @themattharris
> Developer Advocate, Twitterhttp://twitter.com/themattharris

David W

unread,
Nov 28, 2010, 7:00:01 AM11/28/10
to Twitter Development Talk
So to answer my own question here a bit, I think that geo has been
"replaced" by coordinates (at the status level) - but that place does
not replace coordinates, but is rather used alongside it in some
cases.

It appears that they are used together on quite a number of
occasions. A lot of foursquare statuses appear to provide an exact
location in the coordinates (status) property *and* provide place info
that "frames" the exact location in a bounding box of the surrounding
city (for example).

It looks like twitter.com's implementation uses both coordinates and
place to display their embedded maps, which is cool. So I'm moving
forward on the basis that I should be paying attention to both status
level coordinates and place data.

Would be great if someone could confirm my presumptions are correct
here.

Cheers,
dw.
Reply all
Reply to author
Forward
0 new messages