• Stars
    star
    121
  • Rank 292,303 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created about 3 years ago
  • Updated almost 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Google Maps keeps old satellite imagery around for a while โ€“ this tool collects what's available for a user-specified region in the form of a GIF.

google-maps-at-88-mph

The folks maintaining Google Maps regularly update the satellite imagery it serves its users, but outdated versions of the imagery are kept around for a year or two. This Python-based tool automatically crawls its way through these versions, figuring out which provide unique imagery and downloading it for a user-defined (that's you! you get to define things!) area, eventually assembling it in the form of a GIF.

This weekend project is based on รฆrialbot, a previous weekend project of mine.

Scroll down to learn how to set it up on your machine, or stay up here for some examples.

There's usually two or three different views of any given area available in the "version history", which can yield neat 3D effects (the <img title=""> attributes contain the invocations used to generate them):

For areas of the world that have changed significantly recently, flipping through the imagery versions is almost like a timelapse โ€“ consider the port of Beirut before and after the 2020 explosion on the left, or the perpetually-over-budget-and-behind-schedule construction of the new Stuttgart central station on the right.

It's also fun to look at airports and center pivot irrigation fields through the lens this tool provides:

As an alternative to the usual straight-down imagery, which is great for navigating but obscures the verticality of buildings and structures, Google Maps also provides oblique views shot at a 45-degree angle โ€“ from all of the four cardinal directions โ€“ for many urban areas. This kind of imagery looks great wherever skyscrapers are around โ€“ say, in New York City:

Because Google regularly removes the oldest available versions, all of this is rather ephemeral โ€“ a year from now (which, at the time of writing, was July 2021), the invocations of this tool that have created the GIFs above may yield totally different results. Longer-term timelapses of the surface of our planet can be found on Google Earth Timelapse (or through @earthacrosstime, another weekend project of mine, namely a Twitter bot that posts randomly selected timelapses off it), but what's available there doesn't reach the high resolution of Google Maps (and isn't available for 45-degree views).

Setup

Being a good Python 3 citizen, this tool integrates with venv to avoid dependency hell. (Although it only requires the Pillow and requests packages.) Run the following commands to get it installed on your system:

$ git clone https://github.com/doersino/google-maps-at-88-mph
$ python3 -m venv google-maps-at-88-mph
$ cd google-maps-at-88-mph
$ source bin/activate
$ pip3 install -r requirements.txt

(To deactivate the virtual environment, run deactivate.)

Usage

Once you've set everything up, run the following command:

$ python3 googlemapsat88mph.py --help

That'll wax poetic about the available command-line flags and arguments. Importantly, there are three positional arguments, i.e., you've got to set these:

  1. The latitude-longitude pair you're interested in, along with
  2. how wide (east-west extent) and...
  3. ...how tall (north-south extent, both in meters) the downloaded area should be.

Along with those three, you need to supply a value for at least one of the -m, -w, and -h flags โ€“ the --help output explains them in detail.

For example, the following invocation will create the first of the GIFs embedded above, showing the White House:

$ python3 googlemapsat88mph.py 38.900068,-77.036555 1000 1000 -w 500

That's basically it! For your viewing pleasure, here's a video of the CLI in action (slightly outdated; the -d flag for 45-degree imagery has been added since), first scrolling through the --help output, then executing the command from above:

cli.mp4

FAQ

Why the name?

Because when this baby hits 88 miles per hour, you're gonna see some serious shit.

Why did you make this tool?

I became aware of how Google Maps versions its imagery as a side-effect of building and maintaining รฆrialbot. Figuring out a way to explore past imagery seemed super interesting โ€“ note that initially, I wasn't sure how far back the available imagery would go. Finding out that it's only about a year was a bit of a letdown, but there's still some gems to be found either way. The ephemerality aspect also appeals to me.

Does this violate Google's terms of use?

Probably. I haven't checked. But they haven't banned my IP for downloading tens of thousands of map tiles during development and testing (of รฆrialbot and this), so you're probably good as long as you don't use this tool for downloading a centimeter-scale map of your country. What's more, I can't think of a way in which this tool competes with or keeps revenue from any of Google's products. (And it's always worth keeping in mind that Google is an incredibly profitable company that earns the bulk of its income via folks like you just going about their days surfing the ad-filled web.)

Something is broken โ€“ can you fix it?

Possibly. Please feel free to file an issue โ€“ I'll be sure to take a look!

More Repositories

1

aerialbot

A simple yet highly configurable Mastodon/Twitter bot that posts geotagged aerial imagery of a random location in the world.
Python
217
star
2

uji

A minimalist generative art thing โ€“ press the buttons and play with the sliders!
JavaScript
183
star
3

nyum

A simple Pandoc-powered static site generator for your recipe collection โ€“ it effortlessly turns a set of Markdown-formatted recipes into a lightweight, responsive, searchable website.
HTML
178
star
4

markdeep-slides

Build presentation slides with Markdeep and present them right in your browser.
JavaScript
167
star
5

tixyz

A minimalist three-dimensional coding environment. Control 8x8x8 dots with a single JavaScript function.
JavaScript
157
star
6

markdeep-thesis

Write your (under)graduate thesis with Markdeep and typeset it right in your browser.
JavaScript
143
star
7

handwriting

A SQL implementation of an ancient handwriting recognition algorithm.
TeX
78
star
8

cellular-automata-posters

Simple Python script that generates cellular automata posters as PDF files.
Python
55
star
9

scriptable-widgets

A collection of Scriptable widgets I've built.
JavaScript
43
star
10

UnicodeMathML

JavaScript-based translation of UnicodeMath to MathML that can be integrated into arbitrary HTML or Markdeep documents. An interactive "playground" allows for experimentation with the syntax and insight into the translation pipeline.
JavaScript
40
star
11

earthacrosstime

Mastodon/Twitter bot that posts videos showcasing how random locations in the world have changed since 1984.
Python
39
star
12

markdeep-diagram-drafting-board

Draft Markdeep diagrams with a live-updating preview overlaid onto your source code.
HTML
28
star
13

apple-photos-export

An Apple Photos export script.
Python
22
star
14

ffmpeg-koraktor

An occasionally-growing selection of FFmpeg invocations that have proven handy in various situations.
17
star
15

hashing-indexes-tikz

LaTeX packages for drawing extendible hashing indexes and linear hashing indexes using TikZ.
TeX
14
star
16

tweakpane-plugin-infodump

Infodump plugin for Tweakpane, provides a text-displaying blade with basic Markdown support intended for long descriptions (i.e., infodumps).
JavaScript
14
star
17

cropcircles

A tool for cropping circular center pivot irrigation fields from aerial imagery.
HTML
9
star
18

ReAD

A PHP-based reading list for web articles. Maintains a searchable archive and computes lots of stats.
PHP
9
star
19

sundryautomata

Mastodon/Twitter bot that posts a randomly generated cellular automaton every 12 hours.
Python
9
star
20

gomati

A simple Google Maps tile downloader and stitcher.
Shell
8
star
21

brachiosaurus

An incredibly basic turtle drawing tool I've built for making generative art with my BrachioGraph pen plotter.
Python
8
star
22

snooker-commentary-generator

Just a silly little toy.
JavaScript
8
star
23

vol

Simple bash script for adjusting the system volume on macOS.
Shell
6
star
24

genuary2022

Code and SVG files underlying the plotter drawings I made for #GENUARY2022.
HTML
4
star
25

spell

Haskell implementation of Peter Norvig's spelling corrector.
Haskell
4
star
26

Tumblr-Themes

The source code of any Tumblr themes I've released to the Theme Garden.
HTML
4
star
27

scripts

Various scripts that don't really necessitate their own repositories
Shell
4
star
28

dotfiles

My dotfiles, plus various other configs.
Shell
3
star
29

cpi-video-creation

A quickly-thrown-together tool for making a series of videos.
Python
3
star
30

wikipediastats

A Haskell-powered Twitter bot that posts milestones and statistics of various Wikipedias.
Haskell
2
star
31

corridor

Simple text adventure game.
Prolog
1
star
32

doersino

1
star
33

acm-boobytraps

My Python 2.7 solution of the ACM Programming Contest problem "Booby Traps", along with a map generator and a LaTeX beamer slide and TikZ map visualization generator.
Python
1
star
34

minecraft-server-utils

A few utility bash scripts that 1. start a vanilla Minecraft server on system boot, 2. keep an up-to-date incremental backup of the world and server files, as well as daily snapshots for the history books, and 3. optionally purge old snapshots whenever disk space runs low.
Shell
1
star