Opened 4 years ago

Closed 4 years ago

Last modified 4 years 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


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 4 years ago.

Download all attachments as: .zip

Change History (5)

by simon04, 4 years ago

Attachment: 18679.patch added

in reply to:  description comment:1 by simon04, 4 years ago

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

Last edited 4 years ago by simon04 (previous) (diff)

comment:2 by simon04, 4 years ago

Keywords: autofilter added

comment:3 by simon04, 4 years ago

Resolution: fixed
Status: assignedclosed

In 15838/josm:

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

comment:4 by simon04, 4 years ago

In 15839/josm:

see #18679 - Autofilter: refactoring

Modify Ticket

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