logo separator

[mkgmap-dev] address index glitch?

From WanMil wmgcnfg at web.de on Sun Nov 25 22:10:44 GMT 2012

> On Sun, Nov 25, WanMil wrote:
>
>> 2) As Steve pointed out there must be an algorithm that associates
>> housenumbers to nodes in roads. This sounds like a good point where you
>> could help. Do you have some ideas how to realize that?
>
> I think this all comes down to calculate the shortest distance
> between a point (the addr:housenumber) and a line (highway=*).
> You can find some solutions on the net, like:
> http://stackoverflow.com/questions/849211/shortest-distance-between-a-point-and-a-line-segment
>
> No we face some problems:
> 1) streets are complex lines
> 2) what is the right street?
> 3) what is the node for a housenumber, if it is attached to a polygone?
>
> For 2), we can match the street names, if there is addr:street given.
> If no street name is given, it's getting difficult. But maybe we should
> start with the simple cases and extend later?
>
> For 3), we can use the same algorithm as we use for placing a
> POI for a mulitpolygon, including entrance, etc.
>
>
> Don't know if anything of this is realistic doable, but I think
> we should start brainstorming about this, and maybe collect the
> ideas, problems and algorithms somewhere, so that other people
> can join and help.
>
>    Thorsten
>

Good summary about the things to solve!

Just my 2 cents about the development:
As I told there are 2 points that have to be solved:
1) Garmin format for housenumbers
2) Housenumber => node in road

In the beginning I propose to implement a *very* easy algorithm for 2) 
to be able to realize point 1).

The algorithm could be:
For each road with name=R get all nodes with addr:housenumber=* and 
addr:street=R. Associate those nodes with its closest point in the road.

This algorithm will provide a quite bad coverage but it sounds like a 
good algorithm to check the garmin format implementation because it is 
fast and easy traceable.

Anyhow Steve must have time to implement the garmin format or he must 
tell the list what he thinks how it works so that someone else can try 
an implementation.

Having a working prototype we can improve the algorithm more and more 
(maybe also with regional variants). At this point we can also easily 
change how the mkgmap internal association housenumber => node is 
realized. Maybe we will face performance and/or memory problems.

WanMil



More information about the mkgmap-dev mailing list