Opened 9 years ago
Closed 9 years ago
#13113 closed enhancement (wontfix)
validator: remove leading zeros from numeric values
Reported by: | naoliv | Owned by: | team |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Core validator | Version: | |
Keywords: | Cc: |
Description
Have some object with a numeric field, like natural=peak
+ ele=710.0
We can see that 710.0
could simply be represented as 710
The same should be valid for numbers like 0710
, 0710.0
, 710.00000
, etc
Could the validator give an informational message and offer an automatic fix for this, please? (ie, when the value could be represented as a simple integer number, then use it)
JOSM:
Build-Date:2016-07-06 01:41:54 Revision:10519 Is-Local-Build:true Identification: JOSM/1.5 (10519 SVN pt_BR) Linux Debian GNU/Linux testing (stretch) Memory Usage: 266 MB / 10206 MB (93 MB allocated, but free) Java version: 1.8.0_91-8u91-b14-3-b14, Oracle Corporation, OpenJDK 64-Bit Server VM VM arguments: [-Dawt.useSystemAAFontSettings=on] Dataset consistency test: No problems found Plugins: - Create_grid_of_ways (32309) - OpeningHoursEditor (32309) - PicLayer (32329) - RoadSigns (32309) - SimplifyArea (32309) - apache-commons (32309) - buildings_tools (32309) - conflation (0.2.0) - contourmerge (1014) - download_along (32309) - editgpx (32309) - ejml (32309) - geojson (41) - geotools (32309) - importvec (32309) - indoorhelper (32326) - jts (32311) - log4j (32309) - measurement (32324) - merge-overlap (32309) - opendata (32351) - pbf (32309) - pdfimport (32309) - poly (32309) - reverter (32309) - scripting (30723) - todo (29154) - turnrestrictions (32386) - undelete (32309) - utilsplugin2 (32333)
Attachments (0)
Change History (7)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Exactly, 710.0 and 710 is not the same.
comment:4 by , 9 years ago
Priority: | normal → minor |
---|---|
Resolution: | wontfix |
Status: | closed → reopened |
Summary: | Beautify/simplify numeric values → validator: remove leading zeros from numeric values |
Okay, let's leave it open for leading zeros then.
comment:5 by , 9 years ago
Replying to naoliv:
And what about the leading zeros, like
0710
?
Is this a real problem in the osm database or only hypothetical? I can't really imagine that someone types 0710
. And if an import went wrong then I think it should be fixed by a mechanical edit in this case.
comment:6 by , 9 years ago
With http://overpass-turbo.eu/s/hcF I found only 4 nodes. Atleast 2 of them look like telephone numbers, so the key is wrong in this case.
At http://www.openstreetmap.org/node/3661921958 there is obviously missing a 1
at the beginning.
comment:7 by , 9 years ago
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
The test is not really needed.
Using more digits may be intended and indicates a higher precision.
See: http://wiki.openstreetmap.org/wiki/Key:ele:NHN