Modify

Opened 4 weeks ago

Closed 3 weeks ago

#17995 closed enhancement (fixed)

[PATCH] Add sort method for mapcss

Reported by: taylor.smock Owned by: Don-vip
Priority: normal Milestone: 19.08
Component: Core Version:
Keywords: mapcss sort Cc:

Description

It would be good to have a sort implementation in order to stably compare lists.

For example,

way[ref][join(";", sort(parent_tags("ref"))) != join(";", sort(split(";", tag("ref"))))] {
  throwError: tr("Possible mismatched refs");
}

In this case, the first sort on the parent_tags isn't wholly necessary (documentation indicates that it is sorted), but in the second sort (for the ref on the way), it is necessary, since OSM contributors may add refs like ref=A9;A8;B42.

Attachments (4)

17995.patch (2.4 KB) - added by taylor.smock 4 weeks ago.
Add mapcss sort method and test
17995.2.patch (6.2 KB) - added by taylor.smock 4 weeks ago.
Add missing @since xxx
17995.3.patch (2.9 KB) - added by taylor.smock 4 weeks ago.
Overload function so that it works with lists from other functions
17995.4.patch (3.2 KB) - added by taylor.smock 3 weeks ago.
Use sort and sort_list to differentiate between a string array and a string list.

Download all attachments as: .zip

Change History (8)

Changed 4 weeks ago by taylor.smock

Attachment: 17995.patch added

Add mapcss sort method and test

Changed 4 weeks ago by taylor.smock

Attachment: 17995.2.patch added

Add missing @since xxx

comment:1 Changed 4 weeks ago by taylor.smock

Summary: [PATCH] Add sort method for mapcss[WIP PATCH] Add sort method for mapcss

Changed 4 weeks ago by taylor.smock

Attachment: 17995.3.patch added

Overload function so that it works with lists from other functions

Changed 3 weeks ago by taylor.smock

Attachment: 17995.4.patch added

Use sort and sort_list to differentiate between a string array and a string list.

comment:2 Changed 3 weeks ago by taylor.smock

Summary: [WIP PATCH] Add sort method for mapcss[PATCH] Add sort method for mapcss

comment:3 Changed 3 weeks ago by Don-vip

Keywords: sort added
Milestone: 19.08
Owner: changed from team to Don-vip
Status: newassigned

comment:4 Changed 3 weeks ago by Don-vip

Resolution: fixed
Status: assignedclosed

In 15279/josm:

fix #17995 - Add sort method for mapcss (patch by taylor.smock)

Modify Ticket

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