[Tagging] Let's get (quite) rid of units and their multiples in OSM values

marc marc marc_marc_irc at hotmail.com
Fri Jul 27 21:36:18 UTC 2018

Le 27. 07. 18 à 22:44, Nelson A. de Oliveira a écrit :
> On Fri, Jul 27, 2018 at 5:33 PM, François Lacombe
> <fl.infosreseaux at gmail.com> wrote:
>> Well okay
>> Given problem is how can we query maxspeed like :
>> [Maxspeed>25] ?
> Maybe the query tools could simply implement a function that converts
> number+unit to a numeric value only?
> [to_number(maxspeed) > 25]

it can be done well and easily (but it must be recoded in every 
language, which is not effective) by a preprocessor for a lot of tools
exept when the tools need to keep the value as in the osm database,
for exemple overpass api

you can't convert all value to SI value with a preprocessor to store 
only SI value in the local database because you also need to beable to 
query or to show the exact value as in osm database.
the wrong way is to request the tool du duplicate all values in 2 :
the as-in-osm value and the SI value

the true way is to put only SI value in the osm database (except
for country with imperial units) without multiples and make tools aware 
of no-SI request or multiples request.
That's what we already do for street name : we put a full name in osm 
and let's Nominatim understand some common short form

So expending voltage=10kV into voltage=10000 (with or without v)
is imho a good idea

More information about the Tagging mailing list