Street-level imagery¶
Twelve services behind the same handful of verbs: find panoramas near a point, fetch one by ID, get or download the image.
A Mapillary image with Mapillary’s own segmentation drawn on top — see street assets. Image CC BY-SA 4.0 via Mapillary.¶
The pattern¶
from mirrorworld import mapillary
pics = mapillary.find_panoramas(51.5074, -0.1278, radius=50, panos_only=True)
pano = mapillary.find_panorama_by_id(pics[0].id) # adds camera, corrected pose and image URLs
mapillary.download_panorama(pano, f"{pano.id}.jpg", size="original")
images_in_sequence = mapillary.get_sequence(pano.sequence_id)
from mirrorworld import panoramax
pics = panoramax.find_panoramas(51.5088, -0.1270, radius=30)
panoramax.download_panorama(pics[0], f"{pics[0].id}.jpg", size="hd")
from mirrorworld import kartaview
photos = kartaview.find_panoramas(47.6062, -122.3321, radius=100)
for photo in photos: # closest first
try:
kartaview.download_panorama(photo, f"{photo.id}.jpg")
break
except RuntimeError: # some old photos have been removed from KartaView's storage
continue
from mirrorworld import streetview
pano = streetview.find_panorama(46.883958, 12.169002)
streetview.download_panorama(pano, f"{pano.id}.jpg")
Services¶
Service |
Module |
Coverage |
Licence / access |
|---|---|---|---|
Mapillary |
|
worldwide, crowd-sourced; dense in many cities |
CC BY-SA 4.0, free token |
KartaView |
|
worldwide, patchy |
CC BY-SA 4.0, no key |
Panoramax |
|
federated; strongest in France |
mostly CC BY-SA 4.0, no key |
Google Street View |
|
worldwide |
internal API |
Apple Look Around |
|
selected countries |
internal API |
Bing Streetside |
|
US, parts of Europe |
internal API |
Yandex, Baidu, Kakao, Naver, Mapy.cz, Já 360 |
|
their home countries |
internal APIs |
The open platforms (Mapillary, KartaView, Panoramax) mix 360° panoramas with ordinary photos; check
pano.is_equirectangular (or is_pano on Mapillary). Headings are radians, 0 = north, clockwise.
Provider quirks we handle for you
Mapillary’s bounding-box search fails in dense cities, so
find_panoramasreads Mapillary’s vector coverage tiles instead and returns results closest first.Panoramax’s own point search returns pictures looking at a place;
find_panoramasreturns pictures taken near it.KartaView storage hosts are flaky; downloads fall back to its CDN copy automatically.
Async¶
import asyncio
from aiohttp import ClientSession
from mirrorworld import mapillary
async def main():
async with ClientSession() as session:
pics = await mapillary.find_panoramas_async(51.5074, -0.1278, session, radius=50)
await mapillary.download_panorama_async(pics[0], "p.jpg", session, size="2048")
asyncio.run(main())
API: mirrorworld.mapillary: Mapillary · mirrorworld.panoramax: Panoramax · mirrorworld.kartaview: KartaView · mirrorworld.streetview: Google Street View and the other providers in the reference.