#24894 closed defect (fixed)
Mapillary keys longer than 15 characters are reported as errors by the validator, but there are also keys with 16 characters
| Reported by: | goodidea | Owned by: | wangi |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | External rule | Version: | |
| Keywords: | mapillary | Cc: |
Description
Mapillary keys longer than 15 characters are reported as errors by the validator, but there are keys with (at least?) 16 characters. I do not know what the maximum length is.
Example: https://www.mapillary.com/app/?pKey=1410083070176035 (tag: “mapillary=1410083070176035”).
The error message is: “mapillary tag should only contain image key (15 characters ciphers string)”
That should probably be adjusted.
JOSM/1.5 (19621 en)
Attachments (0)
Change History (7)
comment:1 by , 4 weeks ago
| Component: | Core validator → Plugin mapillary |
|---|---|
| Owner: | changed from to |
comment:2 by , 4 weeks ago
| Component: | Plugin mapillary → Wiki content |
|---|---|
| Owner: | changed from to |
comment:3 by , 4 weeks ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Updated Rules/Pictures based on above.
comment:4 by , 4 weeks ago
Great, that's why we ask for the detailed status report via report bug menu. Thanks for the fix!
comment:5 by , 4 weeks ago
Note: You can add the tests directly to the rules with assertMatch() and assertNoMatch() :-)
comment:6 by , 4 weeks ago
Never knew that - updated the wiki page with the ones i'd tested against!
comment:7 by , 4 weeks ago
| Component: | Wiki content → External rule |
|---|



This is not a bug in JOSM core or in the Mapillary plugin: the message comes from the wiki ruleset Rules/Pictures, which users install from the validator preferences. Neither
resources/data/validatorin core nor the plugin contain a check onmapillaryvalues (the plugin only listsmapillaryinignoretags.cfg). So the fix is an edit of that wiki page, and I've reassigned the ticket to the wiki component.The rule hard codes
[0-9]{15}. Mapillary v4 image IDs are 64 bit integers and grow: a sample of the ~6000 most usedmapillaryvalues in taginfo givesmapillary.comURLso nearly 40 % of the existing correct values are flagged. The plugin itself parses image IDs with
Long.parseLong, i.e. up to 19 digits.Proposed replacement for the three mapillary rules (also uses "image ID", which is the current Mapillary term, and gives the legacy keys their own, more helpful, warning instead of the generic error):
Verified with JOSM's
MapCSSTagChecker(r19624) against sample values:1410083070176035(the reporter's 16 digit ID), 15, 17 and 19 digit IDs pass;1,abcand a 20 digit value give the error;https://www.mapillary.com/app/?pKey=1410083070176035&focus=photogives the URL error and its fix setsmapillary=1410083070176035; a 22 character legacy key gives the warning. The lower bound of 15 is kept deliberately: no real ID shorter than 15 digits exists in the data and it still catches junk values like1.