

MIT Globe Genie (Random Street View) - chaosmachine
http://web.mit.edu/~jmcmicha/www/globegenie/

======
dangoldin
Makes you realize how rural the world actually is. You lose sight of that
living in a big city.

~~~
ugh
You might think that trees rule this world.

~~~
Groxx
Agreed. They're already using squirrels for reproduction / child rearing /
getting them young 'uns out of the house. And once you control the squirrels,
you're not far from controlling _everything_....

------
Groxx
Looks like they're randomly dropping the viewer until they get a hit (I've
gone over "searching (600)"). I wonder if there's a faster way to do that with
their API?

~~~
bd
Completely random drop would fare really bad (street view is very rare
compared to Earth's surface).

What I would do is a sort of "computer vision". Map has well defined colors
for features, so you just need to check pixels with proper shading.

This should be quite easy as street view availability seems like a transparent
overlay image, so you even wouldn't need to distinguish it from other map
features.

And even if it's composited with the map image server-side, it should be still
quite easy to extract it, just look for pixel diff compared to normal map
image.

~~~
aroon
In the time it took to act smart you could have just read the code and seen
that his intuition was mostly right. The code is extremely simple. It reads
like a half day project just for fun that happened to get picked up on HN. It
doesn't seem to be at all related to his line of study either.

For you interest and information, he has a defined set of bounding boxes in
the world for each of the user pickable regions. He generates random lat lons
until one lands in an enabled region's bounding box and then makes a request
for street view data to google. If google returns a 200 he sets the street
view display to the lat Lon and otherwise tries to find another lat Lon. If he
ever gets a 500 from Google he quits.

~~~
bd
I don't understand your comment.

I wasn't trying to figure out how it was done, I was trying to figure out how
to do it fast (irrespective of the present implementation), responding to the
question:

 _"I wonder if there's a faster way to do that with their API?"_

I did check the source code. The most time is spent doing dozens to hundreds
requests to Google API.

If instead of this you generated random locations just from "blue" regions of
StreetView coverage, user experience would be better.

The simplest way how to do it would be to fetch StreetView coverage overlay
PNG and use canvas getImageData to check pixel values for random locations,
thus moving costly roundtrip validity query mostly to the browser.

This is not something terribly difficult and perfectly suitable for half day
fun project.

~~~
blasdel
You can't use getImageData within a <canvas> element that has cross-domain
data as children. Otherwise it'd be the ultimate cross-site scripting hole!

It's not something terribly difficult — it's something that is completely
impossible for a very good reason.

~~~
bd
If only :).

There are ways how to get around cross-domain security restrictions. Long ago,
I have done it myself by a simple server-side proxy here (few lines of PHP):

<http://alteredqualia.com/visualization/evolve/>

About Globe Genie optimization. In fact, I implemented it, sent a patch to the
author and it's already live there (check the source code). It cuts cross-
network locations validity lookups by about 60%.

Here I didn't do proxy, just fetched a complete set of overlay tiles once and
stitched them together with a Python script:

[http://alteredqualia.com/tmp/gg_overlay_optimization/data/ov...](http://alteredqualia.com/tmp/gg_overlay_optimization/data/overlay.png)

It's just a static prebaked lookup map (served from the same domain), though
if you really want to have it up-to-date, you could hook up Python script to
cron.

All this took few hours (Sunday evening hacking) and was quite fun to do.

------
harshpotatoes
I didn't realize how much of the world Google had mapped... It seems like just
last year that Seattle wasn't even included yet...

~~~
nostrademons
On the contrary, I'm amazed at just how much of Africa is South Africa.

Out of maybe a dozen tries, I have had _one_ African hit that was not in South
Africa, and that was a Spanish-owned island off the coast of the Sahara.

~~~
bd
Sampling bias.

Try normal Google Maps, zoom out to see the whole world. Drag yellow
StreetView dude, you will see blue overlay showing StreetView coverage (ignore
isolated dots, these are Panoramio photos).

You will see that South Africa is the only place in Africa with coverage.

~~~
nostrademons
Right, that was my point. I was trying to be ironic with my claim that all of
Africa is South Africa.

------
vyrotek
Ah... I have to admit, it made me smile. It randomly brought me to Italy and
to an area I knew pretty well (Torino/Milano). I have family over there :)

~~~
Towle_
Randomly? Sure, some MIT guy made it... _but this is Google we're talking
about_. ;)

------
raghus
I lack the skills to write it but it would be great if I could enter the
addresses of two US locations and a website took me for a virtual drive along
the route by using Google Maps + Street View

~~~
astrofinch
Maybe someday we'll never need to get up from our computers

~~~
raghus
Dunno about that but I am just hoping to either re-live a memory or, waste
some random time virtually driving between cities I may not be able to visit
anytime soon.

------
chriskelley
This really puts the amount of data Google had acquired for Streetview into
perspective.

It took me from the Rhondda Valley in Wales, to Fresno, CA, to Virrat,
Finland.

The breadth is amazing.

------
hermanthegerman
I love it, but why does it take so much time for 'searching' ? Is it
generating random coordinates and then tries to match them with street view
coverage ?

------
chris24
This is awesome. Anyone know how to link someone to a specific location that I
found with this?

------
hermanthegerman
Besides the caching question, having permalinks to share that random view
would be awesome.

------
bconway
Fun tool. It's what I imagine living Quantum Leap to be like. ;)

------
sebastianavina
now I want to travel around the globe :(

------
Estragon
A web page which gives a google street view of a random location somewhere in
the world. Not sure why this is interesting.

~~~
chaosmachine
It's interesting because the world is so large. It's interesting because you
never know what you're going to see. It's interesting because most people
wouldn't even dream this was possible just a few years ago.

~~~
mkr-hn
It's like StumbleUpon for the planet.

