Modify

Opened 2 weeks ago

Last modified 11 days ago

#15719 new enhancement

provide autofix for replacing single comma by period for height field

Reported by: mkoniecz Owned by: Klumbumbus
Priority: normal Milestone: 18.01
Component: Core validator Version:
Keywords: template_report comma decimal separator Cc: Klumbumbus

Description

What steps will reproduce the problem?

  1. create object with height=1,7 tag
  2. validate it

What is the expected result?

"height: meters is default; period is separator; if units, put space then unit (1)" is reported, autofix button is available

What happens instead?

autofix button is not available, one needs to fix this manually

Please provide any additional information below. Attach a screenshot if possible.

I think that for situation where height field matches pattern \d,\d (number followed by comma followed by number) can be without doubt changed into number followed by dot followed by number.

More extravagant height values probably should stay without autofix field.

On of examples in the wild: https://www.openstreetmap.org/way/536961810

URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2017-12-31 03:09:43 +0100 (Sun, 31 Dec 2017)
Build-Date:2017-12-31 02:33:46
Revision:13265
Relative:URL: ^/trunk

Identification: JOSM/1.5 (13265 en) Linux Ubuntu 16.04.3 LTS
Memory Usage: 537 MB / 871 MB (207 MB allocated, but free)
Java version: 1.8.0_151-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: :0.0 1920x1080
Maximum Screen Size: 1920x1080
Dataset consistency test: No problems found

Plugins:
+ OpeningHoursEditor (33876)
+ buildings_tools (33735)
+ continuosDownload (68)
+ imagery_offset_db (33774)
+ reverter (33865)
+ todo (30303)

Last errors/warnings:
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet
- W: java.io.IOException: Attribution is not loaded yet

Attachments (0)

Change History (5)

comment:1 Changed 2 weeks ago by naoliv

Makes sense.

We have 1229 objects with a comma in height https://overpass-turbo.eu/s/uac
4760 objects with a comma in width https://overpass-turbo.eu/s/uad
1393 objects with a comma in ele https://overpass-turbo.eu/s/uae
2444 objects with a comma in distance https://overpass-turbo.eu/s/uaf

comment:2 Changed 12 days ago by Don-vip

Cc: Klumbumbus added
Milestone: 18.01

It should work, can you please check:

fixAdd: concat("height=", trim(replace(tag("height"), ",", ".")));

comment:3 Changed 12 days ago by Klumbumbus

yes, the question is if #15726 will be fixed first, which may influence the creation of the rules for this ticket.

comment:4 in reply to:  3 Changed 11 days ago by Don-vip

Keywords: comma decimal separator added
Summary: provide autofix for replacing single coma by period for height fieldprovide autofix for replacing single comma by period for height field

Replying to Klumbumbus:

the question is if #15726 will be fixed first

Probably not. It's very tricky to fix as the tag function is called by the MapCSS engine before the validator replaces the parameters. I currently have no idea how we could fix it.

By the way: I think "period" is not correct English and we should say "point" instead.

comment:5 Changed 11 days ago by Klumbumbus

Owner: changed from team to Klumbumbus

OK.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain Klumbumbus.
as The resolution will be set.
to The owner will be changed from Klumbumbus to the specified user.
The owner will change to mkoniecz
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from Klumbumbus to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.