On Jan 22, 2008 2:17 PM, Dermot McNally <<a href="mailto:dermotm@gmail.com">dermotm@gmail.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On 22/01/2008, Richard Fairhurst <<a href="mailto:richard@systemed.net">richard@systemed.net</a>> wrote:<br><br>> maxspeed=110 <-- assumed km/h<br>> maxspeed=70mph <-- unit stated<br>
> maxwidth=2.14 <-- assumed metres<br>> maxwidht=7ft <-- unit stated<br><br></div>I'm uneasy about this - up till now, these fields were assumed to<br>contain pure numbers, with the ease of processing that this implies. I
<br>know that in an imperial world, it's not so convenient to use a figure<br>like 2.14 when you're trying to represent what could be a round<br>number. But to introduce the possibility of there being units in these
<br>fields (and the requirement to arbitrate those units when processing)<br>smacks to me of dirty data.<br></blockquote><div><br><br>This is really not difficult to handle. <br>You check for a unit, if you don't understand the unit you pretend the tag didn't exist.
<br>If there was no unit you assume metre, and then you convert to whatever unit you happen to be using.<br>It's not dirty, it's just correct.<br><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>Is there not a nicer middle ground here? I'm thinking of some kind of<br>editor support that would treat units like 'mph', 'ft' or whatever as<br>macros that instantly transform any submitted value into the database
<br>internal SI equivalent before submission?<br><font color="#888888"></font></blockquote><div><br>And what is the exact SI equivalent of 30mph?<br>I can give you an approximation: 48.28032km/h.<br>What happens though if everyone sticks in 48 instead.. close enough isn't it?
<br><br>Does the difference matter? Probably not for a lot of data uses, but if you're trying to avoid dirty data then you should avoid this kind of forced approximation.<br><br>Dave<br><br></div></div>