Modify

Opened 5 years ago

Closed 5 years 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 5 years ago.
Add mapcss sort method and test
17995.2.patch (6.2 KB ) - added by taylor.smock 5 years ago.
Add missing @since xxx
17995.3.patch (2.9 KB ) - added by taylor.smock 5 years ago.
Overload function so that it works with lists from other functions
17995.4.patch (3.2 KB ) - added by taylor.smock 5 years ago.
Use sort and sort_list to differentiate between a string array and a string list.

Download all attachments as: .zip

Change History (8)

by taylor.smock, 5 years ago

Attachment: 17995.patch added

Add mapcss sort method and test

by taylor.smock, 5 years ago

Attachment: 17995.2.patch added

Add missing @since xxx

comment:1 by taylor.smock, 5 years ago

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

by taylor.smock, 5 years ago

Attachment: 17995.3.patch added

Overload function so that it works with lists from other functions

by taylor.smock, 5 years ago

Attachment: 17995.4.patch added

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

comment:2 by taylor.smock, 5 years ago

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

comment:3 by Don-vip, 5 years ago

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

comment:4 by Don-vip, 5 years ago

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