Hacker News new | past | comments | ask | show | jobs | submit login
Free, open and collaborative routing service (openrouteservice.org)
196 points by leonry on May 20, 2020 | hide | past | favorite | 58 comments



A nice feature of this service is the ability to generate 'isochrones' - a visual display of how far you can travel from an origin within different time-duration bounds.

http://maps.openrouteservice.org/reach?n1=8.992583&n2=-79.60...


I wanted to implement this myself a long time ago to e.g. show areas where the next school is at most x minutes away and the next public transit stop is y minutes away, but got distracted with other things... In this map you will have to find and select the amenities yourself but the functionality is mostly there.

What I would really like to see though is a pedestrian + public transit mode... But I realize that this is hard ;)


I tried this for Lisbon, Portugal, and found it completely ignores one of the two bridges [0]. So it makes we wonder how good this service is.

[0] http://maps.openrouteservice.org/reach?n1=38.757564&n2=-9.19...


Could it be because three bridge is closed for cyclists?

Seems to be working when you create it for cars.

Either way it's probably a data issue and can be fixed if needed.


My stupidity indeed. Thanks for pointinng this out. I assumed cars was the default (I changed the Panama link above). Both bridges are closed for cyclists, but ferries cross the river as well. So the routing includes those, very nice!


I should have mentioned the bicycle setting in my link; Panama and the canal seem like a good example to illustrate how the shape of isochrones can change based on geographic and transport conditions (most cities will probably result in fairly concentric circles for walking, cycling and driving).

Anyway, glad to hear that the routing takes those road usage restrictions into consideration :)


Nice, would be awesome if it could factor in traffic information.


That would be great. It looks like the graphhopper project (another OpenStreetMap-based routing service) have done some research there:

https://github.com/graphhopper/open-traffic-collection


Very impressive! Seems to have trouble with my address in the UK, but accepted postcodes just fine. The ability to select not just different transport types but sub-types (i.e. normal bike or e-bike) is very nice.

Loving the wheelchair option :-) that's not something I've seen before, but now I've seen it - It's a blindlingly obvious accessibility feature...


Really nice!

They appear to use a forked version of Graphhopper [1] [2] for route calculation.

[1] https://www.graphhopper.com/ [2] https://graphhopper.com/maps


I'll tell you more, if you need routing for yourself then open-source OsmAnd has offline routing on Android and, probably, iOS. Info on public transport is not perfect but more than usable where I am. That's in addition to the tons of information from OSM: from local businesses to features specific to maritime navigation, flying and horse-riding.

The only thing that it misses is info on traffic load—which might be tricky to gather for a FOSS service while critically depending on the quantity of collected data.


Wow, the user interface is very fluent. It has a lot of options, that's really powerful. Amazing how far you can come with a Google maps-like interface in 2020.

As a German citizen, I enjoy that the basis data (only OSM?) is really good. This seems to be a project based on the University at Heidelberg. That's a pretty hilly area, maybe that's why they focus so much on height elevation :-)


Apparently OSM and routing libs for OSM in general (i.e. Graphhopper I guess?) make use of elevation. I keep being surprised by elevation graphs for routes in OsmAnd: it somehow finds more variation than I've seen, in this city that's “flat as a liftman's joke”.


thought this had something to do with internet routing and got excited :)


Oh, sorry! I'll try to find a better, more precise name next time :)


This is great! Well, except for the fact it hijacks my back button and my local map is out of date by at least 6 months.

But, I love that this is open.


I appreciate the inclusion of cycling as a transportation mode (glares at Apple maps) when looking for directions. Comparing two of my regular routes, the options given are actually preferable to what Google Maps suggests (to the point of being the routes I would normally take anyway to take advantage of less car heavy routes).


I note that this has an API which is free but with rate limits (https://openrouteservice.org/plans/). Is the intention in future to have plans that charge for usage above these limits?


I don't understand their business behind that, neither. Note however that on GitHub (https://github.com/GIScience/openrouteservice) they mention it as a "demonstration server".


The OSM Wiki page on OpenRouteService (https://wiki.openstreetmap.org/wiki/OpenRouteService) might be worth checking out, too.


Unfortunately, Graphhopper (and this) has a problem with routing on bridleways in Great Britain. It seems to be a very old issue but I'm still experiencing it now. It makes it not very useful for walking in GB.


Darn. When I saw the title, for a second I thought this was someone else I could get to advertise a /22 for me instead of AT&T.

But this is neat, too.


Not IP packet routing then?


This is really awesome!


At first glance it looks quite nice compared to the other OSM routing software I've used.

For instance, when going to a certain large hardware store, OsmAnd basically told me to pull over off the Interstate and hoof it up to the store, instead of actually routing me off the highway and into the parking lot.

This site seems to do it correctly, which is nice!


Why!? Another web page hijacking my back button!!


Browsers should internally replace `history.pushState` by `history.replaceState` calls if they do not happen during a click event (and even then limit the number of pushState calls to one)


If by "limit the number of pushState calls to one", you mean once per "click" event and by click event, you mean user interaction, then yes.


That would be an accessibility nightmare.


Why exactly? Indeed I have not thought about every detail but as I see it:

- pushState is only used for overriding the default behavior, mostly to keep the url bar in sync with changing client state

- pushState pollutes the browsers history

- users have a mental model of how many steps/clicks they performed on a site and expect that an equal number of clicks on the back button brings them back to the beginning

- users are upset if that expectation is not matched

The site should not have control over the users history in the first place but for SPA it's necessary to achieve the expected behavior. But the browser should make sure that it's not misused. In the same way that pop-ups are blocked outside of whitelisted event listeners to prevent a website from polluting your screen, pushState should be blocked to prevent history pollution.


well, limiting it to just click events won't work if you navigate using the keyboard, or voice commands.


I think it’s reasonable to assume that’s GP meant any user interaction.

Reminder from the HackerNews guidelines

> Please respond to the strongest plausible interpretation of what someone says, not a weaker one that's easier to criticize. Assume good faith.


Well as you can say the same for popup windows which should work for keyboard navigation and voice commands as well, I assume there is a defined class of events that count as active user interaction and I assume that onload, mousemove and onresize do not fall in that category but click, keypress do. Anyway if you focus a button and press it by hitting the spacebar or enter key a javascript click event is triggered as well. So even if you would limit it to click events I guess it would for a large portion of keyboard navigation as well.


I came here to write about this. This site trashed my back navigation in certain cases and I couldn’t get back to the (external) page I was at before. I just lost my navigation history.


Agh, yeah. I can sort of see how this made sense in the early days of webapps, but now that everyone is so conditioned to using 'apps' I think aside from it being annnoying 'leave my browser chrome alone' behaviour that shouldn't be allowed, sites shouldn't even want to. I doubt many people use a webapp/SPA and click the browser back instead of the in-app back when they want in-app navigation, these days.


I do like being able to use native controls to go back and forth and not having to use the application button. The same way you often use the OS back button on mobile instead of using the (usually) top-left button.

I this what the original meant is that this implementation here is flawed. Once you are on the website, the back button won't bring you back to Hacker News ... ever. Even spamming the back button, you'll get stuck on the redirection to /directions which is annoying and definitely broken. This kind of redirection loops should be forbidden.


> I doubt many people use a webapp/SPA and click the browser back instead of the in-app back when they want in-app navigation, these days.

I have back/forward buttons on my mouse and I use those. Why would I move the mouse to click an in-app navigation button instead?


Not to mention, that I also use keyboard shortcuts to navigate back, to avoid having to move my hand to the mouse.


> I doubt many people use a webapp/SPA and click the browser back instead of the in-app back when they want in-app navigation

On phones, the native ‘back’ button is vastly more easy to tap than searching for where the designer placed their button this time and then likely reaching for the farthest corner of the screen, opposite of where my thumbs are. So much so that I get surprised and annoyed when a page that has fullscreen-y dialogs doesn't close them on ‘back’ but returns me to another page instead.

On desktop, personally for me at least one of the hands is usually on the keyboard in the proximity of ‘backspace’, which is again a no-brainer to mash. So the same consideration applies.


I thought most phones got rid of the back button, or do you mean the one in the mobile browser chrome?


The physical one sure, but Android has a system UI bar at the bottom (iff there aren't physical equivalents, which as you say there mostly aren't now) with back, home, and app switching buttons.

I've been trying iOS for the last couple of months, and especially initially that back button was one of my most missed features; it still annoys me, I've just stopped expecting it.


Still there on Pixel 4, afaics. I'm certainly using it with Android 10 on my phone.


I'm using mouse gestures and I go totally crazy if I get dropped out of an app because I used the "back" gesture not even thinking about it. That's super annoying and a mayor usability bug, imho.


I'm not sure about in-app. For me I just wanted to get back to this post in HN, because the link opened in the same tab.


It pans the map with my back navigation mouse button too, it's so wrong. I wonder where the repository is.


Click-and-hold/right click on the button and you should be able to resolve any "hijacking". I'm not sure why people complain about this, it's not hard to deal with.


How about mobile?


Doesn't tap-and-hold work?


Learn something new every day!


It works on Firefox Android with both the OS and browser's back button.


I love it!


Is this another one of those things like openmaptiles.com which is technically open but they don't really provide the tooling to generate new tiles and getting a copy of the tiles costs either thousands of dollars or you can only get versions that are 3+ years out of date? And also none of the tools are actually open source, or the ones that are go completely undocumented and don't actually work?

/rant


This is all wrong!

1.) you're mixing a routing service with a tile service (just view the map). A routing service needs always a tile service to display its result.

2.) the difference between openmaptiles and a traditional apache mod_tile is, that you don't need a ~600GB postgress to serve the entire planet. It's pre-rendered in vector tiles and the entire planet fits into a ~50GB mbtiles (sqlite3) file.

3.) Generating your own mbtiles file is documentated here: https://openmaptiles.org/docs/generate/generate-openmaptiles... and here is the belonging github repository https://github.com/openmaptiles/openmaptiles

But take care, rendering the entire planet took a lot of ressources. e.b. i7 sandy bridge with raid 0 ssd will take ~1 year for planet zoom level 0 to 14. And aws c5d.12xlarge will take 7 days only for zoom level 14.


> that you don't need a ~600GB postgress to serve the entire planet.

That 600GB must surely include the full history? The xml dump of just the current openstreetmap data is only ~90GB, and generally XML dumps get smaller when you put them into a real database. That isn't a good comparison.

I could have sworn the last time I checked this the docker image had dependencies that simply were not available, either in docker or on git but I guess I'm mis-remembering.


90GB is a bz2 compressed file not raw xml

See the wiki: https://wiki.openstreetmap.org/wiki/Planet.osm/full


Well I suck. I'm honestly not sure how I got so wrong on this issue.


> That 600GB must surely include the full history?

Nope! IME a regular `osm2pgsql` database for displaying maps which can be updated with changes needs about ~1TB of diskspace. There are many indexes needed.


> Is this another one ...

nope




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: