Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New design for locations #319

Open
gcampax opened this issue Mar 3, 2021 · 1 comment
Open

New design for locations #319

gcampax opened this issue Mar 3, 2021 · 1 comment
Labels
cleanup Clean ups, refactorings, and code improvements that don't fall under other categories enhancement P3 Nice to have, not working on it for now

Comments

@gcampax
Copy link
Contributor

gcampax commented Mar 3, 2021

Representing locations as a single pair of coordinates is insufficient, because it does not account for the extents of the location, which can be a building, a street, a city, an administrative division (county, state, province...) etc.

I propose we represent locations as:

  • a name
  • a specific point on Earth
  • a radius around that point, based on the type of location (building, street, city)
  • a hierarchy of administrative divisions (starting at county/parish for the US) that entirely contain the location.

For example, "Palo Alto" would be:

  • 37.442156, -122.1634471
  • 10km radius (city)
  • Santa Clara County, California, United States

"University Ave" would be:

  • 37.4466552,-122.1626787
  • 500m radius (street)
  • Santa Clara County, California, United States

"353 Jane Stanford Way Stanford California" would be:

  • 37.4299908,-122.175519
  • 100m radius (building)
  • Santa Clara County, California, United States

"my current location" (assuming I'm at Gates) would be:

  • 37.4299908,-122.175519
  • 1m radius (GPS)
  • Santa Clara County, California, United States

Two locations are ==-equal if the intersect. This should give the right semantics for location filters.

@gcampax gcampax added enhancement cleanup Clean ups, refactorings, and code improvements that don't fall under other categories labels Mar 3, 2021
@gcampax gcampax added this to the Almond 2.0 Beta milestone Mar 3, 2021
@gcampax
Copy link
Contributor Author

gcampax commented Mar 5, 2021

We should also include the timezone information in each location, so we can display times correctly for that location (for weather, opening hours, etc.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Clean ups, refactorings, and code improvements that don't fall under other categories enhancement P3 Nice to have, not working on it for now
Projects
None yet
Development

No branches or pull requests

2 participants