Modify

Opened 6 months ago

Last modified 6 days ago

#20833 assigned defect

[WIP Patch] Restrictions `no_exit` and `no_entry` missing

Reported by: skyper Owned by: skyper
Priority: normal Milestone:
Component: Internal preset Version: latest
Keywords: template_report turn restriction no_entry no_exit Cc: Klumbumbus

Description

What steps will reproduce the problem?

  1. Select a way and one of its end nodes
  2. Search for restriction relations in presets and only find one preset
  3. Open the preset
  4. Choose the restriction value

What is the expected result?

Finding no_exit and no_entry in the list of values.

What happens instead?

Both values are missing.

Please provide any additional information below. Attach a screenshot if possible.

According to Relation:restriction both values are valid but special as these restrictions need only one of the two roles, from or `to.

Looking at #17709 and #20832 and missing a multiselect for except=*. this preset needs some rework but adding the two missing values is the most important thing in my eyes.

Will try to come up with a patch the next days.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-05-02 00:37:37 +0200 (Sun, 02 May 2021)
Revision:17851
Build-Date:2021-05-02 01:30:59
URL:https://josm.openstreetmap.de/svn/trunk

Attachments (9)

josm_20833_menu.jpg (16.8 KB) - added by skyper 6 months ago.
new submenu
josm_20833_common_restriction.jpg (63.4 KB) - added by skyper 6 months ago.
common preset (former only one)
josm_20833_common_restriction_value.jpg (14.4 KB) - added by skyper 6 months ago.
common values
josm_20833_common_restriction_cond_value.jpg (20.2 KB) - added by skyper 6 months ago.
common conditional values
josm_20833_no_entry.jpg (61.1 KB) - added by skyper 6 months ago.
no entry preset
josm_20833_no_entry_restriction_value.jpg (3.0 KB) - added by skyper 6 months ago.
no entry value
josm_20833_no_entry_restriction_cond_value.jpg (16.9 KB) - added by skyper 6 months ago.
no entry conditional values
josm_20833_restriction.patch (78.7 KB) - added by skyper 6 months ago.
patch for preset
no_entry.svg (2.2 KB) - added by skyper 5 months ago.
similar but different icon; adapted from no_u_turn.svg (adjusted size)

Download all attachments as: .zip

Change History (14)

comment:1 Changed 6 months ago by skyper

Well, with current options there is no possibility to define roles for certain restriction=*. Only solution is to create own presets for each of these two special cases, and use presetlinks.

comment:2 Changed 6 months ago by skyper

I did not find an icon for no_entry. Therefore I took the file from the OSM wiki and modified it (similar but different icon; adapted from no_u_turn.svg (adjusted size)), but looking at the license within the file and at the website I found a conflict (CC-BY-SA 4.0 vs. PD).

What counts?
Can we use it?

Changed 6 months ago by skyper

Attachment: josm_20833_menu.jpg added

new submenu

Changed 6 months ago by skyper

common preset (former only one)

Changed 6 months ago by skyper

common values

Changed 6 months ago by skyper

common conditional values

Changed 6 months ago by skyper

Attachment: josm_20833_no_entry.jpg added

no entry preset

Changed 6 months ago by skyper

no entry value

Changed 6 months ago by skyper

no entry conditional values

Changed 6 months ago by skyper

patch for preset

comment:3 Changed 6 months ago by skyper

Summary: Restrictions `no_exit` and `no_entry` missing[WIP Patch] Restrictions `no_exit` and `no_entry` missing

Please, take a look at my preset patch. It got huge, as indention was off and I added some presetlinks for similar relations.
The new icon (similar but different icon; adapted from no_u_turn.svg (adjusted size)) needs to be placed at trunk/resources/images/presets/vehicle/restriction/turn_restrictions/

It adds a new subgroup including the former preset, now "Common", and two own presets for no_enty and no_exit

new submenu

The preset itself got icons for the combo and I added two tags, restriction:conditional as combo and except as multiselect with icons. For sure, I added presetslinks each time linking to the two other presets.
Besides creating the missing traffic mode icons, see below, the only thing left to do is updating match="" by a match_expression="" once #20843 is fixed.

common preset (former only one) common values

common conditional values


no entry preset no entry value

no entry conditional values


  • Next step is to generate better and more traffic mode icons. Did not use inkscape for a while but I think I got the trick. Sadly I fail converting .svg with ImageMagic so far. Does anyone have a hint?
  • Last but not least I guess I need to learn style file coding to complete this task, despite adding some validator rules which can be handled in a separate ticket.
Last edited 6 months ago by skyper (previous) (diff)

comment:4 Changed 5 months ago by skyper

I have created a new icon using source:trunk/resources/images/presets/vehicle/restriction/turn_restrictions/no_u_turn.svg, similar but different icon; adapted from no_u_turn.svg (adjusted size)

Changed 5 months ago by skyper

Attachment: no_entry.svg added

similar but different icon; adapted from no_u_turn.svg (adjusted size)

comment:5 Changed 6 days ago by skyper

See also #18014.

Modify Ticket

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

Add Comment


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

 
Note: See TracTickets for help on using tickets.