https://github.com/jacobwhall/python-earth-view
Python API for Google Earth View image gallery
https://github.com/jacobwhall/python-earth-view
Last synced: 24 days ago
JSON representation
Python API for Google Earth View image gallery
- Host: GitHub
- URL: https://github.com/jacobwhall/python-earth-view
- Owner: jacobwhall
- License: gpl-3.0
- Created: 2023-02-04T05:08:38.000Z (about 2 years ago)
- Default Branch: trunk
- Last Pushed: 2023-02-04T06:24:54.000Z (about 2 years ago)
- Last Synced: 2025-04-06T04:13:58.741Z (27 days ago)
- Language: Python
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# python-earth-view
[Google Earth View](https://earthview.withgoogle.com/) is a gallery of at least 2,604 visually appealing satellite images. Each has a resolution of 1800x1200, making them suitable wallpapers or placeholder images. For example, there's a [Chrome extension](https://chrome.google.com/webstore/detail/earth-view-from-google-ea/bhloflhklmhfpedakmangadcdofhnnoh) that displays a new Earth View image each time you open a new tab, and a [GNOME extension](https://github.com/neffo/earth-view-wallpaper-gnome-extension) that regularly sets the wallpaper to a new Earth View image.
I wrote this package to make it a little bit easier to hit the ground running with Earth View images.
It provides a command-line tool and Python API that make it easy to download images and access their metadata.## How to use
Install using pip:
```sh
pip install earth-view-api
```### In Python
```python
from earth_view import EarthViewImage
```
By default, initializing an EarthViewImage will download a random image:```python
>>> my_image = EarthViewImage()
>>> print(my_image.geocode("establishment"])
Volcán Isluga National Park
```
If you want, you can request a specific image ID:```python
# id parameter can be int or str
specific_image = EarthViewImage(1004)
```Save it for later:
```python
# if you don't specify path, default is your current working directory
EarthViewImage().save(path="/home/user/Desktop")
```### Command-line
The `earth-view` command makes it easy to download a new Earth View image.
```sh
# download a random image to the current directory
earth-view# download a specific image to your Downloads folder, overwriting if file exists
earth-view ~/Downloads --id 1004 --overwrite
```## A word of warning
This package entirely relies on a free service hosted by Google.
At any time, Google may decide to end the service.
Enjoy it while it's here.## Contributing
Feel free to file an issue, submit a pull request, or reach out to me directly.
I'd love to hear from you.## License
This code is licensed under GPLv3 or any later version. See LICENSE.md for more information.