Skip to main content

Get pictures near an location using mapillary suitable for use as wallpaper.

Project description

Mapilliary nearby

@readwithai - X - blog - machine-aided reading - 📖⚡️🖋️

Get photos near a location using the Mapillary open source streetview image database. These are suitable for use as wallpaper.

Motivation

I like to set up my computer so that it reinforces habits. I am planning to visit another country for a while and learn some languages. A nice way to reinforce this and make this real is to regularly set my background to images in this area.

This tool lets you fetch images in an area. Which you can then set as your background using an appropriate tool.

Installation

This program uses the mapillary API. To do this, you must create an app for your use of this url.

  1. Go to https://www.mapillary.com/dashboard/developers
  2. Click Register application
  3. Fill in any details you like
  4. Unforunately, you need to add a redirect URL and a company website. But these can be any value
  5. The app must have read permission.
  6. Once the App is registered copy the client token.

You can then install mapillary-nearby with pipx.

pipx install mapillary-nearby

Usage

Find the latitude and longitude of the location where you want to take images from. I like to use Wikipedia for this - most pages for cities have this information. Get this in decimal rather than minute/second based format.

You can then run, for example

mapillary-nearby --lat 56.156389 --long 10.209722  --radius 5000m  test.jpeg

To fetch a random photo within 5km on this location and write it to test.jpeg

Caveats

Upon using this I immediately wanted to know where the pictures were taken. I may add some sort of feature to display locations on a map.

This tool only fetched an image you need to do the "last mile" of setting he background. On linux systems you can use feh.

This software probably doesn't work with windows - but will be easy to adapt for those familiar with Python. Pull requests to add support for windows will be quickly merged.

Support

This makes use of the very using Mapillary service and dataset which is generating a permanently useable set of data for the entire world.

If you find this tool useful you might consider installing mapillary on your phone and collecting some data when you walk around - which I do quite regularly.

About me

I am @readwithai. I make tools for reading, research and agency sometimes using Obsidian.

You can follow me on X, or bluesky.

You might like to read about computer-aided habit formation.

@readwithai logo

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mapillary-nearby-1.1.0.tar.gz (3.8 kB view details)

Uploaded Source

File details

Details for the file mapillary-nearby-1.1.0.tar.gz.

File metadata

  • Download URL: mapillary-nearby-1.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for mapillary-nearby-1.1.0.tar.gz
Algorithm Hash digest
SHA256 5a976426ba6ffd324a1ef6ad405bb413654a87842c46a9e6059bf02eebe0754b
MD5 cf11a76f499e387f26787ddb160c24a1
BLAKE2b-256 5ddf95a9ca820d8398fd6743f1988af104b71b847e377951b7ce789bf70ac297

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page