distributeaid / toolbox

DistributeAid Toolbox
http://distributeaid.org
GNU Affero General Public License v3.0
3 stars 1 forks source link

Geolocation with GoogleMaps #106

Open pedro-gutierrez opened 3 years ago

pedro-gutierrez commented 3 years ago

Is your feature request related to a problem? Please describe.

At the moment the toolbox exposes the Address type which captures detailed information about addresses, but we are missing latitude and longitude information.

Describe the solution you'd like

Ideally we would need to:

  1. Given an address, find its latitude and longitude coordinates by querying Google's geolocation APIs.
  2. Mutations to let the user manually adjust a given address coordinates, if for any reason google's data is not accurate or simply not available.
coderbyheart commented 3 years ago

Why not use https://what3words.com/? That's easier to transmit (even orally) compare to two floats.

bion commented 3 years ago

Another option is open location codes: https://en.wikipedia.org/wiki/Open_Location_Code

Like what3words they're also easier to share than coordinates. A few other nice things about them:

coderbyheart commented 3 years ago

That's even better, I like that it does not required a lookup table.

  • don't require the user to speak english

W3W has translations: https://what3words.com/news/blog/what3words-voice-is-now-available-in-over-20-languages/

pedro-gutierrez commented 3 years ago

I am not familiar with all this. Do you know if it is possible to leverage existing database extensions (eg postgis) in order to implement features such as #25, if we don't store actual coordinates?

coderbyheart commented 3 years ago

The good thing with OLC is that they can be converted directly to latitude and longitude.

coderbyheart commented 3 years ago

That said, I think the underlying location data (e.g. for groups), should always be lat/lng, but when showing this information to the user, with the intent of being shared, use OLC.