[OSM-talk] Map Features, maxspeed and maplint

Ed Loach ed at loach.me.uk
Fri Oct 10 15:32:25 BST 2008


>  maxspeed:mph only conforms to map features because Shaun
> amended it
> earlier today!!!!!

And the way it has been amended with two keys in one table row means
that if the perl script is run that rebuilds the xml that is used to
generate the maplint not-in-mapfeatures validation rules, then
maxspeed:mph still isn't picked up as a valid key, so makes no
difference to my original problem.

Running the perl script does recognise a couple of sports that
weren't there previously, and that 1 is now valid for oneway as well
as yes (though strangely no-one has yet added True as valid, and I
find lots of oneway=true routes when using the maplint layer...)

>From a programming point of view, perhaps we should move away from a
Value column and have a RegularExpression for validation. Something
like ^[1-9]\d*(mph)?$ would validate 1 or more digits as a non-zero
limit with optional units of mph. We'd probably still need a Value
column for human readable examples, and some better explanation in
the Comment column. Certainly I still think maxspeed:mph is a poorer
solution than maxspeed=NNmph. It should not be possible to tag
contradictory limits on the same way, whether by accident or
deliberately. You may have to assume that if both exist then the
:mph one takes priority as someone has gone to the trouble of adding
it, though in other countries you may want the km/h one to take
priority, so again we're back to regional differences.

To answer the question someone asked of how many ways can you
mis-spell "miles per hour" - the obvious answer is the same as the
number of ways that you can spell it wrong putting it after a : in
the keyname.

Ed






More information about the talk mailing list