Skip to content

Adding support for non-Google Street View panoramas - #6

Open
dmbaty wants to merge 5 commits into
stiles:mainfrom
dmbaty:non-official-sv-support
Open

Adding support for non-Google Street View panoramas#6
dmbaty wants to merge 5 commits into
stiles:mainfrom
dmbaty:non-official-sv-support

Conversation

@dmbaty

@dmbaty dmbaty commented Aug 3, 2026

Copy link
Copy Markdown

Summary

This adds support for non-Google Street View panoramas, and includes proper support for handling lower resolution panoramas.

Changes

  • cli.py:
    • Added a check on image size. If high quality is not available (max width less than or equal to 8192), downgrade to medium automatically and print a console message indicating this change was made. Otherwise, a blank image is created. Continuing with a message feels more appropriate than stopping, especially if batch processing.
  • core.py:
    • Added scale factor adjustment based on max resolution, as smaller panoramas will be cropped incorrectly otherwise. These panoramas don't have zoom 5 (high quality) available and this causes issues with scaling.
  • metadata.py:
    • Search for only "!1s" instead of a longer string in URL to extract more panorama IDs, including those from non-Google panoramas. The longer string of "!3m5!1s" seems to miss non-Google panoramas (and perhaps others).
    • Added a check and conversion process to the format for non-Google panoramas. These must have a preamble added and converted to base64 to be passed to the API.

Notes

  • Some of this was accomplished via reverse engineering, so testing on a wider range of non-Google panoramas may be required.
  • The list of characters to identify non-Google panoramas may not be complete.
  • This resolves closed issue Error: Could not extract panorama ID from URL #4, though some of the example URLs there do not work. The URLs may be malformed, as in a browser the image is shown but with an error.

dmbaty added 5 commits August 2, 2026 12:18
Added format conversion, specifically for non-official SV pano IDs
Smaller panos do not have zoom level 5, causing issues with scaling
Panos with max width of 8192 or smaller do not have high quality (zoom 5) available, added check to bump down to medium automatically
Added return type and updated comment on quick and dirty detection of pano ID type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant