Opened 5 years ago

Last modified 4 years ago

#1097 reopened defect/bug

Navit finds street with correct name, but in wrong city

Reported by: grrosminet Owned by: KaZeR
Priority: major Milestone: version 0.5.1
Component: core Version: git master
Severity: Keywords: address, search, names, boundaries
Cc: sebastian.leske@…

Description

Hello, I'm trying navit svn for android with french translation. For some adresses it doesn't give me the good location but I cannot determine why

Scenario :

I want to go to my work at "26 rue Henri Barbusse, 37000 TOURS, FRANCE" so I do :

  • tap on the map
  • Actions
  • "Ville" (city ?)
  • type Tours
  • select 37000 Tours
  • tap on "Rues" (streets ?)
  • type "barbu"
  • select "Rue Henri Barbusse"
  • tap on "Définir comme destination" (set as destination ?)

It calcultates itinerary and when I look at destination it is "Rue Henri Barbusse, 37700 Saint-Pierre-des-Corps" (~4km from the real destination) :-(

As my real destination didn't provide street numbers, I have added the 26 on OSM then waited 3 days and updated the maps. the "26" is well displayed on map, but still not available when entering destination. And the itinerary is still to 37700 Saint-Pierre-des-Corps, not 37000 Tours :'(

I dont understand what can do that, so I think it's a bug :-(

Change History (17)

comment:1 Changed 4 years ago by sleske

I'm afraid this is a well-known problem. Navit does not currently handle multiple streets with the same name in one city (or sometimes in adjacent cities). See e.g. #794 and #1005.

comment:2 Changed 4 years ago by sleske

  • Cc sebastian.leske@… added

This is still reproducible with rev. 5419. So the fix that corrected #794 apparently did not fix this problem.

More information: There are actually three "rue Henri Barbusse" near Tours:

  • one in Tours itself
  • one in Saint-Pierre-des-Corps (the one that Navit finds)
  • one in Joué-lès-Tours (south of Tours)

There are "boundary=administrative" relations for all three cities in OSM data, and they look correct. So apparently Navit does not correctly process these relations.

Also, oddly enough, searching for "rue Henri Barbusse" in the cities of Saint-Pierre-des-Corps or Joué-lès-Tours does lead to the right street. It's just searching in Tours that does not work correctly.

comment:3 Changed 4 years ago by sleske

  • Summary changed from mis matching street to Navit finds street with correct name, but in wrong city

comment:4 Changed 4 years ago by tryagain

Hi!

I see it's quite uncommon to have place=city/town/village/* marked polygons or myltipolygon relations in osm. Rather than that, it seems to be common practice to tag city boundary with some admin_level=n boundary, where n is changing from country to country.

I don't know exact reasons why not tag each city boundary with place=city and so on, but navit should attempt to work in these cases too.

Also, some admin_levels used in each country may carry official divisions which are not of common use when specifying an address.

If you could specify for France, which admin_level's would you like to see as different country level divisions, I can make navit know them.

What I need, is per-country correspondence of admin_level values to the following divisions:

  • state
  • county
  • municipality
  • town
  • town subdivision like suburb or district

Also you may specify boundary of which admin_level defines a city/town/village boundary.

Some of above divisions may be skipped, if they are not applicable to a given country.

tryagain

comment:5 Changed 4 years ago by tryagain

  • Resolution set to fixed
  • Status changed from new to closed

Hi!

I consider this issue to be fixed with r5427, r5428.

To get right search results, you have to use a recent svn navit build and a fresh binfile map (built at April, 07 or later).

tryagain

comment:6 Changed 4 years ago by sleske

  • Priority changed from blocker to major
  • Resolution fixed deleted
  • Status changed from closed to reopened

Unfortunately, the problem still occurs: Navit still finds the rue Henri Barbusse in 37700 Saint-Pierre-des-Corps. Tested with a map from maps.navit-project.org from today, and SVN rev. 5549. So reopening.

Looking a bit closer at the map, the problem *may* be related to the fact that there are two areas "Tours" in OSM: The city of Tours (OSM relation for the city) and the "arrondissement" (district) of Tours (OSM relation for the arrondissement). All three streets are in the arrondissement, but only one is also inside the city. Maybe this is confusing Navit?

comment:7 Changed 4 years ago by tryagain

Hm...

I'm sure it was working for me. Maptool uses admin level 8 boundaries in france to get city boundaries. Can you please verify with josm that relation 76306 is correct (boundary has no gaps). When there's no good relation or polygon, we use population-dependent radius to get town area.

tryagain

comment:8 Changed 4 years ago by sleske

Strange. For me it definitely did not work. I'll try to look into this. Maybe I can grab the original OSM data, process it with maptool to make sure the map is current, then debug the search process.

comment:9 Changed 4 years ago by tryagain

We should trace down the people removing the iso tags from the country boundaries. Few days ago it was Norway, today France... What will be next?

http://www.openstreetmap.org/browse/relation/1403916

I consider this osm data issue unless there's some agrement.

comment:10 Changed 4 years ago by sleske

Well, there is some logic behind removing the ISO code. The relation above is only for the French mainland, without the ex-colonies etc. There is another relation for the whole of France. This relation contains sub-relations (in two or three levels, I think) which together cover France.

This is explained in the OSM Wiki: France boundary pyramidal construction. It looks like we should use that relation for Navit. However, I'm not sure if we can process such a nested relation.

And BTW, there is also a relation for Norway with ISO tag. This one is not even nested :-).

Last edited 4 years ago by sleske (previous) (diff)

comment:11 follow-up: Changed 4 years ago by tryagain

Thete's another one, but it's buggy too http://www.openstreetmap.org/browse/relation/2202162

That is the one which navit attempts to use.

comment:12 in reply to: ↑ 11 Changed 4 years ago by sleske

Replying to https://wiki.navit-project.org/index.php/user:tryagain:

Thete's another one, but it's buggy too http://www.openstreetmap.org/browse/relation/2202162

Why is it buggy? It is nested, that's true, but apparently in OSM this is not considered incorrect. So maybe we'll have to learn to work with these?

comment:13 follow-up: Changed 4 years ago by tryagain

Your [ http://trac.navit-project.org/ticket/1097?action=comment-diff&cnum=10&version=1 changes] made after my comment have sched some more light on the subject.

The old-style norway relation you are referring to is a fix by xenos.

It looks like cascaded relations feature has not been discussed yet besides an idea to keep the old style relations.

It also looks like nominatim does not support them. It works for continental france only because it does not need iso country code.

We cant workaround this in nominatim way as we're stuck to country list having iso codes, and cant treat any string as country name.

So there are two ways: follow immature specification and be the first software supporting it or create parallel old style relation and attempt to distinguish these.

At present, I would vote for second way, but like to listen to osm veterans opinion.

comment:14 Changed 4 years ago by usul

  • Keywords address search names boundaries added
  • Milestone set to version 0.5.1

Thank you all for working on this bug. I will schedule it for the next hotfix.

comment:15 in reply to: ↑ 13 Changed 4 years ago by sleske

Replying to https://wiki.navit-project.org/index.php/user:tryagain:

It looks like cascaded relations feature has not been discussed yet besides an idea to keep the old style relations.

I googled a bit, and there's a fair amount of discussion about them. Googling is a bit tricky, because there are different names for them: cascading relations, super-& sub-relations, nested relations. For example, they are apparently used alot for routes (hiking routes, bus routes etc.): Creating super-relations for routes.

So there are two ways: follow immature specification and be the first software supporting it or create parallel old style relation and attempt to distinguish these.

At present, I would vote for second way, but like to listen to osm veterans opinion.

Hm, I would really, *really* like to avoid having to maintain our own relations in the OSM database. It would be a lot of work. Also, it might be deleted at some point, because an important OSM principle is One feature, one OSM element, which is violated by having two relations for France.

I'm afraid we'll have to find a way to handle the present situation.

Can't we drill down into the the super-relation and collect all ways? All we really need is a list of ways, and that way we get it.

As an interim solution we could even hardcode the right sub-relation for countries where it's necessary. Not nice, but would probably work, as these relations are long-lived (they are all already several years old).

comment:16 Changed 4 years ago by tryagain

Drilling into the cascaded admin_boundary relations is not so big problem, we already collect them into the memory.

Also we should start loading http://wiki.openstreetmap.org/wiki/Relations/Proposed/boundary_segment

Then collecting the whole way set for the given boundary is not too hard, programmatically.

I'm far from the idea to keep separate relation kind solely for navit.

My attempt to discuss this at #osm showed that these changes are silently accepted by the community.

So we probably have no way besides implementing this feature together with consistency checking and reporting logic.

comment:17 Changed 4 years ago by tryagain

I have implemented a workaround with r5620.

Rue Henry Barbusse seems to be found in the right city now.

Approach used is not very nice, as I have used country name in int_name attribute and admin_level=2 to distinguish the needed relation.

Other existing France relations are skipped with r5619 as not having any outer ways defined.

Note: See TracTickets for help on using tickets.