Modify

Opened 12 years ago

Closed 12 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 12 years ago.
8255_v2.patch (17.7 KB ) - added by simon04 12 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 by skyper, 12 years ago

+1

Would be nice for turn-restrictions !

comment:2 by Don-vip, 12 years ago

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

in reply to:  2 comment:3 by skyper, 12 years ago

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.

by simon04, 12 years ago

Attachment: 8255.patch added

comment:4 by simon04, 12 years ago

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).

by simon04, 12 years ago

Attachment: 8255_v2.patch added

comment:5 by simon04, 12 years ago

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

comment:6 by simon04, 12 years ago

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 by simon04, 12 years ago

In 5614/josm:

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

comment:8 by Don-vip, 12 years ago

Wow, nice ! Thanks Simon !

comment:9 by stoecker, 12 years ago

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

comment:10 by Don-vip, 12 years ago

In 5615/josm:

see #8255 - only highway is required for role street

comment:11 by simon04, 12 years ago

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 by Don-vip, 12 years ago

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 by Don-vip, 12 years ago

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. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.