logo separator

[mkgmap-dev] [PATCH v10] support for motorway exits (last call before committing to trunk)

From Mark Burton markb at ordern.com on Mon Mar 16 11:21:08 GMT 2009

Patch version 10 (based on r983) - minor tweaks - no real differences

Please test this if you can. If no one reports that it stops
the map being built or that it wrecks the the map, I shall commit this
patch soon, imperfect though it is (exit search still doesn't use the
right map by default).

----------------------

Hi,

The attached patch provides basic support for processing motorway
exits. It's still work in progress but I am posting it so that people
can try it out, find what breaks and suggest improvements.

Exits in the garmin world have to be associated with a motorway (sounds
reasonable) but they don't have to coincide with a node on the
motorway, i.e. the exit node doesn't have to be on the motorway!

In the case where the exit is defined with a "motorway_junction" tag on
one of the motorway's nodes, nothing needs to be done for an exit POI
to be generated as mkgmap will work out the association itself (only
for roads that are "motorway" or "trunk").

If your "motorway_junction" node is separate from the motorway (not
very sensible, perhaps) or you are using a "highway=services" tag on a
node (which probably will be near the road but not actually on it) you
will need to add a "exit:road_ref" tag to specify the reference of the
road that the exit is associated with. Here's example tags that
associates a services with the road A41.

name=Toy Town Services
highway=services
exit:road_ref=A41

Note, at this time "highway=services" for areas is not yet supported.
Seems to me that it could be by using the new area POIs functionality
to make a POI automatically.

One attribute of exits is that they exit to somewhere and you need to
be able to specify where the exit is going to because mkgmap can't
guess that (well, not yet, anyway). To do this, use an "exit:to" tag.
So you can say:

highway=motorway_junction
ref=5
exit:to=Telford East

Garmin allow you to specify all sorts of facilities info for an exit
and this is described in the cgpsmapper docs. Of course, there is no
standard OSM means to express that so we have yet another tag
"exit:facility" that should be set to a comma separated set of values
that describe the facility. The syntax is exactly the same as used in
mp files. Something like this (values are examples, not sensible):

exit:facility=0x01,N,0x04,Hello World

Yet more flexibility is introduced by the fact that the type code for
the exit can be one of a huge range. At the moment, I am using:

highway=motorway_junction { name '${ref} ${name}' | '${ref}' |
'${name}' } highway=motorway_junction [0x2000 resolution 16]

highway=services { name '${ref} ${name}' | '${ref}' | '${name}' }
highway=services [0x210f resolution 16]

0x2000 means "exit no services"

0x210f means "exit (service")

I played around with the codes and on my gps some codes make little
symbols appear to show that the exit has food, hotel, etc. We can
probably make it use a suitable code from the facilities info but I
haven't looked into that yet.

All feedback is welcome.

Cheers,

Mark


-------------- next part --------------
A non-text attachment was scrubbed...
Name: mb-exits-v10.patch
Type: text/x-patch
Size: 44269 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090316/52434f02/attachment.bin 


More information about the mkgmap-dev mailing list