mirror of
https://github.com/photoprism/photoprism.git
synced 2026-03-02 22:57:18 -05:00
Places/Map: Handle edge-case geolocations (e.g., North Pole) #2482
Labels
No labels
ai
android
api
auth
awesome
bug
bug
ci
cli
config
database
declined
deprecated
docker
docs 📚
documents
duplicate
easy
enhancement
enhancement
enhancement
epic
faces
feedback wanted
frontend
hacktoberfest
help wanted
idea
in-progress
incomplete
index
invalid
ios
labels
live
live
low-priority
macos
member-feature
metadata
mobile
nas
needs-analysis
no-coding-required
no-coding-required
observability
performance
places
please-test
plus-feature
priority
pro-feature
question
raspberry-pi
raw
released
released
released
research
resolved
security
sharing
tested
tests
third-party-issue
thumbnails
upgrade
upstream-issue
ux
vector
video
waiting
won't fix
won't fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/photoprism#2482
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @schorschebob on GitHub (Feb 9, 2026).
Originally assigned to: @schorschebob on GitHub.
Before You Continue
What Is Not Working as Documented?
Dear PhotoPrism Team,
As part of a research expedition, I spent a long time traveling to and around the North Pole. During this time, many photos were taken with a wide variety of cameras — from professional SLR cameras used by journalists to normal smartphone cameras.
After importing these images into PhotoPrism, no photos appear in the Places tab. The log contains the following warnings, among others:
To me, this looks very much like IEEE-754 floating point precision issues (latitude slightly > 90°).
I can manually correct the affected photos, after which everything works again for the time being. However, after a few days, similar errors occur again, presumably because other photos are used for the initial display in the Places tab.
A possible robust solution would be to intercept such edge cases on the server side, e.g., by limiting the coordinates:
Latitude:
min(photo.lat, 90)corresponding to 180° for longitude as well, if necessary.
This would reliably neutralize incorrect floating-point rounding.
Thank you very much for your work on PhotoPrism and for checking this edge case.
Best regards
How Can We Reproduce It?
What Behavior Do You Expect?
To see the photos on the map/globe.
What Could Be the Cause?
To me, this looks very much like IEEE-754 floating point precision issues (latitude slightly > 90°).
I can manually correct the affected photos, after which everything works again for the time being. However, after a few days, similar errors occur again, presumably because other photos are used for the initial display in the Places tab.
A possible robust solution would be to intercept such edge cases on the server side, e.g., by limiting the coordinates:
Latitude: min(photo.lat, 90)
corresponding to 180° for longitude as well, if necessary.
This would reliably neutralize incorrect floating-point rounding.
Logs, Sample Files, or Screenshots
time="2026-02-09T00:11:37Z" level=warning msg="photo: unknown cell id for lat 90.000003, lng 21.600621 (uid pt6aw2bvwgpaept9)"
time="2026-02-09T00:11:37Z" level=info msg="photo: removed 1 location label from MOSAiC_Mario/BlackWhite/DSCF9695"
time="2026-02-09T00:11:37Z" level=warning msg="photo: unknown cell id for lat 90.000000, lng 22.326028 (uid pt6aw2k3wvbaigks)"
time="2026-02-09T00:11:38Z" level=warning msg="photo: unknown cell id for lat 90.000008, lng 22.648037 (uid pt6aw2xy64aczavb)"
time="2026-02-09T00:11:38Z" level=warning msg="photo: unknown cell id for lat 90.000004, lng 22.867187 (uid pt6aw32yz2p0wjid)"
time="2026-02-09T00:11:38Z" level=info msg="photo: removed 1 location label from MOSAiC_Mario/BlackWhite/DSCF9703"
time="2026-02-09T00:11:38Z" level=warning msg="photo: unknown cell id for lat 90.000013, lng 23.702374 (uid pt6aw38hbuot46h7)"
time="2026-02-09T00:11:38Z" level=warning msg="photo: unknown cell id for lat 90.000001, lng 28.979410 (uid pt6aw3ad8nf0b6kw)"
time="2026-02-09T00:11:38Z" level=info msg="photo: removed 1 location label from MOSAiC_Mario/BlackWhite/DSCF9706"
time="2026-02-09T00:11:38Z" level=warning msg="photo: unknown cell id for lat 90.000009, lng 31.887611 (uid pt6aw3l6btonl6jr)"
time="2026-02-09T00:11:39Z" level=warning msg="photo: unknown cell id for lat 90.000010, lng 30.922330 (uid pt6aw3yx0e2wdmd6)"
time="2026-02-09T00:11:39Z" level=info msg="photo: removed 1 location label from MOSAiC_Mario/BlackWhite/DSCF9714"
time="2026-02-09T00:11:39Z" level=warning msg="photo: unknown cell id for lat 90.000005, lng 30.709739 (uid pt6aw44ysdyqmow5)"
time="2026-02-09T00:11:39Z" level=warning msg="photo: unknown cell id for lat 90.000011, lng 29.378754 (uid pt6aw47q9v3ur7xa)"
time="2026-02-09T00:11:39Z" level=warning msg="photo: unknown cell id for lat 90.000015, lng 21.658572 (uid pt6aw4nf4fhvafg0)"
time="2026-02-09T00:11:39Z" level=info msg="photo: removed 1 location label from MOSAiC_Mario/BlackWhite/DSCF9725"
time="2026-02-09T00:11:39Z" level=warning msg="photo: unknown cell id for lat 90.000019, lng 21.566040 (uid pt6aw4v5ub4pfzb3)"
time="2026-02-09T00:11:39Z" level=info msg="photo: removed 1 location label from MOSAiC_Mario/BlackWhite/DSCF9727"
time="2026-02-09T00:11:40Z" level=warning msg="photo: unknown cell id for lat 90.000009, lng 12.823077 (uid pt6aw5ho1umgohmg)"
time="2026-02-09T00:11:40Z" level=info msg="photo: removed 1 location label from MOSAiC_Mario/BlackWhite/DSCF9736"
time="2026-02-09T00:11:41Z" level=warning msg="photo: unknown cell id for lat 90.000017, lng 13.449190 (uid pt6aw69pu5tkudjt)"
time="2026-02-09T00:11:41Z" level=info msg="photo: removed 1 location label from MOSAiC_Mario/BlackWhite/DSCF9746"
Which Software Versions Do You Use?
On What Device Is PhotoPrism Installed?
Do You Use a Reverse Proxy, Firewall, VPN, or CDN?
traefik v3.2
@lastzero commented on GitHub (Feb 9, 2026):
Thanks for your report! If you haven't done so yet, could you provide us with a few file samples for testing? See https://www.photoprism.app/contact#file-samples
@schorschebob commented on GitHub (Feb 9, 2026):
Thanks for the quick response! I have sent you two sample images via wetransfer as the files are over 14MB each.
@lastzero commented on GitHub (Feb 10, 2026):
These changes provide a fix for edge-case GPS values with tiny floating-point overshoots (for example 90.000003 latitude). We now normalize minor overshoots at coordinate boundaries in a shared geo helper and use it consistently in both location updates and S2 token generation, so affected photos can appear correctly in Places/Map. Validation remains strict for clearly invalid large overshoots to avoid unwanted side effects.
An updated preview build will be available for testing soon:
@schorschebob Please let us know if it fixed your issues! :)
@lastzero commented on GitHub (Feb 11, 2026):
These additional changes provide an extra layer of protection for Google JSON sidecars. GPS coordinates are now clamped to valid ranges before being stored in metadata (lat: -90..90, lng: -180..180). This prevents invalid Google JSON values from propagating into Places/map rendering. We also added and updated tests for the clamp helper and Google JSON parsing. Although existing invalid coordinates in the database or from other metadata sources may still require cleanup, new Google JSON imports should no longer trigger this specific issue.
@schorschebob commented on GitHub (Feb 11, 2026):
It took a while because there were quite a few images that I had to reindex. Your adjustments had the desired effect, and the photos are now displayed correctly in the map view.
Thank you very much for your quick response!