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.
- Go to
https://www.mapillary.com/dashboard/developers - Click
Register application - Fill in any details you like
- Unforunately, you need to add a redirect URL and a company website. But these can be any value
- The app must have read permission.
- 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.
Metadata
Release files for mapillary-nearby 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mapillary-nearby-1.1.0.tar.gz | 3.8 kB | Without provenance | Details for mapillary-nearby-1.1.0.tar.gz |
Release files / mapillary-nearby-1.1.0.tar.gz
| Download URL | mapillary-nearby-1.1.0.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a976426ba6ffd324a1ef6ad405bb413654a87842c46a9e6059bf02eebe0754b
|
|
BLAKE2b-256 checksum How to use checksums |
5ddf95a9ca820d8398fd6743f1988af104b71b847e377951b7ce789bf70ac297
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Security for mapillary-nearby 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.