Given that SI units are standard across OSM could be define a "speed" value
in addition to "Numeric" "String" etc like so:
(default to kmh as specified before (also means not adding millions of
pointless "kmh" strings to the db)
Factor means "multiply by this to convert to SI - interpreters would either
use value as-is or multiply by Factor for that suffix to get SI units.
"Suffix" is the entire string after the numerical value, with whitespace
trimmed - so spaced/not spaced suffix wouldn't matter - defining this
rigidly would be ignored by most users, i suspect

My proposed table:
Unit - Factor
"" - 1
"kmh" - 1
"mph" - 1.609
"knots" - 1.852

Not sure if any other units are in (common) use? Can someone check tagwatch?

Tristan

2008/10/14 Matthias Julius <[EMAIL PROTECTED]>

> "Tristan Scott" <[EMAIL PROTECTED]> writes:
>
> > If it were up to me (dicatorships are so much swifter to deal with
> > things...)
> > * maxspeed should be the only tag. Therefore you can't contradict
> > yourself/others (or update one to 40mph, or not catching because it's not
> > normal, maxspeed:mph is still 30 you end up with broken data)
> > * "mph" is the only permittable suffix (or a SHORT fixed list added to
> map
> > features), therefore parsing is simple. If Mph / MilesPerHour / mp/h /
> > yard/minute / walk / et al is allowed then parsing becomes either
> impossibly
> > (inf types of value) difficult, or becomes easy (if it's not all numeric,
> > ignore it).
>
> The list doesn't need to be very short, but it needs to be defined
> somewhere.  Then, any application that uses the data can be taught how
> to deal with it.
>
> Then Map Features needs to specify that maxspeed is a speed
> measurement and link to the table of speed units.
>
> Then Maplint can be extended to recognize tags that require a speed
> unit and it can warn if there is none.
>
> Matthias
>
> _______________________________________________
> talk mailing list
> talk@openstreetmap.org
> http://lists.openstreetmap.org/listinfo/talk
>



-- 
Tristan Scott BSc(Hons)
Yare Valley Technical Services
www.yvts.co.uk
07837 205829
_______________________________________________
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk

Reply via email to