Transform coordinates to decimal format #11

Merged
g merged 5 commits from w2/photovoter_backend:decimal-coordinates into main 4 years ago
w2 commented 4 years ago
Owner

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

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
w2 added 1 commit 4 years ago
Poster
Owner

fixes #7

fixes #7
Poster
Owner

@g
Should we take the reference too and if it's [W]est or [S]outh turn coordinates negative right here?

@g Should we take the reference too and if it's \[W\]est or \[S\]outh turn coordinates negative right here?
g commented 4 years ago
Owner

@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

> @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
w2 added 1 commit 4 years ago
g reviewed 4 years ago
# 5 sum up the result
# 6 convert to decimal
# 7 round to 5th decimal point
dec_coordinates = round(
g commented 4 years ago
Owner

R-style pipes would be functional here. Sadly Python doesn't have one. Yet comments make it clear.

R-style pipes would be *functional* here. Sadly Python doesn't have one. Yet comments make it clear.
g commented 4 years ago
Owner
https://git.iamonlyherefortheicecream.ml/DIWHY/photovoter_backend/issues/12#issue-12 needs a fix
g commented 4 years ago
Owner
https://git.iamonlyherefortheicecream.ml/DIWHY/photovoter_backend/issues/13#issue-14 is worth fixing as well
w2 added 1 commit 4 years ago
Poster
Owner

fixes #12

fixes #12
w2 added 1 commit 4 years ago
Poster
Owner

fixes #12 better

I should probably start testing my commits, huh? You never know.

fixes #12 better I should probably start testing my commits, huh? You never know.
w2 added 1 commit 4 years ago
Poster
Owner

fixes #13

fixes #13
g approved these changes 4 years ago
g merged commit 4b5a20a109 into main 4 years ago
g commented 4 years ago
Owner

A little map with initial results
image

A little map with initial results ![image](/attachments/1398c3d5-5e18-489f-9a82-718a6531e928)
193 KiB
w2 deleted branch decimal-coordinates 4 years ago

Reviewers

g approved these changes 4 years ago
The pull request has been merged as 4b5a20a109.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: DIWHY/photovoter_backend#11
Loading…
There is no content yet.