Tristan wrote:

> I am happy to use 30mph not 48 (which conflicts 
> with map features which specify kmh and not units..) 
> as it seems a widely-used value and hence /ought/ to 
> be interpreted by renderers (is it? are any of them?)

I don't think I know of any renderers that render maxspeed, whatever
the units. 

The maplint validation works from an xml file which is generated
from the Map Features page using a perl script, the updated XML
output of which needs commiting to svn which will then get
downloaded by [EMAIL PROTECTED] clients when they next update. I recently
did this to try and get parking_aisle to be recognised by the
maplint validation (I didn't do the svn commit - someone did this
bit for me).

Anyway, because the Map Features Restrictions template which
includes maxspeed has Number in the relevant column it is
interpreted as a special field type and the validation done at
present is !=NaN (or some similar syntax) which basically says it is
an error if the value of a maxspeed key is "Not a Number", and
highlights the way with a non-numeric maxspeed as
not-in-map_features. I don't believe there is an easy solution to
this. I was looking at the Perl script and a quick but distasteful
workaround would be to change Number on the Map Features page to
Number / User defined which I think *might* then allow *anything*
(which is why I don't want to do it). I think this would be the only
way without amending the perl script. If the perl script was to be
amended then either we could add special code to handle the key of
maxspeed, or define a type of "speed" which could be applied to both
maxspeed and minspeed and allow either a number (with assumed km/h
units) or a number followed by "mph" - I guess this would be done
using a regular expression comparison which from my limited perl
knowledge seems to use the =~ comparator. If a new type of "speed"
was defined in the code, then Map Features would still need
modifying in some way for the script to know which fields are of
that type - perhaps by changing "Number" to "Number (speed)".

As I said, there is no easy solution to the maplint issue that I can
think of, although I'm still considering the possibilities.

Ed



_______________________________________________
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk

Reply via email to