motis-project / motis

Intermodal Mobility Information System
https://motis-project.de
MIT License
186 stars 46 forks source link

adr: address suggestions have wrong district #496

Open jbruechert opened 3 months ago

jbruechert commented 3 months ago

Arnimalee 14 is definitely in Berlin (as the marker correctly shows), but is considered part of Potsdam-Mittelmark

image

felixguendling commented 3 months ago

Yes, the problem is that we're currently using bounding boxes. If an address has for a specific level only one bounding box overlapping it, we take this as the truth and don't calculate with the exact admin_level area shapes. This is only done if we have multiple bounding boxes overlapping the address. So in this case since Berlin doesn't have level 8 admin_areas, we just use the one from Potsdam-Mittelmark. So fixing this would require us to do the exact check for area overlaps everywhere which will significantly slow down the import. But probably that's the way to go.

/*
This is an example Overpass query.
Try it out by pressing the Run button above!
You can find more examples with the Load tool.
*/
rel
  ["admin_level"="8"]
  ({{bbox}});
/*end of auto repair*/
/*added by auto repair*/
(._;>;);
/*end of auto repair*/
out;

image

felixguendling commented 3 months ago

image

Relation: Potsdam-Mittelmark (62353)