Hacker News new | comments | show | ask | jobs | submit login
Show HN: Flattest Route - A web app to help you avoid hills in SF (flattestroute.com)
237 points by jonny_eh on May 8, 2013 | hide | past | web | favorite | 75 comments



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/


Awesome. Just arrived from Melbourne and brought my bike with me - my poor legs will be very thankful.


It also works in Melbourne (just tested my daily ride) for when you get back.

NB: you can change the endpoints graphically. Though it's gotten caught up on an unnecessary roundabout, as if it were a way-point (even retracing the route to include it...).


Works for Seattle, as well. Thanks!


That's awesome. In theory it should work anywhere where Google has elevation data available. She just made it to scratch her own itch, getting around SF.


How are you pulling the elevation data? I ask only so that I can go collect elevation data where it doesn't exist.

EDIT: Disregard. Found the elevation data:

http://blog.programmableweb.com/2010/03/25/google-launches-m...

http://googlegeodevelopers.blogspot.com/2010/03/aint-no-moun...


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


Running hills are good for you! ;)


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


Seems to have problems in 3D Lausanne Switzerland.


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


Request: tell me the longest route that is downhill all the way.


Looks great! They should really make the fact that there's a $12,000 tuition a bit more prominent though.


It's on the FAQ and, without saying the exact price, is discussed on the application. It's an education program, so I don't think a "Pricing" tab would fit as well (it'd feel a bit cheap, like Phoenix College).

I personally think it's fine.


I should not have to dig around the FAQ to find out it costs $12k, that's a large sum of money to consider spending before jumping into the class. It should, at the very very least be on the application, if not on the front page.

The price (at least for me) was not a _frequently asked_ question, but rather the _very first_ question I thought of asking.


Wow. That looks great. We need one of these (well, more than one!) in the UK.


Works in Sydney, Australia


Very nice work!


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.


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


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.


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/


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!


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.


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...


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



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.


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™.


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.


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


An ideal route isn't best characterized as "flat" - I agree that "least work" (in a mechanical sense) is better. In reality it is as you say however - a personal trade off - some people just love hills too :)


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


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


I was just thinking I know quite a few runners that would want this option.


Just find some red and black routes, it should just work.


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


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


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.)


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.


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?


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.


If you live in europe I recommend this app:

https://play.google.com/store/apps/details?id=org.bikecitygu...

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!


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!


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.


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


I too would like bookmarks


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!


It might be interesting to see this mashed up on top of http://www.opencyclemap.org/?zoom=13&lat=37.75187&lo... which has some good data for a lot of cities.


Cyclestreets do that in the UK:

http://www.cyclestreets.net


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.


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.


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


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


That's what's great about this, it just shows you the data, you can optimize the route yourself how you'd like it.


Might as well make a slider for how far you'll go out of the way/into the way for hills.


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/


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!


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


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).


Lots of cities are theoretically built on seven hills:

http://en.wikipedia.org/wiki/List_of_cities_claimed_to_be_bu...


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!


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

http://bdon.org/bicycle.html


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


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


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.


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


I love how the default starting point is Nob Hill.


Would be useful for the rest of the world.


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



Now that is cool. Thanks for the link!


perfect i would say!!


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


It's all about the wiggle.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: