Modify

Opened 6 years ago

Last modified 2 months ago

#11349 new enhancement

addr:street autocompletion is broken

Reported by: daganzdaanda Owned by: team
Priority: normal Milestone:
Component: Core Version: tested
Keywords: autocompletion address street name Cc:

Description

Hi,
in my opinion, the auto-completion for addr:street suggests too many "names".
It would be better if it would only take values from addr:street and names from highway-objects into account.
Would that be possible?

Attachments (0)

Change History (9)

comment:1 Changed 4 years ago by daganzdaanda

Hi again,
does anybody know if this is possible? If it's too complicated to do, then let's close the ticket.

comment:2 Changed 2 months ago by daganzdaanda

Summary: addr:street autocompletion should be more picky about suggestionsaddr:street autocompletion is broken
Type: enhancementdefect

After finding https://josm.openstreetmap.de/ticket/6306 it looks as if this already was working once. Now it's not working any more, so I changed the ticket to "defect" and changed the name accordingly.

comment:3 Changed 2 months ago by daganzdaanda

To reproduce:
Make a new node in a city center. Bring up the "add tag" box (with Alt-A). Type addr:street for the key and switch to the value field. If you press the down arrow without typing anything, you'll get a huge list of names, most of which are not Street names in the vincinity. If you type a letter, the autocomplete options are filtered, but the choices are always from anything that has a "name" tag.

Maybe it has to do with caching, too: I started JOSM and downloaded a small part of a city center. The autocomplete list seems to contain many more names than I believe are in that area. So it may be some leftovers from previous mapping sessions in the cache?? But nevertheless, the names are clearly not only from streets as they should be.

comment:4 Changed 2 months ago by daganzdaanda

OK, I found that disabling the "name suggestion index" preset removes a lot of the wrong entries from the addr:street autocompletion. Now, I only see names that are existing in the downloaded area, but there are still all the names of the shops, doctors, offices etc included.

comment:5 Changed 2 months ago by skyper

Keywords: address street name added
Type: defectenhancement

r4300 solving #6306 does not filter the name values. It never worked the way you like it to do.

comment:6 Changed 2 months ago by GerdP

I think r4300 claims that only street names are used for auto completion, but that really doesn't seem to work. If offers all matching names.

comment:7 Changed 2 months ago by daganzdaanda

Hm, looking at the discussion and the two patches in #6306, maybe it was working at first only with "name" values from streets and "addr:street" values, and with the second patch which was trying to fix #5804 it opened the search to all names??
https://josm.openstreetmap.de/attachment/ticket/6306/6306.patch
vs
https://josm.openstreetmap.de/attachment/ticket/6306/6306_v2.patch

The main difference I can see is in "src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java"

static List<String> getAutocompletionKeys(String key) {
   if ("name".equals(key) || "addr:street".equals(key)) {
      return Arrays.asList("addr:street", "name");
   } else {
      return Arrays.asList(key);
   }
}

The original patch only has

   if ("addr:street".equals(key)) {

Could this be to blame?
And why is the autocomplete accessing the list of names from the "Name suggestion index" plugin?

comment:8 Changed 2 months ago by GerdP

No, I think the problem is that all all name values are used, not only those of objects with a highway=* tag. No idea where this additional filtering could be done.

comment:9 Changed 2 months ago by skyper

Yes, I had the same impression looking at r4300. There is no filter for containing additional tags/keys.

Would be a useful filter, also for tagging presets.

Last edited 2 months ago by skyper (previous) (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to daganzdaanda
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.