Geolocation #165
Replies: 4 comments 8 replies
-
What about a single Coordinate field? The city and country types feel redundant since clients wanting less specific location can just "round up" to the general area any given coordinate is in. The unstructured string field is interesting but would cause too much uncertainty for clients trying to parse that field if everyone has their own way of representing location. |
Beta Was this translation helpful? Give feedback.
-
Thanks for putting this together, a few thoughts:
|
Beta Was this translation helpful? Give feedback.
-
Alternative approaches:
I think the second one would be usually preferred (also allows to get all casts with a specific location as parent) and leaves both embed_url for other embeds. But ideally, clients could support both. |
Beta Was this translation helpful? Give feedback.
-
closing in favor of #196 and #197, thanks for starting the discussion @zachterrell57 |
Beta Was this translation helpful? Give feedback.
-
Problem
The Farcaster protocol currently does not support the use of geolocation data. By integrating geolocation capabilities, the protocol will enable the creation of innovative location-based clients, improve feed targeting, and provide richer analytics.
Specification
Below are two approaches for integrating geolocation data into the Farcaster protocol, both designed to cater to different operational preferences and complexities:
Option 1: Structured Geolocation Types
This approach utilizes a defined set of types that categorize geolocation data according to its granularity. It allows for clear and consistent communication of the location detail being shared, which can facilitate easier application development and data handling on the client side.
Where
latitude
andlongitude
are numbers of up to 5 decimal places, [which will give ~1m of precision](https://en.wikipedia.org/wiki/Decimal_degrees)Option 2: Simple String Field
An alternative option is to use a single string field for geolocation. This method offers flexibility, allowing clients to determine the format and validity of the location data themselves. It simplifies the protocol but requires clients to handle the parsing and validation of the location string.
This simpler approach avoids the overhead of managing specific types and allows for any form of location data to be entered, from country names to detailed coordinates. However, it places more responsibility on client applications to interpret and validate the data correctly.
User Data
Add a new
USER_DATA_TYPE_LOCATION
field at the empty position 7Where
USER_DATA_TYPE_LOCATION
is valid only:m.data.body.type
isUSER_DATA_TYPE_LOCATION
, value must be validGeolocation
m.data.body.location
is validGeolocationType
CastAddBody
Add a new
geolocation
field at the empty position 8geolocation
field is optional, reflecting that not all casts will include geolocation data. Applications should handle casts both with and without geolocation data gracefully.Rationale
1. Enhancing User Experience and Enabling New Applications:
2. Content Filtering, Curation, and Recommendations:
3. Enhanced Analytics and Insights:
Beta Was this translation helpful? Give feedback.
All reactions