

Show HN: Flattest Route - A web app to help you avoid hills in SF - jonny_eh
http://www.flattestroute.com/

======
jonny_eh
The web app was made by my wife while attending Hackbright Academy in SF. I'm
really proud of how much she's progressed in such little time, so wanted to
share what she made with everyone.

<http://www.hackbrightacademy.com/>

~~~
throw_away
Works for Seattle, as well. Thanks!

~~~
dotcoma
What did you mean? Didn't work for me. I need this to avoid hills when running
in Barcelona :)

~~~
fern
Same problem but in Brazil. Now this one is a great idea.

~~~
seanmcdirmid
Seems to have problems in 3D Lausanne Switzerland.

~~~
koenigdavidmj
You know a place is hilly when its name is "3-D".

------
beilabs
Cool app, just a few points.

Love the elevation charts, really well done.

One route indicated the lane cove tunnel in Sydney, a place where I can't run
or cycle, I could get squished.

Would be interesting to use long/lat co-ordinates, could be really great for
bushwalkers and their specific location.

Combine this with something like zombie-run, have the zombies attack at the
bottom of a hill/vice versa, you could have a hit with the hard core running
community.

Would be nice to see the alternative routes, not just the flattest, but maybe
challenging ones, best rated.

But what you've done in a few weeks is still awesome. Well done.

------
voltagex_
Hi, I'm a wheelchair user in Australia. Would be very very interested in
adapting your app. Please get in touch!

------
graup
Why is "-11%" rendered as "Moderate"? Everything <0 should be "Easiest",
shouldn't it? Or maybe even add another category, "Downhill"?

Also, any idea why this doesn't work for Berlin, Germany? You could at least
show the ZERO_RESULTS status somehow.

------
bazzargh
In the UK, cyclestreets is useful for this: <http://www.cyclestreets.net/>

...it does route planning, but the speeds aren't just based on distance
travelled but also the elevation. So, it's not so much that it avoids the
hills, but it'll only send you over them if it's not faster to avoid them.

Cyclestreets has long talked about going open source - I don't know where they
are with that - but there's some details of their routing algorithm here:
<http://www.cyclestreets.net/journey/help/howitworks/>

That page doesn't mention the elevation part, but they use Naismith's formula,
and they give examples here:
<http://www.cyclestreets.net/journey/help/routing/>

------
cperciva
You don't seem to handle bridges correctly; mapping from "North Vancouver, BC"
to "Burnaby, BC" reports a 65% slope the moment you come off the Second
Narrows bridge -- because you're jumping from sea level up to almost 200'
above sea level. I realize this is a problem with your geolocation data, but
there are probably ways you can clean up that data.

Another example is going from "nanaimo and 12th, vancouver, BC" to "nanaimo
and 15th, vancouver, BC": There's a bridge in the middle of that which crosses
a 30' deep chasm, but you're showing it as being "very difficult" because
you're calculating for someone cycling down the side of the chasm -- which
would indeed be nearly impossible!

~~~
thecyborganizer
I noticed this problem as well. I live in Ithaca, and crossing one of our many
gorges generates grades of +/- 150% (as an example, try starting at "Arts
Quad, Ithaca, NY" and ending at "Bess Brown Center, Ithaca, NY").

Seems like it would be a little bit tricky to try to systematically identify
steep ravines like this in Google's elevation data, but it's certainly an
interesting problem.

------
petercooper
Somehow this drove me to find out what the steepest street in SF actually is
and it led me to this interesting piece of detective work:
[http://www.datapointed.net/2009/11/the-steeps-of-san-
francis...](http://www.datapointed.net/2009/11/the-steeps-of-san-francisco/)

~~~
nhebb
Which in turn made me wonder what the steepest road in the world is (linked
below). According to the Wikipedia article, there is a 10 meter section of
Bradford St. in SF that averages 39-40% grade.

<http://en.wikipedia.org/wiki/Baldwin_Street>

------
delinka
Most of the complaints I've read so far seem to center around a lack of data:
apparently Google doesn't have elevation data for a sloped bridge, nor for
whether a particular tunnel is walkable. It's an excellent idea and well-
executed given the available data.

I see a routing problem. I had assumed this tool would give longer routes to
avoid steep inclines, but that's not always the case. Take the suggested case:
Nob Hill to Russian Hill in San Francisco. Drag marker A to the corner of
Vallejo and Powell (to the east of that big hill.) Now drag B to Union and
Polk (to the west, and one block north of Green.) The resulting route includes
some "very difficult" parts along Broadway when it could suggest one block
over to Pacific and eliminate those black dots.

------
a5seo
Request: estimate the route that requires the lowest "work".

This way, you could make tradeoffs between distance and effort.

I'd happily travel an extra flat mile to avoid a .25 mile hill with a 9%
grade.

~~~
dmckeon
Business model: least work routing for truckers, big RVs, people towing
trailers, etc. Pitch as a fuel-saver, promote with ad-supported local and
special-interest ads. Support click-n-drag re-routing as Google Maps does now.

Note that while many truckers travel recurring routes, some pick up ad-hoc LTL
(less-than-truckload) shipments and must replan routing with nearly each
shipment. For fun, demo using:

    
    
        Tucson, AZ     -> Tucumcari, NM
        Tehachapi, CA  -> Tonopah, NV

------
No1
Pretty interesting, looks like Google Elevation API misses some tunnels though
(looking at a route that should go through Broadway tunnel right now). Tunnels
are key for getting the Flattest Route™.

------
juskrey
Could I please have the most hilly option for my legs?

~~~
malbs
Yeah I'm the same, I look for the steepest rides, I look at my commute home as
part work out. Still, no matter which way I take, I still have to climb ~500ft

------
stevewilhelm
You might want to remove your Google API key from the Github Repo.

~~~
jonny_eh
Thanks but no need to worry, it's a browser API key.

------
idupree
I've been using Marble ( <http://marble.kde.org/> ) to show me elevation
profiles of routes I bicycle. This site is pretty cool too! (This site works
everywhere there's map data, not just SF.)

------
oniTony
For those wanting a hilly work out — check out
<http://www.walkscore.com/bike/CA/San_Francisco> and pick your own combination
of hills and availability of bike lanes.

------
mdturnerphys
I'd been thinking about making something like this for a while (I'm in
Seattle). Glad that someone with more time and skills than me got it put
together.

What's the basic idea behind the optimization algorithm?

------
Trufa
If you live in europe I recommend this app:

[https://play.google.com/store/apps/details?id=org.bikecitygu...](https://play.google.com/store/apps/details?id=org.bikecityguide)

<https://itunes.apple.com/at/app/bikecityguide/id517332958>

It's a navigation system specially designed for bikes, it takes into account
how flat is the rout among many another things like bicycle lanes, speed and
safety, it's really quite cool.

Disclaimer:I work for them!

------
willthames
If I plot a route from Hyde and Bay to 6th and Mission, it routes me over Nob
Hill. If I change it two streets to 4th and Mission, it routes me around the
Embarcadero, which is much flatter. Is there a reason it takes the more direct
(less flat) route in the first instance?

Having played around, the route given seems to vary slightly as I move an
endpoint slightly at either end and then massively recalculate - perhaps it
caches certain segments and favours those?

Just curious really, it's a cool idea!

------
lnanek2
Haha, we could really use this sort of custom routing in NJ for finding the
route using the fewest roads. If I use Google Maps to go to the local mall,
Costco, etc. it ends up using about 16 small side roads, alternating left and
right turns every block. Takes forever. Meanwhile, if you know what you are
doing you can make it there in 3 roads, one a major highway, which is much
faster than any of the side roads Google Maps loves so much. Just getting rid
of all the turns helps immensely.

------
yaliceme
Thanks for this! Cycling is my preferred way to commute, so I expect this to
come in handy. I just confirmed that my usual work->home route is in fact the
flattest.

------
jayunit
Awesome! Boy, this graph highlights why my evening commute (SoMa to Noe) is
killer in comparison to the morning commute.

PS My wife is in Hackbright as well, it is an exciting time in the program
(for other HNers, it's the last week of the current cohort). I heard about
FlattestRoute a few weeks back, it looks really great!

------
stevewilhelm
The length of the route is affecting the slope of each segment.

For example, Bolinas, CA to Vacaville, CA has steeper segments than the
Bolinas, CA to Dixon, CA even though they take the exact same route out of
Marin and Sonoma.

The extreme example, Bolinas, CA to Boston, MA never gets above a four percent
slope.

~~~
jonny_eh
That's due to limits of the Google Elevation API, it only allows a certain
number of samples to be fetched at a time. The app's only meant for use over
short distances, like around a city.

------
hardwaresofton
Hey it would be great if you allowed some GET parameters as well as POST, that
way people could bookmark pages, etc

~~~
artsrc
I too would like bookmarks

------
brianherbert
It might be interesting to see this mashed up on top of
[http://www.opencyclemap.org/?zoom=13&lat=37.75187&lo...](http://www.opencyclemap.org/?zoom=13&lat=37.75187&lon=-122.43666&layers=B00)
which has some good data for a lot of cities.

~~~
ZeroGravitas
Cyclestreets do that in the UK:

<http://www.cyclestreets.net>

------
Pirate-of-SV
Something doing the opposite would be cool. I'm training on my bike in SF and
the hills are the best.

~~~
mrmagooey
And if you monetise the hills option you could quote Jens Voight: "I get paid
to hurt other people - how cool is that?"

------
100k
This is great. Nice work and excellent visualization.

There's a pre-existing tool I like to use, which is not nearly as nice looking
but does allow you to specify your maximum grade:
<http://amarpai.com/bikemap/>

------
esperluette
So cool! I've been waiting for a bunch of bike-apps-in-progress to come to
fruition (415bike, I'm looking at you: <https://github.com/415bike>) but now
the wait is made much easier with this!

------
brendannee
It would be cool to integrate route choice (suggest a variety of routes from
short/hillier to longer/flatter) using the API at <http://bikesy.com>

------
personlurking
Would be nice for Lisbon, too. It's called the city of 7 hills (plus it's got
trolley cars and a Golden Gate of sorts, the latter made by the same company
as the GGB).

~~~
koenigdavidmj
Lots of cities are theoretically built on seven hills:

[http://en.wikipedia.org/wiki/List_of_cities_claimed_to_be_bu...](http://en.wikipedia.org/wiki/List_of_cities_claimed_to_be_built_on_seven_hills)

------
pkill17
The dots used for showing the difficulty can be dragged when altering the
route. Other than minor finicky things like that, it seems to be a neat idea.
Cool work!

------
bdon
You can check out something similar in 3D here (needs WebGL):

<http://bdon.org/bicycle.html>

------
dlitwak
This is great. I bike to work and I had kind of intuitively figured this out
after a month, but pretty cool nonetheless!

------
mtp0101
Very cool! Have always thought that Google Maps needs this feature!

~~~
jonny_eh
My wife (the creator of this app) happened to showed it to someone from Google
Maps today. It was demo day at the school she's attending and they were there.

------
denzil_correa
Looks interesting - wouldn't it lead to congestion though?

------
jamesk14022
I love how the default starting point is Nob Hill.

------
miga
Would be useful for the rest of the world.

------
stbtrax
cool app. The elevation data over the gg bridge seems to be a bit off. Out of
curiosity what data set is it from?

~~~
jonny_eh
Google Elevation API:
<https://developers.google.com/maps/documentation/elevation/>

~~~
obviouslygreen
Now that is cool. Thanks for the link!

~~~
ivabz
perfect i would say!!

------
dannowatts
this really is absolutely awesome. will be putting it to good use very soon :)

------
cmbaus
It's all about the wiggle.

