zensvi.download.AMSDownloader¶
- class zensvi.download.AMSDownloader(log_path=None, max_workers=None, verbosity=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¶
Property for the number of workers for parallel processing.
- Returns:
max_workers
- Return type:
int
- property verbosity¶
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, cropped: bool = False, lat: float = None, lon: float = None, input_csv_file: str = '', input_shp_file: str = '', input_place_name: str = '', buffer: int = 0, distance: int = 10, start_date: str = None, end_date: str = None, metadata_only: bool = False, grid: bool = False, grid_size: int = 100, max_workers: int = None, verbosity: int = 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) – Grid parameter for the GeoProcessor. Defaults to False.
grid_size (int, optional) – Grid size parameter for the GeoProcessor. Defaults to 1.
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¶
Property for log_path.
- Returns:
Path to the log file
- Return type:
str