Having in mind that the rate limit for the tiles.mapillary.com
endpoint is limited to 50,000 requests per day, how would I manage to fetch traffic signs from a large area of interest? Because that would be done using https://tiles.mapillary.com/maps/vtp/mly_map_feature_traffic_sign/2/{z}/{x}/{y}
. I thought I would first ask to check if there exists something already (in Python). The SDK has some issues; for instance, if one of the tile of interests (within the bbox I pass the traffic_signs_in_bbox
method) does not have any trips (for instance, it only contains water) then the call throws a KeyError: "value"
(check photo - tested for a small region, Monaco).
My solution: I was thinking maybe first getting the zoom_level_6_intersecting_tiles for my area of interest and then incrementally filtering out those that do not have any trips, while increasing the zoom level step by step.
More precisely: first iterate through the zoom_level_6 tiles checking which of these tiles have trips. First, pop the first tile in the queue. If this current_tile has trips, expand the current list of zoom_level_6_tiles with the children tiles of the current_tile. Otherwise, further ignore the children of this tile (do not expand the queue with anything). Repeat this until the current_tile is of zoom level 14.
The reason I though of this is because: the more I get into depth, the higher the chances to find a tile with no trips, which results in fewer requests (because if I filter out -say- one zoom_level_8 tile, then I get rid of 4^(14-8) = 4^ 6 = 4096 unnecessary requests).
Would this be feasible? Or do you have any other suggestions? If something was unclear, please say so. Thanks!