﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
14786	"[Patch] Test for proper ""ele"" values"	naoliv	team	"In https://wiki.openstreetmap.org/wiki/Key:ele we can see that `ele` is a numeric value that represents the elevation, in meters.

From [[https://wiki.openstreetmap.org/wiki/Key:ele#Local_Units|#Local_Units]] we can assume that using units (even `m` for meter) is not needed (or is invalid).

If I am not lacking coffee, we have 8226 nodes, 3323 ways and 245 relations in OSM with an incorrect `ele` value http://overpass-turbo.eu/s/p0i

Is it useful to have this test in JOSM?

{{{
#!mapcss
/* should be safe to just remove the meters unit from the value */
*[ele][ele =~ /^-?[0-9]+(\.[0-9]+)? ?m$/] {
        throwWarning: tr(""{0} must be a numeric value, in meters and without units"", ""{0.key}"");
        fixAdd: concat(""ele="", trim(replace(tag(""ele""), ""m"", """")));
        set .ele_is_fixed;
}

*[ele][ele !~ /^-?[0-9]+(\.[0-9]+)?$/]!.ele_is_fixed {
        throwWarning: tr(""{0} must be a numeric value, in meters and without units"", ""{0.key}"");
}
}}}

I am assuming that we can have negative values and that it's safe offer a fix to remove `m` from the value (for example, when `ele=100m` or `ele=100 m`)

Attached is also a small test case: nodes inside the green area should not receive any warning, nodes in orange should; nodes inside the yellow area are able to be automatically fixed."	enhancement	closed	normal	17.05	Core validator		fixed	ele	
