AmericanRedCross / street-view-green-view

BSD 3-Clause "New" or "Revised" License
8 stars 9 forks source link

use Mapillary API to retrieve image for each point #7

Closed danbjoseph closed 3 months ago

danbjoseph commented 5 months ago

download 1 image for each point. if no image is available within 10 meters of the point, flag it somehow in the eventual ouput.

danbjoseph commented 4 months ago

@dragonejt as you look at incorporating this into the overall process, remember that the first step is to ingest a roads file and create a sample of points (e.g. every 20 meters). in this second step, in addition to fetching a single image for each point and saving the image to disk, we want to associate each file with each point (e.g. by adding a property to the point that stores the filename and any other useful metadata from Mapillary). we will want to somehow record if there is not an image available (e.g. within perhaps half of the DEFAULT_MINI_DISTANCE that was used in step 1 - as we don't want the same image for 2 different points).

and later, instead of just finding the closest image, we will want to be able to pass filter(s) such as for captured_at (e.g. to limit to the season when trees are leafed out, or for images from only the current year) and for one or more creator (e.g. to limit to only images a particular project team has captured).

dragonejt commented 4 months ago

Yeah, I think a good next step would be to implement a data parser to parse the roads file zip and get the list of points, specifically their longitudes and latitudes. I think during the image download process, it is possible to write a JSON file where the keys are the longitudes and latitudes and the values are the image file path or id, or an error if it wasn't able to download that image.