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

Add an accuracy option to the latitude and longitude of an address #38

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tomtwinkle
Copy link

@tomtwinkle tomtwinkle commented Nov 1, 2023

The current latitude and longitude generation logic generates values with a maximum precision of 15 float places

Example:

  • latitude -13.170896530151367
  • longitude -128.38621520996094

This is larger than the actual latitude and longitude accuracy returned by GoogleMaps GeocodeAPI, etc., and the generated values cannot be stored with accurate accuracy when mapped to json or stored in a database such as MySQL.

Example:

  • latitude -13.17089653
  • longitude -128.38621521

Therefore, we propose to change it so that the accuracy can be specified as an optional argument.

@tomtwinkle
Copy link
Author

@bxcodec May I ask you to check?

Copy link
Contributor

@bxcodec bxcodec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply, been busy with something in real life.

Code wise it's okay, but can you help to add the test, please?

@rubemlrm
Copy link
Contributor

@tomtwinkle Hi,

Do you still have interest in adding this feature to faker? Since we have had this PR on hold for some time, we may have to close or have someone do the missing tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants