[mkgmap-dev] address index glitch?
From Richard Welty rwelty at averillpark.net on Sun Nov 25 15:17:44 GMT 2012
On 11/25/12 9:51 AM, Thorsten Kukuk wrote: > 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 you'd have to use the algorithm against the group of segments, but it could produce deceptive results with roads that "snake" about a bit. driveways? in rural areas, an address may be attached to a building which is some distance away from a rural road, connected by a driveway. in these cases, we need to deliver a route to the foot of the correct driveway. will have to think about this algorithm. at least, if the driveway is in OSM, there will be an appropriate node, if we can just figure out which one it is. driveways could, though, be a solution to the snaky road problem. closest driveway leads you to the correct node on the road. > 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? yes. since i will have considerable control over the address imports for my application, i can make sure that we have a simple case. i can't imagine a US based mapper leaving the street name off if they have real address data. if they don't have full addresses for a POI, then it might be missing. but POI lookup is more likely to be done from the POI listings rather than via address lookup anyway; the omission doesn't seem critical. > For 3), we can use the same algorithm as we use for placing a > POI for a mulitpolygon, including entrance, etc. i don't know that algorithm, but either you can use the closest node on the polygon, or you can compute a centroid for the polygon and use that. richard
- Previous message: [mkgmap-dev] address index glitch?
- Next message: [mkgmap-dev] address index glitch?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the mkgmap-dev mailing list