Download Mapilarry images with API v4

Hi,

I’m using python. Given coordinates, I’d like to download the nearest image from Mapilarry. How do I do this?

Thanks

3 Likes

Exactly the question I’m looking for an answer for.
Surprised the document has nothing for it.

@LiamMacLean Here is a good way to get images in a bounding box, which you can adapt to do a distance search. We may have some new tools soon to make this even easier in Python.

https://gist.github.com/cbeddow/74b3bb7f7d69f52a7b0fc0e221be5ff5

1 Like

@chrisbeddow I think that script only download the metadata, not the images itself. Perhaps we can download images using its id?

This script will get the JPGs for you: Download Mapillary images a JPGs · GitHub

2 Likes

Thank you! I’ve been looking for this.

Is there a way to download GPS position of the single images and the track (GPX, maybe JSON) ?

You can download tiles with image locations and ids as geoJSON from mly1_public layer.

This is how I have done it - random-mapillary-stuff/mapillary_v4_downloader.py at master · taneljairus/random-mapillary-stuff · GitHub

2 Likes

Thanks. I will try it !

Hey @chrisbeddow – any plans to expose raw (unprocessed) URL to the owner for download? Seems this has been removed from the response when querying sequences from authenticated owner (only processed image links).

1 Like

I noticed the option to download the raw copy has been removed from the UI too.

2 Likes

No explicit plan for this right now, but it’s good that you ask so I can mark this as a request. Can you remind me how exactly you use this?

2 Likes

Hey @chrisbeddow the use case would be backup. Sometimes I don’t have the photos locally available, and access to a Mapillary copy of the original is a nice to have for me. For me, it’s low priority (just something I noticed missing, really).

1 Like

Hi all,
I am new to the Mapillary API and have tested it´s capabilities in the recent days. With the JPG download script from @chrisbeddow I am experiencing that after some time(~20MB) the network breaks down and I cannot continue to download the street imagery. I have tested it from several locations (home, work, with and without VPN) and it is not possible to download a larger region with a hand full of tiles. The procedure fails already on the first tile (Tile 14/4393/6051).
Do you have any clue why this is the case? Is there maybe a limit set for downloads? The script is getting stuck on line 50.

I am thankful for any kind of help - thanks!

Hi again,
I figured out that from time to time timeouts appear. I have changed the code so that timeouts and retries are considered for the thumbnail creation and -download. Now it works like a charm for hundreds of thousands of images.

Thanks for the feedback! If you share your code I can add the timeouts to the example probably. Glad you found it working.

Hi @chrisbeddow, thanks for your response! Please find the project here: https://github.com/tobesucht/mapillary_downloader
The downloader has to be started via app.py. The connection-handling is defined in lines 25-29 and 37 in mapillary_processor.py as well in line 37 in image_downloader.py.
I hope you like the solution.
Cheers

In reply to your request for a option to download the raw - un compressed/processed images, I would also be very interested in such a feature to be re-implemented for backup and alternate processing.
@chrisbeddow - any information on the state of the request would be welcome.

download the raw - un compressed/processed images

I am not sure what exactly you are looking for but by policy and technical feasibility only processed compressed images are stored by Mapillary. And imho, this is probably not going to change, and rightly so.

So it is not possible to save a image in a resolution that is higher than the 2048 thumb-nail ?
And How would I be able to limit the image search to only include specific users or Organization_id’s?
Sample code would be very welcome