Transform coordinates to decimal format #11
Merged
g
merged 5 commits from w2/photovoter_backend:decimal-coordinates into main 4 years ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'w2/photovoter_backend:decimal-coordinates'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Convert coordinates from rational64u ("42/1, 18/1, 2914/100") EXIF uses to represent degrees, minutes, and seconds of a point to decimal format (42.30809)
General formula is
dec_degree = degreesNumerator / degreesDenominator
+ minutesNumerator / minutesDenominator / 60
+ secondsNumerator / secondsDenominator / 3600
Resources
https://en.wikipedia.org/wiki/Geographic_coordinate_conversion
https://gis.stackexchange.com/questions/136925/how-to-parse-exif-gps-information-to-lat-lng-decimal-numbers
fixes #7
@g
Should we take the reference too and if it's [W]est or [S]outh turn coordinates negative right here?
Sounds good, let's do it
# 5 sum up the result# 6 convert to decimal# 7 round to 5th decimal pointdec_coordinates = round(R-style pipes would be functional here. Sadly Python doesn't have one. Yet comments make it clear.
https://git.iamonlyherefortheicecream.ml/DIWHY/photovoter_backend/issues/12#issue-12
needs a fix
https://git.iamonlyherefortheicecream.ml/DIWHY/photovoter_backend/issues/13#issue-14
is worth fixing as well
fixes #12
fixes #12 better
I should probably start testing my commits, huh? You never know.
fixes #13
4b5a20a109into main 4 years agoA little map with initial results

Reviewers
4b5a20a109.