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 Latitude and Longitude type #49

Closed
miili opened this issue May 21, 2023 · 6 comments · Fixed by #76
Closed

Add Latitude and Longitude type #49

miili opened this issue May 21, 2023 · 6 comments · Fixed by #76

Comments

@miili
Copy link

miili commented May 21, 2023

  • Latitude degree
  • Longitude degree

Could also be merged into a float tuple

@miili miili changed the title Add GeoLocation type Add Latitude and Longitude type May 21, 2023
@kroncatti
Copy link

What do you think about geopy for that @yezz123 ? It seems like a reasonable lib for doing that, or should we keep it simpler by coding it ouselves ?

@samuelcolvin
Copy link
Member

best to keep it simple if possible, see #74.

@kroncatti
Copy link

Thanks @samuelcolvin, I'll check that.

@miili
Copy link
Author

miili commented Jul 3, 2023

To give some more meat on the bone here:

  • Latitude is Northing from -90.0 to 90.0 degree.
  • Longitude is Easting from -180.0 to 180.0 degree. Definitions from 0.0 to 360.0 degree have to be normalized to -180. to 180 degree.

@kkirsche
Copy link

  • Latitude degree

  • Longitude degree

Could also be merged into a float tuple

If precision is important, I'd recommend using Decimal instead of float.

This speaks to the concern:
https://docs.python.org/3/tutorial/floatingpoint.html

With the example:

>>> 0.1
0.1000000000000000055511151231257827021181583404541015625

@miili
Copy link
Author

miili commented Jul 20, 2023

A float is absolutely sufficient, there is no need to go to Decimals

See https://xkcd.com/2170/

@yezz123 yezz123 linked a pull request Jul 27, 2023 that will close this issue
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 a pull request may close this issue.

4 participants