Modify

Opened 2 weeks ago

Closed 9 days ago

Last modified 9 days ago

#18679 closed enhancement (fixed)

[Patch {in progress, awaiting feedback}] Autofilter: extract numeric value from number+unit

Reported by: simon04 Owned by: simon04
Priority: normal Milestone: 20.02
Component: Core Version:
Keywords: autofilter Cc: Don-vip, Klumbumbus

Description

In order to make incline=42% and maxspeed=42 mph work, we have to somehow extract the numeric value from those tags.

I propose the following procedure given in pseudocode for a primitive osm and value (42%) for key (incline):

intValue = rule.valueExtractor(value) || rule.extractDefaultValues(osm)
filter = filter(key, intValue)
label = rule.valueFormatter(intValue)
button = button(label)

Attachments (1)

18679.patch (16.9 KB) - added by simon04 2 weeks ago.

Download all attachments as: .zip

Change History (5)

Changed 2 weeks ago by simon04

Attachment: 18679.patch added

comment:1 in reply to:  description Changed 2 weeks ago by simon04

The patch is not yet finished; of course, the unit tests need to be adapted/extended.

Last edited 2 weeks ago by simon04 (previous) (diff)

comment:2 Changed 2 weeks ago by simon04

Keywords: autofilter added

comment:3 Changed 9 days ago by simon04

Resolution: fixed
Status: assignedclosed

In 15838/josm:

fix #18679 - Autofilter: extract numeric value from number+unit

comment:4 Changed 9 days ago by simon04

In 15839/josm:

see #18679 - Autofilter: refactoring

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain simon04.
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.