Re: [OSRM-talk] OSRM does not use date restrictions in conditional access?

2020-10-13 Thread Richard Fairhurst
michael spreng wrote:
> It currently does not. There is an update cycle of about 4 days. I think
> such date ranges would make sense to use at the time of generation
> (however day time ranges would still be ignored). But that is not yet
> implemented as far as I know. It could be implemented in the lua
> profile, so probably no deeper knowledge of osrm is necessary to
> implement this.

Implementing a full opening hours parser in Lua is probably not trivial though 
;)

There is actually a C++ OpeningHours class in OSRM, which is used for parsing 
conditional turn restrictions. It's not fully featured but might be enough. It 
could be given a Lua binding, I guess, to avoid duplication.

Richard
___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] OSRM Problems

2020-03-21 Thread Richard Fairhurst
> Item #1.
>
> If I go here:
> http://project-osrm.org/
> and click on "View Demo", and put in 2 points
> the route is not calculated and the GPX export
> button is not active (it is grayed out).  This
> used to work.  What happened?

The OSRM demo server no longer has a TLS certificate and so any attempts to 
access it via HTTPS, which the demo UI tries to do, will fail. See 
https://github.com/Project-OSRM/osrm-backend/issues/5655 .

OSRM is essentially abandonware at this point. Great piece of software that it 
is, I would only suggest building anything on it if (a) you are happy with its 
current functionality or (b) you are prepared to maintain it (or a fork) 
yourself.

Richard
___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Bicycle routing, crossing large roads: how to get information on the roads crossed

2019-12-23 Thread Richard Fairhurst
Jeroen Hook wrote:
> Is there another way to find out what type of road(s) I am crossing?

I think the easiest solution would be to allow bicycles on your 
highway=primary, but set it to be a restricted access road (or just to have a 
really high cost). That way you’d still call process_turn, but in reality the 
primary road wouldn't be used for routing.

My private cycle.travel fork does something like this in its equivalent of 
process_turn (e.g. 
https://cycle.travel/map?from=51.7546,-1.2612=51.7554,-1.2616), though it’s 
a (pretty extensive) fork of 4.9.x so not directly comparable.

Alternatively, you could do some preprocessing to mark intersections, depending 
on the size of your source data. For a different project I wrote 
https://github.com/systemed/intersector which identifies junctions in an 
.osm.pbf. If you were to patch it to output node IDs, then look up those node 
IDs in process_node, you could assign crossing penalties that way.

Richard
___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


[OSRM-talk] Visualising the hierarchy

2019-07-05 Thread Richard Fairhurst

Hi all,

Is it in theory possible to take OSRM's CH graph and visualise, say, the 
"top 10%" of routes?


In other words, I'm interested in creating a map which shows the highest 
order of contractions - the routes which are most likely to be followed. 
Obviously I'll have to write some code, but would appreciate a few 
general pointers.


cheers
Richard

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] OSRM v5.16.0 Release

2018-02-24 Thread Richard Fairhurst

Chau Nguyen wrote:

### Maneuver Override Relations:

Sometimes road geometries of complicated intersections do not give enough
information on how a suitable guidance should look like. OSRM is now
supporting the `maneuver override` tag in OSM to detect such intersections
and choose better guidance. Read more about the `maneuver override` tag
here:
https://github.com/Project-OSRM/osrm-backend/wiki/Maneuver-override-tag


Looks great!

The lingua franca of OSM is British English, though, so that should 
probably be "manoeuvre".


http://grammarist.com/spelling/maneuver-manoeuvre/

cheers
Richard

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Eliminating, or reconstructing, via points

2016-06-05 Thread Richard Fairhurst

Patrick Niklaus wrote:

My solution for that would remove vias if the way through them is a
shortest (duration) path. Technically shortest paths are not unique
(think of grid cities). So this might lead to some route modifications
that don't change the duration of the route but maybe the actual path.

The way to implement this would be by doing a table query with the
vias and removing via j from (i, j, k) if result.durations[i][j] +
result.durations[j][k] == result.durations[i][k].

For 2. the implementation would be pretty straight forward. Using the
match plugin first obtain snapped via coordinates of the trace. Then
apply 1. to minimize the via points.


Brilliant - thank you. Really good ideas and probably much simpler and 
faster than I'd have managed. :) I think the non-unique shortest path is 
unlikely to be an issue - most of the routes planned with cycle.travel 
are rural touring routes on winding roads, rather than in grid cities. 
Will have a go and report back!


cheers
Richard

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


[OSRM-talk] Eliminating, or reconstructing, via points

2016-06-04 Thread Richard Fairhurst
Two similar via-points-related questions I'd like to hear people's 
opinions on. I realise that out-of-the-box OSRM might not be able to 
solve these efficiently, but I'd be interested to hear ideas how one 
might build a plugin (or other code) to solve these.



1. Sometimes users of cycle.travel plan routes with a _lot_ of via 
points, e.g. http://cycle.travel/map/journey/19429 . Often, many of 
these via points are unnecessary: for example, the route from 'via 13' 
to 'via 15' would pass through 'via 14' anyway.


I'd like to add an option to eliminate these unnecessary points. I could 
do a fairly naive implementation, repeatedly routing between each pair 
and eliminating those which aren't necessary, but wonder if there's a 
smarter way of doing it.



2. Often people ask for a way to upload routes (e.g. in GPX or KML 
format, perhaps created with another routing website). This would be 
cool if the resulting routes were editable.


In other words, for a given polyline, reconstruct the via points 
necessary for (an approximation of) that polyline.


Strava built something like this the other year: 
https://twitter.com/paulmach/status/668921393656954880 . I can't get it 
to work, but the "divide and conquer" principle I guess is basically 
analogous to Douglas-Peucker: find a route from (start) to (end), find 
the polyline point furthest from the generated route, add a via there, 
and repeat until no points are more than n metres from the route.


Again, I could probably hack a naive implementation together, but wonder 
if there's a smarter way to do it!



Any ideas welcome. These could be fun challenges but I'd just like to 
get some second opinions before embarking on them...


cheers
Richard

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] OSRM-talk Digest, Vol 37, Issue 8

2016-01-20 Thread Richard Fairhurst

Artur Bialecki wrote:

I would like to use OSRM with bus routes. Basically I only want to
extract and route against nodes and ways that belong to relation
route=bus|tram|trolleybus


OSRM doesn't currently support route relations. You can either 'paint' 
ways that are members of relations with a special tag in a 
pre-processing step (how to do this is left as an exercise to the reader 
:) but look at Osmosis), or use Emil Tin's very old fork of OSRM with 
relation support.


Richard

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] public transport routing

2015-11-21 Thread Richard Fairhurst

Daniel J H wrote:

If you want to implement the transit routing yourself, a solid start is
Connection Scan --- "Intriguingly Simple and Fast Transit Routing"

quite easy to implement but also has its limitations.


Not sure whether it's de rigeur to mention Mapzen on the mailing list of 
a Mapbox-supported project ;), but they're doing some interesting work 
with public transport routing:


https://transit.land/
https://mapzen.com/blog/valhalla-intro

It's some way off primetime yet, I think, but really cool to see people 
working in this space. And of course there's always OpenTripPlanner - 
http://www.opentripplanner.org/


cheers
Richard


___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Use another data source than OSM

2015-05-22 Thread Richard Fairhurst

Patrick Niklaus wrote:

I think cycle.travel runs on data from Ordnance Survy. So it is
absolutely doable, but I don't think you will find any importers
(targeting OSRM) for commercial data sources as OpenSource. (most
providers require you to sign a NDA before you are allowed to even
look at the documentation...).


cycle.travel runs on OSM data, but it's augmented with supplementary 
data from Ordnance Survey and other sources. I use a little homegrown 
tool to add extra tags to the ways in the OSM .pbf:

https://github.com/systemed/tagmangle

Romain - I'd suggest you start by creating a small .osm file with an 
extract of your converted data (say, a town or county) and running OSRM 
over that. As Patrick says, there are a few gotchas with connectivity 
and tags. Once you're happy with that, you can rewrite your tool to 
create a .pbf.


cheers
Richard

___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Issue with chosing a sub-optimal route

2014-12-27 Thread Richard Fairhurst

Rudolf Mayer wrote:

Ideal should be http://osrm.at/atu, which however gets a slower time
computed - and I don't really understand why...

- Both ways have the same speed limit (ro:Urban)
- The second option is shorter


The trunk road (219294960) has smoothness=very_bad set on it. This will 
cause a slower speed to be assumed.


Richard



___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Beginner question: default car profile and tracktype/smoothness/surface

2014-03-18 Thread Richard Fairhurst

Michal Palenik wrote:

On Mon, Mar 17, 2014 at 01:57:23PM -0300, Fernando Trebien wrote:

But I don't
think we can easily implement different interpretations of the tags on
a per-country basis.


in postgis/anyspatialdatabase, this would be fairly easy (except for
filling in the data by crowdsourcing).

looking at
https://github.com/DennisOSRM/Project-OSRM/blob/master/profiles/examples/postgis.lua
it is probably connectable.


Yes, it's very easy for a Lua profile to interpret tags differently on a 
per-country basis, or even more granular than that - for example, my 
profile at cycle.travel/map interprets tags slightly differently 
depending whether the way is in a large built-up area or in the countryside.


Richard


___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Time-to-destination on OSRM is too short

2014-02-10 Thread Richard Fairhurst

Spod OSM wrote:

Looking at the OSM data, it does look as if there is missing maxspeed
data on some of the roads involved (but the maxspeed on the major
length of motorway is correctly tagged), but presumably OSRM uses
sensible scaled down defaults, relative to the way type, in that case?

Any suggestions as to how to help to get the public OSRM server to
give more realistic times?


Bear in mind that highway=trunk roads in the UK are often of a lower 
quality than those in the rest of the world.


OSRM's standard car profile assumes 85km/h for a trunk road. This is not 
too far off (say) the A1, A14 or A303 in Britain, but evidently not 
appropriate for the A61.


However, you can't just apply sensible scaled down defaults to fix the 
A61. That would break the parts of the world which have faster trunk 
roads, including the A1 etc. The correct solution is to add maxspeed 
tags, traffic lights etc.


cheers
Richard



___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk


Re: [OSRM-talk] Time-to-destination on OSRM is too short

2014-02-10 Thread Richard Fairhurst

Martin Koppenhoefer wrote:

Generally it seems that different ideas in different areas of the world,
of what a trunk road is supposed to be, now fall onto our feet ;-)
One option that comes to my mind would be that you change the road
classification in Britain to use trunk only on those ways where it is
used in other parts of the world, regardless of the actual official
british classification. Could this find support in the British
community?


Quick answer: not a chance in hell of that finding support.

Long answer: I don't really see the need, to be honest. All road types 
have to be interpreted with national defaults in mind for speed limits, 
permitted access, what side you drive on, etc. The fact that UK trunk 
roads are (on average) slower is just another one of these. And although 
UK trunk roads might be slower than German ones, they're probably faster 
than many of these: http://osm.org/go/wEupZG--


cheers
Richard



___
OSRM-talk mailing list
OSRM-talk@openstreetmap.org
https://lists.openstreetmap.org/listinfo/osrm-talk