Speculative: Reordering Panoramas for Consistency #15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a speculative pull request showing off a potential technique, and it should never be reviewed or merged.
Motivation
For a given node, it can be quite confusing to click through the panoramas (i.e. rooftop photos), since they are displayed in a random order, possibly the order they were taken in. The goal of this work is to reorder photos so that when a viewer clicks through them on the map interface, they move in a consistent direction.
I’ve chosen the standard direction as clockwise when viewed from above, with no requirement for a specific photo (ie. North-facing) to come first.
Examples
I have done the ordering manually for the examples here, but the idea is to do this in the future through ✨computer vision ✨, my specialty.
With panoramas listed with the new correct ordering:
This Pull Request
The order of photos when displayed in the map web UI is purely based on sorting by filename.
So, the diff I’ve made here just renames the files so that they end up in the right order. How's this as an approach?
I dislike that you can't easily tell what I've done from the diff for this PR
Here's the script I used:
Future Work
Just renaming files feels sketchy for me, as I am worried there's a cache elsewhere that depends on consistent names. But perhaps I’m wrong? If it’s important for us to preserve the filenames, this information could be encoded per-node elsewhere, just as an ordered list.
Complexity
While looking through the nodes for examples, I've found several with helpful zoomed-in, non-panorama photos, such as: https://map.nycmesh.net/nodes/11098/panoramas/1
There's many like this, that wouldn't be helped by a simple reordering approach. This is great news for me, since structured photo data is part of my larger project. However, it may mean that reordering isn't useful enough by itself until we have something better.