logo separator

[mkgmap-dev] Commit: r1415: Set mkgmap:dead-end-check=false when end points have FIXME=*

From Marko Mäkelä marko.makela at iki.fi on Fri Dec 4 08:58:19 GMT 2009

On Thu, Dec 03, 2009 at 11:07:27PM +0000, svn commit wrote:
> 
> Version 1415 was commited by markb on 2009-12-03 23:07:27 +0000 (Thu, 03 Dec 2009) 
> 
> Set mkgmap:dead-end-check=false when end points have FIXME=*
> Based on patch from Marko M?\195?\164kel?\195?\164.

Thanks, Mark!  I see that you added a check for currentWay.isBoolTag("oneway")
when adding the first Node to the way.  I am not sure if it is going to
work with an event-based parser, because the OSM files I checked (saved
from JOSM or output by splitter.jar) had all the <nd ref=...> before any
<tag> for the <way>.  Thus, currentWay would never carry any tags at the
time an <nd ref=...> is added, and the condition you added would never hold.

If you want to avoid setting mkgmap:dead-end-check=false for non-oneways
whose first node has FIXME=*, this could probably be best achieved by
defining private boolean currentWayStartsWithFIXME in Osm5XmlHandler,
which would be initialized when adding the first node to the way and
examined when closing the way.

Sure enough, my worries seem to be warranted.  My original patch did not
complain about
http://www.openstreetmap.org/browse/way/39701441
coming from nowhere even with --report-dead-ends=2, but yours does.

A corrected patch is attached.  The patch also adds some initialization
to addWay(), for additional safety against parsing errors or such.
My apologies for the line splits or indentation; I am not sure which
tab stop size and indentation rules you are following.

Best regards,

	Marko

PS: I got only 116 additional oneway warnings for --report-dead-ends=2
compared to the 0 reported by --report-dead-ends=1 for Finland (113
after the attached patch).  I think that I will enable --report-dead-ends=2
permanently and fix any warnings that pop up (or "fix" them by adding
fixme=survey if there is no obvious error, such as an unconnected junction).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: currentWayStartsWithFIXME.patch
Type: text/x-diff
Size: 2560 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20091204/d65ee5db/attachment.bin 


More information about the mkgmap-dev mailing list