logo separator

[mkgmap-dev] [PATCH] Do not create RestrictionRelation for unspecified restriction

From Marko Mäkelä marko.makela at iki.fi on Thu Jan 2 17:37:28 GMT 2014

There are a few restriction relations for "no through route" mapped in 
Finland. These are a bit ambiguous, because it looks like there are 
multiple possible routes, all of which are banned. These relations are 
tagged with type=restriction, but not with any restriction=*.

For mkgmap, the issue is that multiple warnings get emitted for the 
single relation. The attached patch would emit just one warning, for the 
restriction=* being missing. OK to commit?

(Side note: I think that it could be better if there was a "factory" 
method that created the RestrictionRelation if it is supported. It seems 
to be a waste of memory to create a RestrictionRelation object that we 
do not support, for example when there are via ways instead of via 

While working on this, I was wondering why we set rel=null if turn 
restrictions are being ignored. I think that the relation should be 
collected, just like any relation that does not have any magic meaning, 
so that any style rules could process the relation. I did not touch that 
part of the code.

Best regards,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: restriction.patch
Type: text/x-diff
Size: 574 bytes
Desc: not available
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20140102/4269b223/attachment.bin>

More information about the mkgmap-dev mailing list