Suppressing or fixing zero-length arc warnings

I have fixed some zero length arc warnings in the Finland extract. The count has gone down from 334 to 289. Most warnings are now for unnamed roads. Some of them are badly mapped cycleways or footways, but some are genuine zero-length arcs that I think should be silently dropped or merged by mkgmap. There are some cases that I am having trouble with: (1) steps and short ramps or paths around them, e.g., http://www.openstreetmap.org/browse/way/31345355 at http://www.openstreetmap.org/?lat=60.15495&lon=24.86515&zoom=17 Perhaps mkgmap should merge the highway=steps to highway=footway? Could this be done at the style-file level somehow? (2) short highways that end at some region boundary, such as this one: http://www.openstreetmap.org/browse/way/31359067 http://www.openstreetmap.org/?lat=60.15515&lon=24.88084&zoom=17 Could we introduce a tag for short arcs, similar to noname=*? It could be in the mkgmap namespace and renamed by a style file. For example, to suppress warnings about short steps, just add a rule like this: highway=steps { add mkgmap:zerolength=yes } (3) crossings on narrow city streets where the footway has been split into tiny segments due to a tram line crossing: http://www.openstreetmap.org/browse/way/28842855 http://www.openstreetmap.org/?lat=60.16600&lon=24.94182&zoom=17 See the Bulevardi/Yrjönkatu crossing. What to do about this? The same work-around as above? Marko

It is not good style to reply to your own post, but I got a further idea. On Sat, Sep 26, 2009 at 09:35:59PM +0300, Marko Mäkelä wrote:
(3) crossings on narrow city streets where the footway has been split into tiny segments due to a tram line crossing:
http://www.openstreetmap.org/browse/way/28842855 http://www.openstreetmap.org/?lat=60.16600&lon=24.94182&zoom=17
See the Bulevardi/Yrjönkatu crossing. What to do about this?
Come to think of it, I think that the best solution for this would be a node attribute. If mkgmap saw the magic attribute on the nodes on either end of the too short arc, it would suppress the warning and merge the arc to the adjacent arc. To make the selection less ambiguous, both end nodes of the short arc could be tagged. Here is an example of micro-mapping that would benefit from such an approach: Sofianlehdonkatu, Helsinki http://www.openstreetmap.org/browse/way/35067049 http://www.openstreetmap.org/?mlat=60.20443&mlon=24.94989&zoom=18 Best regards, Marko

Hi Marko, You can always filter them out with grep if you don't want to see them. Cheers, Mark

Hi Mark,
You can always filter them out with grep if you don't want to see them.
Sure, I could. However, many of the warnings have been genuine (such as sidewalks or cycleways being placed too close to the main road or main crossing). I would also like to see any new warnings as they appear, so that I can fix them. What I am looking for is a way of selectively suppressing the "known bogus" warnings, similar to warning-suppression #pragma in some C compilers. Marko

Marko,
You can always filter them out with grep if you don't want to see them.
Sure, I could. However, many of the warnings have been genuine (such as sidewalks or cycleways being placed too close to the main road or main crossing). I would also like to see any new warnings as they appear, so that I can fix them. What I am looking for is a way of selectively suppressing the "known bogus" warnings, similar to warning-suppression #pragma in some C compilers.
Well, I don't have a problem with using a mkgmap: tag to suppress the warning. Cheers, Mark

Mark, On Mon, Sep 28, 2009 at 11:29:07AM +0100, Mark Burton wrote:
Marko,
You can always filter them out with grep if you don't want to see them.
Sure, I could. However, many of the warnings have been genuine (such as sidewalks or cycleways being placed too close to the main road or main crossing). I would also like to see any new warnings as they appear, so that I can fix them. What I am looking for is a way of selectively suppressing the "known bogus" warnings, similar to warning-suppression #pragma in some C compilers.
Well, I don't have a problem with using a mkgmap: tag to suppress the warning.
Can you give a hint how to achieve this? The warning would be issued by RoadNetwork.java, which seems to work in the imgfmt domain (RouteNode and RoadDef). How can I get the corresponding OSM node or way, so that I can see if a mkgmap:ignore-zero-length-arc property has been set? Should I just add a Boolean flag to RoadDef and RouteNode and initialize it when the objects are instantiated from OSM data? Also, will the zero-length-arcs be merged in the .img file, or is there a risk that routing will be broken? Regards, Marko

Hi Marko,
Can you give a hint how to achieve this? The warning would be issued by RoadNetwork.java, which seems to work in the imgfmt domain (RouteNode and RoadDef). How can I get the corresponding OSM node or way, so that I can see if a mkgmap:ignore-zero-length-arc property has been set? Should I just add a Boolean flag to RoadDef and RouteNode and initialize it when the objects are instantiated from OSM data?
Yes, if you are happy for all the arcs that make up a single road to have that property, the easiest thing to do is add a new bool to RoadDef which suppresses the warnings.
Also, will the zero-length-arcs be merged in the .img file, or is there a risk that routing will be broken?
I am still unsure as to when zero length arcs actually cause a routing problem - we know they do but it doesn't appear to be in all situations. To be honest, I don't really understand why you are getting zero length arcs - are you not using --remove-short-arcs? Cheers, Mark

Hi Mark,
To be honest, I don't really understand why you are getting zero length arcs - are you not using --remove-short-arcs?
If I use remove-short-arcs, the messages will go away. But I am not sure if I am satisfied with that as a solution. Based on the error messages, I did fix some 30 or 40 crossings where the junction node was missing and one of the roads had two nodes very close to each other. It would still be nice to get warnings, but I guess that separate validator tools (such as the JOSM validator plugin and http://keepright.ipax.at/) are a better option. I looked at StyledConverter, and passing additional attributes to the imgfmt domain looks a little complex. A similar conversion would have to be done in the MP format as well. So, perhaps I should forget about this idea after all. Marko
participants (2)
-
Mark Burton
-
Marko Mäkelä