mapbox / mapbox/streetcar

Specify time offset for a camera that did not geotag

Open
#3 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3
Forks
1
PR merge metrics
No merged PRs in 30d

Description

If a camera did not geotag its images for some reason, we can interpolate geotags from the other cameras that did.

I wrote some hacky code that sort of did this in an automatic way:

```js
// Missing gps coordinates.
// Try to grab coordinates from another camera at same time.
if (!Array.isArray(coord) || coord.length < 2) {
for (let k = 0; k < cameras.length; k++) {
if (k === i) continue;
let cameraAlt = cameras[k];
let fileAlt = alltimes[time][cameraAlt];
if (!fileAlt) continue;

let dataAlt = extractExif(allfiles[fileAlt].data);
let coordAlt = dataAlt.coord;
if (!Array.isArray(coordAlt) || coordAlt.length < 2) {
continue;
}

// offset slightly so they don't appear coincident
coord = coordAlt.map(c => c + 0.000001);
break;
}
}
```

But it doesn't really work because the misbehaving camera isn't necessarily timestamping in sync with the gps camera. It might be off by seconds. So we need to flag this as a warning and run a different command to fix the geotags after a reviewer supplies the offset.

Contributor guide

Open the contributing guide

Research direction

Start by locating the JavaScript processing logic represented by the inline snippet and the existing geotag-fixing command. Trace how missing coordinates and reviewer-supplied values are currently handled. Done means the unsynchronized camera case produces a warning and can be handled by the separate offset-based command described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.