|
| 1 | +--- |
| 2 | +sidebar position: 3 |
| 3 | +--- |
| 4 | + |
| 5 | + |
| 6 | +### mapillary.models.api.entities |
| 7 | + |
| 8 | +This module contains the Adapter design for the Entities API of Mapillary API v4. |
| 9 | + |
| 10 | +For more information, please check out [https://www.mapillary.com/developer/api-documentation/](https://www.mapillary.com/developer/api-documentation/). |
| 11 | + |
| 12 | + |
| 13 | +* Copyright: (c) 2021 Facebook |
| 14 | + |
| 15 | + |
| 16 | +* License: MIT LICENSE |
| 17 | + |
| 18 | + |
| 19 | +### class mapillary.models.api.general.GeneralAdapter(\*args: object) |
| 20 | +Bases: `object` |
| 21 | + |
| 22 | +General adaptor for using the API calls defined for the general module |
| 23 | +(mapillary.config.api.general) |
| 24 | + |
| 25 | +The GeneralAdaptor provides functions for getting preprocessed data from the API, through the |
| 26 | +API calls mentioned in the previously mentioned config. |
| 27 | + |
| 28 | +It performs parsing, property handling, easier logic for extracing information, focusing on |
| 29 | +adding a layer of abstraction by removing details of using mercantile, ast, et al, to |
| 30 | +focus on the inputs and outputs of functions |
| 31 | + |
| 32 | +Usage: |
| 33 | + |
| 34 | +``` |
| 35 | +>>> import mapillary |
| 36 | +``` |
| 37 | + |
| 38 | + |
| 39 | +#### fetch_computed_image_tiles(zoom: int, longitude: float, latitude: float, layer: Literal['overview', 'sequence', 'image', 'map_feature', 'traffic_sign'] = 'image') |
| 40 | +Get the image type for a given image. |
| 41 | + |
| 42 | + |
| 43 | +* **Parameters** |
| 44 | + |
| 45 | + |
| 46 | + * **zoom** (*int*) – The zoom to get the image type for. |
| 47 | + |
| 48 | + |
| 49 | + * **longitude** (*float*) – The longitude of the image. |
| 50 | + |
| 51 | + |
| 52 | + * **latitude** (*float*) – The latitude of the image. |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | +* **Returns** |
| 57 | + |
| 58 | + A dictionary containing the image type for the image. |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | +* **Return type** |
| 63 | + |
| 64 | + dict |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | +#### fetch_image_tiles(zoom: int, longitude: float, latitude: float, layer: Literal['overview', 'sequence', 'image', 'map_feature', 'traffic_sign'] = 'image') |
| 69 | +Get the tiles for a given image. |
| 70 | + |
| 71 | + |
| 72 | +* **Parameters** |
| 73 | + |
| 74 | + |
| 75 | + * **zoom** (*int*) – Zoom level of the image. |
| 76 | + |
| 77 | + |
| 78 | + * **longitude** (*float*) – Longitude of the image |
| 79 | + |
| 80 | + |
| 81 | + * **latitude** (*float*) – Latitude of the image |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | +* **Returns** |
| 86 | + |
| 87 | + A dictionary containing the tiles for the image. |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | +* **Return type** |
| 92 | + |
| 93 | + dict |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | +#### fetch_map_features_tiles(zoom: int, longitude: float, latitude: float, layer: Literal['overview', 'sequence', 'image', 'map_feature', 'traffic_sign'] = 'image') |
| 98 | +Get the map features for a given coordinate set |
| 99 | + |
| 100 | + |
| 101 | +* **Parameters** |
| 102 | + |
| 103 | + |
| 104 | + * **zoom** (*int*) – The zoom value to get the map features for |
| 105 | + |
| 106 | + |
| 107 | + * **longitude** (*float*) – The longitude of the image |
| 108 | + |
| 109 | + |
| 110 | + * **latitude** (*float*) – The latitude of the image |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | +* **Returns** |
| 115 | + |
| 116 | + A dictionary containing the map features for the image. |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | +* **Return type** |
| 121 | + |
| 122 | + dict |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | +#### fetch_map_features_traffic_tiles(zoom: int, longitude: float, latitude: float, layer: str) |
| 127 | +Get the map feature traffic for a given coordinate set |
| 128 | + |
| 129 | + |
| 130 | +* **Parameters** |
| 131 | + |
| 132 | + |
| 133 | + * **zoom** (*int*) – The zoom value to get the map features for |
| 134 | + |
| 135 | + |
| 136 | + * **longitude** (*float*) – The longitude of the image |
| 137 | + |
| 138 | + |
| 139 | + * **latitude** (*float*) – The latitude of the image |
| 140 | + |
| 141 | + |
| 142 | + |
| 143 | +* **Returns** |
| 144 | + |
| 145 | + A dictionary containing the map features for the image. |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | +* **Return type** |
| 150 | + |
| 151 | + dict |
| 152 | + |
0 commit comments