Get all vector tiles with trips in a given bbox for a given time interval

Hello!

I will leave my question here while still investigating on my own. I will update my post once I have good results.

Is there a way to find the vector tiles within a large bbox that contain trips (Python)? Currently, I am first getting all the vector tiles (zoom level 14) that intersect the bounding box -large bounding box, such as the west coast of the US- and then iterating over all of them. While iterating, I use this endpoint `` to check if 'sequence' in json_response; if this is true, then I append the current vector tile to the relevant vector tiles list.

The problem with this approach is that for large bbox areas, I risk surpassing the rate limit (50 thousand requests / day for this endpoint, as the documentation mentions).

I checked the SDK for Python but it seems I cannot achieve this with the SDK, please correct me if I am wrong.

I was also thinking to split my large area into multiple smaller areas which I know for sure contain trips (based on what I see visually on Mapillary when applying the filter for the dates). However, if those areas are numerous, this approach will be tedious. Just to clarify, those areas could be numerous either due to a date interval that is too broad or due to areas within the bbox I gave being frequently mapped by mapillary users.

Is there a way to achieve what I want for large bbox areas?

Best regards,
John

Update: Ok, so what I needed that for was to know how many vector tiles I would need to request using the https://tiles.mapillary.com/maps/vtp/mly_map_feature_traffic_sign/2/{z}/{x}/{y}?access_token=XXX endpoint. My end goal is to fetch traffic signs for a large area of interest, but the SDK method that could do that for me is not working currently (also, from what I’ve seen in the GitHub repository, I think it would simply make a request for each zoom_14 intersecting tile, not each zoom_14 tile that contains trips; thus more than surely exceeding the rate limit)

Now that I made my context clear, I have an idea (for my goal that I’ve just stated, somehow including an answer to the question I asked), not sure if it is going to work, though. Tried it today but very tedious & tiresome.

Here it goes:

  1. Obtain all zoom level 6 tiles that intersect the bbox (easy to do using mercantile.tiles method).

  2. Make request to https://tiles.mapillary.com/maps/vtp/mly1_public/2/{z}/{x}/{y}?access_token={ACCESS_TOKEN} using each of the previously obtained tiles. From each response, grab the sequences’ IDs.

  3. Given a sequence ID, obtain all image IDs in the sequence.

  4. For each image ID obtain the geometry (lat,lon coordinates of the image).

  5. Given this list of coordinates, find the bbox containing all these coordinates (all the photos).

  6. Repeat, while making sure these vector tiles are stored in a set! (Most of the trips span more than just one tile, distance-wise)

  7. For all vector tiles obtained like this (they are of zoom level 14, of course) intersecting the bbox, make corresponding request to https://tiles.mapillary.com/maps/vtp/mly_map_feature_traffic_sign/2/{z}/{x}/{y}?access_token=XXX to find all traffic signs.

  8. Accumulate results from all tiles.

If anyone has a better idea, please say so. I know it’s a lot, but please keep in mind that I tried reducing the amount of requests as much as possible.