[Tilesathome] FW: [OSM-talk] Map Features, maxspeed and maplint

Ed Loach ed at loach.me.uk
Thu Oct 16 07:59:47 BST 2008


> The code is commented pretty well, so it should be possible to
> figure
> out what this does, but the main idea is to allow "<num>
> [optional
> unit from a list]". There can't be any whitespace after the
> unit, but
> there can be as much as you want around the number (xpath
> handles
> this).
> 
> Will somebody else tell the people discussing this on talk@? I
> have a
> feeling that at least the unit lists will be food for debate,
> for
> reference this is what I tossed into the script for now:
> 
> # Speed
> (value = speed, or key=maxspeed)
> 'kph', 'km/h',
> 'mph', 'knots'
> 
> # Lengths
> (value = height or value = width)
> 'mm', 'cm', 'dm', 'm', 'km',
> 'mil', # Scandinavian mil (10km)
> 'inch', 'foot', 'yard', 'mile',
> 'nm', # Nautical mile
> 'furlong'
> 
> I added a little hack that rewrites the value for maxspeed to
> be
> speed, so we can test the speed thing without changing map
> features.
> 
> Especially the length units were added in a very quick&dirty
> way from
> a wikipedia article, somebody should make a better list and put
> it
> somewhere public to be used as a standard.

Would it be difficult to handle feet and inches in the way Tagwatch suggests that they are being entered, e.g. 10'3", although it looks in Tagwatch as though the ' is replaced by '
http://tagwatch.stoecker.eu/Great_britain/En/keystats_maxheight.html
and occasionally " replaced by "
In the UK newer height/width signs are labelled in both feet and inches and metres, and in those cases I would by preference choose the metric measure, but older signs only show the imperial size. I read some discussion somewhere about how these heights are determined and it isn't a simple matter of converting one to the other, but is based on measuring the actual height of a bridge (for example) in the correct units, allowing a certain margin for clearance and rounding down (which I think rounds to multiples of 3" in imperial and 0.1m)

I'll try testing the maxspeed change now.

Ed






More information about the Tilesathome mailing list