Skip to main content

streetview-tools

Retrieve panorama metadata and download panorama images from Google Street View, Naver Roadview, and Kakao Roadview.

Installation

pip install streetview-tools

Usage

from streetview_tools import google

pano = google.get_pano_info(panoid="PANORAMA_ID")
google.save_img(
	panoid="PANORAMA_ID",
	file_name="output.png",
	width=2048,
)

The same functions are available from streetview_tools.naver and streetview_tools.kakao.

All three services also provide get_img_face() / save_img_face() for extracting a single perspective view from the panorama, aimed with yaw (left/right, degrees, 0 = forward, positive = right) and pitch (up/down, degrees, positive = up):

from streetview_tools import naver

image = naver.get_img_face(
	panoid="PANORAMA_ID",
	yaw=45,
	pitch=10,
	width=800,
)
path = naver.save_img_face(
	panoid="PANORAMA_ID",
	yaw=45,
	pitch=10,
	width=800,
)
# PANORAMA_ID.png

There is no fov argument; the field of view is derived from width/height instead:

  • Both omitted: the panorama's default face size is returned (usually 1024x1024).
  • Only width: a width x width square is returned.
  • Both width and height: a width x height rectangle is returned. The horizontal field of view stays fixed and the vertical field of view expands or shrinks to match the requested aspect ratio, so a taller output captures more sky/ground rather than stretching the image.

get_img_face() returns one PIL image and save_img_face() returns one output path — there is no direction list/array form.

get_img_face() / save_img_face() only download the source tiles (or, for Naver cubic panoramas, the direction faces) that overlap the requested view, plus a small safety margin, instead of the whole panorama. Skipped areas play no part in the output.

The same get_img_face() / save_img_face() functions can convert Naver equirectangular images by passing proj_type="equirect" (cubic is the default). For cubic panoramas, the six direction tiles are stitched into an equirectangular image internally before the perspective view is extracted. Google and Kakao panoramas are already equirectangular and are used directly.

get_img() / save_img() take separate width/height arguments (see above) that always produce a 2:1 equirectangular image. If either is provided, the output is always 2:1. When both are provided, width takes precedence. For example, width=1024, height=900 produces a 1024 x 512 image, while height=512 produces a 1024 x 512 image. An odd width is rounded down to the nearest even width so the final image can remain exactly 2:1.

When width is provided, the smallest available zoom that is at least as wide as the requested output is downloaded first, then resized to the final size. Without width, each service's default zoom is used. zoom is an internal implementation detail and is not part of the public function arguments.

This package accesses public web endpoints used by each map service. Endpoint formats and availability may change independently of this package.

Pass save_json=True to save_img() or save_img_face() to save the get_pano_info() result beside the image. For example, pano.png produces pano.json.

For save_img_face(), the JSON angle is adjusted by adding yaw degrees and normalizing to 0-360 degrees.

Release files for streetview-tools 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for streetview-tools 0.2.0
File Size Uploaded
streetview_tools-0.2.0.tar.gz 11.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for streetview-tools 0.2.0
File Interpreter ABI Platform
streetview_tools-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 27.3 kB

Release files / streetview_tools-0.2.0.tar.gz

Download URL streetview_tools-0.2.0.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c7334e7b57b576684056975ff44ec2922a3ae6393f5fb17a11c03efa60d96315
BLAKE2b-256 checksum
How to use checksums
7ed15ef8fcc1fba8eb89c820eba541ce4bb752dbfef35b2246b041b286496fef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / streetview_tools-0.2.0-py3-none-any.whl

Download URL streetview_tools-0.2.0-py3-none-any.whl
Size 15.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e9ae9f3268bc8b294b7502b150cf50c1d7dcde71676754517cc8faad555ddc2e
BLAKE2b-256 checksum
How to use checksums
bc248e14d5b40bfe0fe7ce27c0d118c8274440746e34dc45aa93d25d95f9a3c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page