Modify

Opened 6 years ago

Closed 6 years ago

#8255 closed enhancement (fixed)

Guess roles from selected objects tags when creating a relation via presets

Reported by: Don-vip Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: presets relation role Cc:

Description

Use case:

  1. Select a street tagged as highway=* and street numbers tagged as addr:housenumber=*
  2. Create an Associated Street via the internal presets

The selected objects are automatically added as members, but without any role. JOSM should guess the default roles (street and house) when the objects are correctly tagged.

This could be applied to other relations (bus routes, etc.)

Attachments (2)

8255.patch (7.4 KB) - added by simon04 6 years ago.
8255_v2.patch (17.7 KB) - added by simon04 6 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 Changed 6 years ago by skyper

+1

Would be nice for turn-restrictions !

comment:2 Changed 6 years ago by Don-vip

Difficult for turn restrictions. How distinguish from and to ? Only via may be guessed.

comment:3 in reply to:  2 Changed 6 years ago by skyper

Replying to Don-vip:

Difficult for turn restrictions. How distinguish from and to ? Only via may be guessed.

You are right, works only for oneway streets.

Changed 6 years ago by simon04

Attachment: 8255.patch added

comment:4 Changed 6 years ago by simon04

Summary: Guess roles from selected objects tags when creating a relation via presets[Patch] Guess roles from selected objects tags when creating a relation via presets

First working implementation attached. Further ideas: validate this information, also use for relation editor dialog (when adding new members).

Changed 6 years ago by simon04

Attachment: 8255_v2.patch added

comment:5 Changed 6 years ago by simon04

also use for relation editor dialog (when adding new members) … ✔

comment:6 Changed 6 years ago by simon04

For the validation part, I'm currently struggling on the following: We probably shouldn't validate a route relation wrt. the new public transport scheme. Unfortunately, it is impossible to distinguish the old/new scheme from the tags only. A simple version=2 tag for the new schema would've made a lot of things easier.

comment:7 Changed 6 years ago by simon04

In 5614/josm:

see #8255 - suggest roles when adding objects to a relation

comment:8 Changed 6 years ago by Don-vip

Wow, nice ! Thanks Simon !

comment:9 Changed 6 years ago by stoecker

Hmm, the relation presets more and more becomes what I had in mind when I started it. Nice.

comment:10 Changed 6 years ago by Don-vip

In 5615/josm:

see #8255 - only highway is required for role street

comment:11 Changed 6 years ago by simon04

Summary: [Patch] Guess roles from selected objects tags when creating a relation via presetsGuess roles from selected objects tags when creating a relation via presets

comment:12 Changed 6 years ago by Don-vip

In 5624/josm:

see #8255 - Use 'type' attribute when specified to filter role candidates (for example, this prevents highway=crossing or highway=street_lampnodes to be added as street members to an associatedStreet relation)

comment:13 Changed 6 years ago by Don-vip

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


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

 
Note: See TracTickets for help on using tickets.