[OSM-dev] Ways

ant antofosm at gmail.com
Fri Aug 12 11:09:25 BST 2011


On 12.08.2011 09:55, Sarah Hoffmann wrote:
> Hi,
>
> I recently stumbled upon another strange case that may cause trouble:
> a way where two consequetive nodes had different IDs but
> exactly the same coordinates.

A dupe node. That isn't a problem in my case, because I'm implementing a 
splitting logic which doesn't care about coordinates any more than "is 
node X in bbox B?". But it needs to be able to reconstruct even the 
weirdest objects in the process of merging.

Thanks everyone for your input.

cheers
ant

>
> Sarah
>
> On Thu, Aug 11, 2011 at 07:07:34PM +0200, ant wrote:
>> I'm currently writing processing software and a couple of questions
>> regarding ways have come up. None of the following examples makes
>> practical sense, and I believe (hope) that the editors prevent such
>> things from happening. But what about ...
>>
>> ... subsequent duplicate references?
>>
>> <way>
>> 	<nd ref="1"/>
>> 	<nd ref="2"/>
>> 	<nd ref="2"/>
>> 	<nd ref="3"/>
>> </way>
>>
>> ... closed ways trivial enough not to represent an area?
>>
>> <way>
>> 	<nd ref="1"/>
>> 	<nd ref="2"/>
>> 	<nd ref="1"/>
>> </way>
>>
>> <way>
>> 	<nd ref="1"/>
>> 	<nd ref="1"/>
>> </way>
>>
>>
>> The reason why it bothers me is that I feel my program should deal
>> with these cases. So the technical part of my question is: How does
>> the API handle it? Which of the above should I expect to be found in
>> the planet file, which not?
>>
>> cheers
>> ant
>>
>> _______________________________________________
>> dev mailing list
>> dev at openstreetmap.org
>> http://lists.openstreetmap.org/listinfo/dev
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev



More information about the dev mailing list