A Python package for geospatial analysis and interactive mapping in a Jupyter environment.
Build a utility that discovers street-level imagery around a location, downloads a small sample, presents it on an interactive map, and produces a simple GIF from the retrieved frames. The focus is on using the package's Mapillary imagery helpers and related media utilities.
[west, south, east, north], an access token, optional ISO 8601 start/end timestamps, and a limit, return imagery metadata sorted by capture time and constrained to the limit. Each record must include an id, coordinates, capture timestamp, and an image URL. @test@generates
from pathlib import Path
from typing import Iterable, List, Mapping, Optional, Sequence
def fetch_mapillary_metadata(
bbox: Sequence[float],
access_token: str,
limit: int = 10,
start_time: Optional[str] = None,
end_time: Optional[str] = None,
) -> List[Mapping[str, object]]:
"""Return imagery metadata within bbox ordered as [west, south, east, north], sorted by capture time ascending; each record must include id, coordinate tuple (lon, lat), captured_at ISO string, and image_url."""
def download_mapillary_images(
metadata: Iterable[Mapping[str, object]],
output_dir: Path,
max_items: Optional[int] = None,
overwrite: bool = False,
) -> List[Path]:
"""Download image assets referenced by metadata to output_dir, reusing existing files when allowed, and return saved paths in capture order."""
def build_mapillary_viewer(
metadata: Iterable[Mapping[str, object]],
basemap: Optional[str] = None,
show_tracks: bool = True,
):
"""Create an interactive map widget with markers and popups for each image plus optional coverage lines, ready for notebook or HTML embedding."""
def create_imagery_gif(
images: Sequence[Path],
output_path: Path,
fps: int = 2,
) -> Path:
"""Create a GIF timelapse from ordered images at the given frame rate and return output_path."""Provides Mapillary imagery search, download, visualization, and media helpers.
tessl i tessl/pypi-leafmap@0.52.0docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10