#20957 closed defect (fixed)
Automatic fix for "Unnecessary amount of decimal places" results in NaN
Reported by: | Owned by: | simon04 | |
---|---|---|---|
Priority: | normal | Milestone: | 21.05 |
Component: | Core validator | Version: | |
Keywords: | template_report mapcss expression factory regression | Cc: | Klumbumbus |
Description
What steps will reproduce the problem?
- Have a node with the
ele
tag that has unnecessary precision, e.g.75.969999999999999
- Run validator to get the warning
- Click "Fix" for that warning
What is the expected result?
ele
with rounded number
What happens instead?
ele
gets the value NaN
Please provide any additional information below. Attach a screenshot if possible.
URL:https://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2021-04-27 20:35:33 +0200 (Tue, 27 Apr 2021) Build-Date:2021-04-27 21:58:39 Revision:17833 Relative:URL: ^/trunk Identification: JOSM/1.5 (17833 en) Linux Manjaro Linux Memory Usage: 2107 MB / 3557 MB (845 MB allocated, but free) Java version: 1.8.0_292-b10, Oracle Corporation, OpenJDK 64-Bit Server VM Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel Screen: :0.0 1920×1200 (scaling 1.00×1.00) Maximum Screen Size: 1920×1200 Best cursor sizes: 16×16→16×16, 32×32→32×32 Environment variable LANG: sv_SE.UTF-8 System property file.encoding: UTF-8 System property sun.jnu.encoding: UTF-8 Locale info: en_SE Numbers with default locale: 1234567890 -> 1234567890 Desktop environment: KDE VM arguments: [-Djosm.restart=true, -Dawt.useSystemAAFontSettings=gasp] Dataset consistency test: No problems found Plugins: + AddrInterpolation (35640) + FastDraw (35640) + ImportImagePlugin (35567) + OpeningHoursEditor (35640) + PicLayer (2a9aa7a) + apache-commons (35524) + apache-http (35589) + areaselector (368) + austriaaddresshelper (1597341117) + buildings_tools (35740) + ejml (35458) + geotools (35458) + imagery_offset_db (35640) + jaxb (35543) + jna (35662) + jogl (1.2.3) + jts (35458) + kendzi3d (1.0.205) + kendzi3d-resources (0.0.2) + log4j (35458) + measurement (35640) + opendata (35640) + pt_assistant (2.1.10-80-g7d9bba3) + reverter (35732) + tageditor (35640) + terracer (35640) + turnlanes-tagging (288) + turnrestrictions (35640) + utilsplugin2 (35691) Tagging presets: + https://josm.openstreetmap.de/josmfile?page=Presets/PublicTransportOneClick&zip=1 + ${HOME}/Dokument/QuickSets.zip + https://josm.openstreetmap.de/josmfile?page=Presets/ParkingLanes&zip=1 + https://github.com/kendzi/Simple3dBuildingsPreset/releases/download/0.9_2018-05-08/s3db-preset.zip Map paint styles: - https://josm.openstreetmap.de/josmfile?page=Styles/Fixme&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/LayerChecker&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Surface-DataEntry&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_buildings&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Enhanced_Lane_and_Road_Attributes&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransport&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/PriorityRoad&zip=1 - ${HOME}/sidewalks-mod.mapcss - https://josm.openstreetmap.de/josmfile?page=Styles/SimpleBuildingTags&zip=1 - https://josm.openstreetmap.de/josmfile?page=Styles/SimpleRoofTags&zip=1 - https://raw.githubusercontent.com/yopaseopor/indoormap/master/indoormap-style.mapcss - https://github.com/GlassOceanos/indoor-JOSM-style/archive/master.zip Last errors/warnings: - 00045.680 W: Unable to find supported projection for layer Lantmäteriet ny. Using EPSG:3006. - 00045.682 W: Unable to find supported projection for layer Lantmäteriet ny. Using EPSG:3006.
Attachments (0)
Change History (14)
comment:1 by , 3 years ago
Cc: | added |
---|---|
Keywords: | mapcss added |
comment:2 by , 3 years ago
Milestone: | → 21.05 |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:5 by , 3 years ago
Milestone: | 21.05 → 21.06 |
---|
follow-up: 9 comment:6 by , 3 years ago
There are 150 objects in the database.
https://taginfo.openstreetmap.org/tags/ele=NaN
follow-up: 11 comment:9 by , 3 years ago
Replying to Klumbumbus:
There are 150 objects in the database.
https://taginfo.openstreetmap.org/tags/ele=NaN
Anybody looking at these objects, already? I guess a semi-automatic correction would be accepted by the community. I can have a look.
follow-up: 12 comment:10 by , 3 years ago
There are also capacity=NaN
(17 times). Maybe there are other keys, but I didn't find out how to search case sesitive in tagInfo.
comment:11 by , 3 years ago
Replying to skyper:
Replying to Klumbumbus:
There are 150 objects in the database.
https://taginfo.openstreetmap.org/tags/ele=NaN
Anybody looking at these objects, already? I guess a semi-automatic correction would be accepted by the community. I can have a look.
Fixed in CS 105781206
comment:12 by , 3 years ago
Replying to mdk:
There are also
capacity=NaN
(17 times). Maybe there are other keys, but I didn't find out how to search case sesitive in tagInfo.
I do not find capacity
in numeric.mapcss. Is there another place where round()
is in use?
follow-up: 14 comment:13 by , 3 years ago
All capacity=NaN
are located in Poland and share the same same tags (only different name):
amenity=bicycle_rental capacity=NaN network=MEVO operator=Nextbike Polska
Could it be that they use local validator rules?
Edit: Most of them are in the first version, so maybe the value is intended or copied.
Cause:fixAdd
in the following rule is evaluated when parsing the MapCSS (and not for the individual OSM primitive when building the fix).