pycitydata.streetview.google¶
Module Contents¶
Classes¶
Data¶
API¶
- pycitydata.streetview.google.__all__¶
[‘Panorama’, ‘GoogleStreetView’]
- class pycitydata.streetview.google.Panorama¶
- pano_id: str¶
None
- lat: float¶
None
- lon: float¶
None
- heading: float¶
None
- pitch: Optional[float]¶
None
- roll: Optional[float]¶
None
- date: Optional[str]¶
None
- class pycitydata.streetview.google.GoogleStreetView(meta: pycitydata.streetview.google.Panorama, zoom: int = 4, headers: Optional[Dict[str, str]] = None, proxies: Optional[Dict[str, str]] = None)¶
Initialization
- property heading: float¶
获取拍摄时的朝向(单位:度)(统一到百度的heading计算方式上) Get the direction when the photo was taken (unit: degree) (unified to the heading calculation method of Baidu)
- static _extract_meta(text: str) List[pycitydata.streetview.google.Panorama]¶
从panoids端点的有效响应中返回所有全景图的列表。 Given a valid response from the panoids endpoint, return a list of all the panoids.
- static search(lng: float, lat: float, zoom: int = 4, headers: Optional[Dict[str, str]] = None, proxies: Optional[Dict[str, str]] = None, cache_dir: Union[str, pathlib.Path, None] = None) pycitydata.streetview.google.GoogleStreetView¶
获取最接近GPS坐标的全景图(ids)。 Gets the closest panoramas (ids) to the GPS coordinates.
Args:
lng: 经度 (WGS84)。Longitude (WGS84).
lat: 纬度 (WGS84)。Latitude (WGS84).
zoom: 缩放级别,越大图像质量越高,最大为4(可选,默认为4)。Zoom level, the larger the image quality, the higher the maximum is 4 (optional, default is 4).
proxies: 代理(可选)。Proxies (optional).
cache_dir: 缓存目录,若为None则不缓存。Cache directory, if None, no cache.
Returns:
sv: 街景图片。Street view image.
- _query_img()¶
下载Google全景图 Downloads a streetview panorama.