[OSM-talk] address interpolation

Jochen Topf jochen at remote.org
Fri Oct 2 09:51:21 BST 2009


On Fri, Oct 02, 2009 at 10:26:11AM +0200, Peter Körner wrote:
>> The problem is as follows:
>>
>> You see an interpolation "25a to 25c". How do you know that this means
>> "25a, 25b, 25c"? You know by removing the number and then starting with
>> the "a" go through code points adding one until you reach "c". Easy.
>> This will work for all alphabets where that are layed out in alphabetical
>> order in Unicode, and they probably all are. (but thats an assumption on
>> my part :-)
>>
>> But, when you see an interpolation "25 to 25c". How do you know that this
>> means "25, 25a, 25b, 25c"? You again remove the number. That gives you the
>> first entry. But what happens then? 
> You count to the end of this interpolation-way (there are 4 nodes in, 1  
> is the start and 1 is the end, so 2 in between) and substract this  
> number (2) from the last char (c). Following your assumptions from above  
> this should work (when you can add 1 to go to the next char, you can  
> also subtract 1 to go to the previous). This way you'll first get b and  
> then a - those are the chars for your houses.

No. The interpolation way has less nodes in it than houses. Thats the whole
point of having an interpolation way. Otherwise you'd just use those nodes
and tag them with the right house numbers and you are done.

Jochen
-- 
Jochen Topf  jochen at remote.org  http://www.remote.org/jochen/  +49-721-388298





More information about the talk mailing list