Open mvexel opened 1 year ago
@mvexel I want to suggest also: 1) street lamps (generally quite reliable data) and 2) utility poles (not as reliable but very helpful for Youthmappers projects in Africa)
for data retrieval, we have a decision to make
A) we can retrieve the data using the Mapillary API, in small batches because the API does a bbox search with up to 1000 results per request B) we can retrieve it from the vector tiles
I think API is most reliable because it has the most recent data (vector tile can lag in update/regen time when new imagery comes in) and is less complex (no decoding of tiles)
Here is a sample API request batch code in Python attached: api_download.zip
^ above code takes any bbox, and breaks it down into zoom18 sized tiles. Then instead of requesting those vector tiles (Mapillary only serves at zoom 14 anyway), the zoom 18 tiles are smaller bboxes to ensure not going over the response limit of 1000 objects. It iterates through all the smaller bboxes, and retrieves the data, then merges it together into 1 geojson.
For overpass de-dupe, I suggest we make a basic dict of the OSM values for each Mapillary value. Then easy to simply make an Overpass call with a small (10x10 meter or less) bbox as a "radius search"
We may also be able to request the images associated with each object, for previewing. Once we have a list of features we want the user to evaluate, for each feature we need to request like
https://graph.mapillary.com/
This gives us a list of image IDs. Then we can retrieve the image URL for each of the images:
https://graph.mapillary.com/
We can get other image sizes also as needed:
We may also want to add to the list of fields to get image geometry, camera angle, or other attributes, if we want to show image location on the map. See options here: https://www.mapillary.com/developer/api-documentation#image
Breaking out from #1737
Let's work on a first stab at Mapillary integration. The goal here is to enable anyone to create MapRoulette challenges based on sepecifc Mapillary detections classes. Let's start with a limited number of detections:
The main problems to solve are:
A rough description of the workflow would be:
contact person from Mapillary side: @cbeddow