logo separator

[mkgmap-dev] [PATCH v2] Move maxspeed calculations to style file

From Toby Speight T.M.Speight.90 at cantab.net on Fri Aug 30 08:45:58 BST 2013

0> In article <522034FF.6060405 at aighes.de>,
0> Henning Scholland <URL:mailto:osm at aighes.de> ("Henning") wrote:

Henning> the patch shouldn't change that much. If you actually
Henning> use --ignore-maxspeed, then you havn't to change anything. If
Henning> you actually don't use --ignore-maxspeed, then you'll need to
Henning> add a rule like
Henning>  maxspeed=* { set mkgmap:maxspeed = maxspeedkmh() }

No, I don't use --ignore-maxspeed.  But the above looks quite different from
your roadspeed style, where you set mkgmap:road-speed-class rather than
mkgmap:maxspeed - is that wrong?

Henning> If mkgmap:maxspeed-tag is found, then mkgmap will override your
Henning> given road_speed.

But only downwards, right?  I never want maxspeed to increase the
estimated actual speed.


Henning> Maybe you could describe your situation a little bit more
Henning> detailed.  Then it would be more easy to tell you, what you'll
Henning> have to change.

My routing rules go something like this extract:

/--------
| highway=primary & oneway=yes [0x03 road_class=3 road_speed=5 resolution 17]
| highway=primary [0x03 road_class=3 road_speed=4 resolution 17]
| highway=primary_link [0x0b road_class=3 road_speed=3 resolution 19]
| highway=secondary & oneway=yes [0x04 road_class=2 road_speed=4 resolution 18]
| highway=secondary [0x04 road_class=2 road_speed=3 resolution 18]
| highway=secondary_link [0x04 road_class=2 road_speed=2 resolution 22]
| highway=tertiary [0x05 road_class=1 road_speed=3 resolution 20]
| highway=tertiary_link [0x05 road_class=1 road_speed=1 resolution 20]
\--------

My region of interest is Scotland; speed limits are mapped over most of
the west Highlands:

<URL: http://www.itoworld.com/map/5?lon=-4.95077&lat=57.10531 >

I don't want my 60mph-limit secondary roads to have their speeds
increased to road_speed=6.  But I do want 30mph-limit secondary
roads to have their speeds reduced to road_speed=3.  So I want you
to confirm that the new maxspeed code will act only as a limit, not
a target (as driving instructors love to say).

I really want to avoid routing along minor roads in preference to
slightly longer roads where the speed limit is the same:

<URL: http://osrm.at/4Rl >

A final thought: some ways have a maxspeed:practical=* tag; if
maxspeedkmh() didn't hard-code which tag to read, we'd be able to use
that in our style files, too.


More information about the mkgmap-dev mailing list