logo separator

[mkgmap-dev] [PATCH v7] - alpha patch to support road find by name

From Mark Burton markb at ordern.com on Wed Mar 18 21:02:29 GMT 2009

Hi Johann,

> > Good point - actually, I haven't got my head around the joining of
> > roads to minimise the number of hits. It's not as simple to implement
> > as you may imagine.
> >
> >   
> I have implemented merging lines (not roads) in my simplifyWayPatch. The 
> merging happens at another level, but you may take it at a start.

The road name pois code has a way joining routine because it tries to
minimise the number of RNP points that have the same name. A similar
algorithm could be helpful for the current requirement.
 
> I have tought a little about merging roads at import osm stage and found 
> some problems:
> 
> - The roads in the osm data are often splitted because of some reason, 
> e.g. some segments of it has lower max speeds. So the merging has to 
> take place AFTER the routing information has been extracted.
> 
> - When is it allowed to merge two segments? At least the name and type 
> has to be the same.

From the point of view of finding roads with a given name, the type is
irrelevant, surely?

> - What to do, if three segements of the same road has the same start 
> coordinate? (Sometimes seen on residentials)

Actually, you don't need to "join" the roads at all to limit the number
of hits when searching for a street name. You simply have to limit the
number of entries in the sorted road data structure to one entry per
group of connected roads with the same name (not forgetting the
observation that if the road stretches between "cities" you probably
don't want to consider it all one road).

Cheers,

Mark



More information about the mkgmap-dev mailing list