Giter Club home page Giter Club logo

mapillary-search's Introduction

mapillary-search

A tool that searches the Mapillary database for images within a specific bounding box.

  • Using Mapillary's API, we can further add features to narrow our search.
  • Further, we can restrict the images to those uploaded within a certain date range (TODO)

This is an attempt to create an updated version of scripts used in geolocation photo retrieval automation, as these guides use defunct APIs like that of Wikimapia and Panoramio.

  • Unfortunately, Mapillary appears to be mostly consisting of crowd-source images of roads.

Installation

Ensure you are within the mapillary-search directory.

pip install -r requirements.txt

Next, obtain an access token from Mapillary via this link: https://www.mapillary.com/dashboard/developers

Replace line 8 of mapillary_search.py with the Client Token:

# API Details
#TODO: Replace API key below
API_KEY = "MLY|123412341234|123412341234"

Usage

python3 mapillary_search.py southwest northeast [-l limit] [-d detections]
  • southwest: The south-west corner of your bounding box, expressed as Latitude, Longitude within quotes. Example: "1.3518580962691118,103.93356798061131". No, I don't stay at these coordinates.
  • northeast: The north-east corner of your bounding box, expressed as Latitude, Longitude within quotes. Example: "1.3552656368803468,103.93720991127293"
  • limit: The maximum number of images to be extracted, ignoring images that have been filtered out by detections.
  • detections: Features of the image to further narrow the search,
    • See this link for a full list of possible detections. Note that our tool does not support the detections that are unavailable for bounding box search.
    • This uses Mapillary's API to extract features of the image such as signs, trash-cans.
    • When entering the detections, enter the value of the detection, separated by commas without spaces.
    • Example: object--sign--advertisement,object--trash-can to search for images with either Advertisement Signs or Trash Cans.

The tool will then generate a HTML file with every extracted image. Clicking on the image links to an OpenStreetMap URL with a marker on the exact coordinates of the image.

Example

Input:

py .\mapillary_search.py "1.3518580962691118,103.93356798061131" "1.3552656368803468,103.93720991127293" -l 10 -d object--sign--advertisement,object--trash-can

Output:

[*] Saving to log file...
[*] Saved 5 images to: mapillary-search\log\Log_2023-12-23_09-09-05.html

example_image.jpg

TODO

  • Implement the date range filter.

mapillary-search's People

Contributors

rye123 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.