zensvi.download.AMSDownloader

class zensvi.download.AMSDownloader(log_path: str | None = None, max_workers: int | None = None, verbosity: int = 1)

Bases: zensvi.download.base.BaseDownloader

Amsterdam Street View Downloader class.

Parameters:
  • log_path (str, optional) – Path to the log file. Defaults to None.

  • max_workers (int, optional) – Number of workers for parallel processing. Defaults to None.

  • verbosity (int, optional) – Level of verbosity for progress bars. Defaults to 1. 0 = no progress bars, 1 = outer loops only, 2 = all loops.

property max_workers: int | None

Property for the number of workers for parallel processing.

Returns:

max_workers

Return type:

int

property verbosity: int

Property for the verbosity level of progress bars.

Returns:

verbosity level (0=no progress, 1=outer loops only, 2=all loops)

Return type:

int

download_svi(dir_output: str, path_pid: str | None = None, cropped: bool = False, lat: float | None = None, lon: float | None = None, input_csv_file: str = '', input_shp_file: str = '', input_place_name: str = '', buffer: int = 0, distance: int = 10, start_date: str | None = None, end_date: str | None = None, metadata_only: bool = False, grid: bool = True, grid_size: int = 50, max_workers: int | None = None, verbosity: int | None = None) None

Download street view images from Amsterdam Street View API using specified parameters.

Parameters:
  • dir_output (str) – The output directory.

  • path_pid (str, optional) – The path to the panorama ID file. Defaults to None.

  • cropped (bool, optional) – Whether to crop the images. Defaults to False.

  • lat (float, optional) – The latitude for the images. Defaults to None.

  • lon (float, optional) – The longitude for the images. Defaults to None.

  • input_csv_file (str, optional) – The input CSV file. Defaults to “”.

  • input_shp_file (str, optional) – The input shapefile. Defaults to “”.

  • input_place_name (str, optional) – The input place name. Defaults to “”.

  • buffer (int, optional) – The buffer size. Defaults to 0.

  • distance (int, optional) – The sampling distance for lines. Defaults to 10.

  • start_date (str, optional) – The start date for the panorama IDs. Format is isoformat (YYYY-MM-DD). Defaults to None.

  • end_date (str, optional) – The end date for the panorama IDs. Format is isoformat (YYYY- MM-DD). Defaults to None.

  • metadata_only (bool, optional) – Whether to download metadata only. Defaults to False.

  • grid (bool, optional) – Use an equal-distance grid to generate sample points instead of the OSM street network. Defaults to True (faster and avoids the slow, network-dependent Overpass lookup); set False to sample along the street network.

  • grid_size (int, optional) – Grid cell size in meters when grid is True. Defaults to 50.

  • max_workers (int, optional) – Number of workers for parallel processing. If not specified, uses the value set during initialization.

  • verbosity (int, optional) – Level of verbosity for progress bars. If not specified, uses the value set during initialization.

Returns:

None

Raises:

ValueError – If neither lat and lon, csv file, shapefile, nor place name is provided.

property log_path: str | None

Property for log_path.

Returns:

Path to the log file

Return type:

str