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

Store user geolocation #212

Open
CeciliaHinga opened this issue Sep 9, 2019 · 4 comments
Open

Store user geolocation #212

CeciliaHinga opened this issue Sep 9, 2019 · 4 comments
Assignees
Labels
Back-end issues Back end issues Design: UI Ready for design UI Design: Usability + Inclusion Ready for design usability/inclusive design Design: User Research Ready for user research Design: UX Ready for design UX Feature: People An issue that is related to TenFour's people experience Feature: Profile An issue that is related to TenFour's profile experience Front-end Issues that need Front-end code/edits P2 - Normal Tech debt Issues that have been a result of technical debt

Comments

@CeciliaHinga
Copy link
Collaborator

From tenfour-archive created by mackers: ushahidi/tenfour-archive#1562

TenFour backend updated to store user locations

Suggested Spec:

  • create table users_location
  • table has user id, location_text, location_geo, created_at, updated_at columns
  • table can have multiple rows for each user
  • when user address is changed or added, the address is geocode to lat/lng
  • row is updated/added
  • may need to think about geo precision/scale (i.e. if only a city is recorded for a user, this table needs to know that the user is in a city area, not just precide lat/lng)
@CeciliaHinga
Copy link
Collaborator Author

@rowasc this work needs to be done regardless of final UX/ethics decisions for alerts

Can you start on this please?

@CeciliaHinga
Copy link
Collaborator Author

ok

location_geo would be a geo type, right?

when user address is changed or added, the address is geocode to lat/lng

So in the backend we would call a geolocation api like google maps API and do this conversion ? or would the frontend do this instead?

location_text

is this the full text address of the user? (or city+"state/department/etc"+ country if that's what they provide)

may need to think about geo precision/scale (i.e. if only a city is recorded for a user, this table needs to know that the user is in a city area, not just precide lat/lng)

Yes.

@CeciliaHinga
Copy link
Collaborator Author

ok, thanks.
If we plan on having the ability to let users select an area of interest OR do point in polygon lookups locally for some situations (like we currently do in our mariadb-compatible lambda query) , geo will be necessary. If not, we might get away with a text field.
Might be a mysql version thing. I'll check it out.

@CeciliaHinga
Copy link
Collaborator Author

Yes, backend should call the geocode API.

I'm not sure the geo support in laravel. The location_geo column in replies seems to be just a TEXT column. I think last time we visited, there was an issue using the geo column type. I'll invite you to investigate the best solution to this.

location_text is the address they provide.

@Erioldoesdesign Erioldoesdesign added Back-end issues Back end issues Backend P2 - Normal Tech debt Issues that have been a result of technical debt and removed Backend labels Sep 11, 2019
@Erioldoesdesign Erioldoesdesign added Design: UI Ready for design UI Design: Usability + Inclusion Ready for design usability/inclusive design Design: User Research Ready for user research Design: UX Ready for design UX Feature: People An issue that is related to TenFour's people experience Feature: Profile An issue that is related to TenFour's profile experience Front-end Issues that need Front-end code/edits and removed Medium Priority labels Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Back-end issues Back end issues Design: UI Ready for design UI Design: Usability + Inclusion Ready for design usability/inclusive design Design: User Research Ready for user research Design: UX Ready for design UX Feature: People An issue that is related to TenFour's people experience Feature: Profile An issue that is related to TenFour's profile experience Front-end Issues that need Front-end code/edits P2 - Normal Tech debt Issues that have been a result of technical debt
Projects
None yet
Development

No branches or pull requests

3 participants