Skip to content

Report why a GPX track was not used when no other source geotags the file - #938

Open
caglarpir wants to merge 1 commit into
mapillary:mainfrom
caglarpir:report-gpx-rejection
Open

caglarpir wants to merge 1 commit into
mapillary:mainfrom
caglarpir:report-gpx-rejection

Conversation

@caglarpir

@caglarpir caglarpir commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

A GPX track that misses a video hands the video on to the next geotag source. When no later source geotagged it, the error reported was that of the last source to fail, which hid the miss. A GoPro video whose own GPS is too noisy, given a GPX of another day, failed as "GPS is too noisy": the very problem the GPX was given to work around. The Desktop Uploader, whose chain runs gpx, gpx, exiftool_xml, native and exiftool_runtime, shows only that error.

After a GPX that misses the video Before After
a later source fails as too noisy, no GPS found, file not found or ExifTool not found that failure MapillaryOutsideGPXTrackError, the miss
a later source fails with an error about the file itself, such as MapillaryStationaryVideoError that error unchanged
a later source geotags the video a warning about the miss unchanged

The error, for a noisy GoPro video given a GPX recorded months before:

The GPX track in GS018205.gpx (2026-05-29T12:47:06+00:00 to 2026-05-29T12:53:00+00:00) misses the video GS018205.360 (2026-09-11T15:39:40.599000+00:00 to 2026-09-11T15:39:56.099000+00:00) by 105.1 days. Check that the GPX file belongs to this video, then the camera clock and the time zone of the GPX timestamps

Tests: unit tests for the Desktop Uploader's chain, for each kind of later failure, for a later error that ends the chain, and for a later source that geotags the video. Also checked by hand through process with the Desktop Uploader's arguments, on a noisy GoPro video with a GPX of another day, of the same day 3 hours off, and of the video itself.

First of three stacked PRs: this one, then #939 and #940. None of them touches README.md or docs/; the documentation follows in its own PR.

…file

A GPX track that misses a file lets the later geotag sources take their
turn. When none of them geotagged the file, the error reported was that
of the last one to fail, which hid the miss. A video whose own GPS is too
noisy, given a GPX of another day, failed as "GPS is too noisy": the very
problem the GPX was given to work around. The Desktop Uploader, whose
chain runs two GPX sources, exiftool_xml, native and exiftool_runtime,
shows only that error.

Report the miss instead: "The GPX track in X (...) misses the video Y
(...) by 105.1 days. Check that the GPX file belongs to this video, ...".
An error that ends the chain, such as "Stationary video", is still
reported, as it says something about the file itself, and a file that a
later source geotags still only gets the warning it gets now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant