Order of elements is saved in OSM database.

26. Oct 2018 11:52 by [email protected] <mailto:[email protected]>:


> Thanks, That helps a lot. I don't work with routes (yet) but it when I'm 
> adding inners to riverbank multipolygons I always add them in the order they 
> would appear if you were traveling downstream. It just makes sense to me 
> although there's probably no programmatic reason to do it.
> Do you know if the sorting operation actually renumber the way-segments, or 
> just displays them in order in the Relation Editor?
> On Fri, Oct 26, 2018 at 10:42 AM Kevin Kenny <> [email protected] 
> <mailto:[email protected]>> > wrote:
>
>> On Thu, Oct 25, 2018 at 10:40 PM Dave Swarthout <>> [email protected] 
>> <mailto:[email protected]>>> > wrote:
>>
>>> Thanks again, Adam.
>>> That was also helpful. It brings up a question about sorting. After 
>>> sorting, are the elements arranged according to their coordinates, that is 
>>> to say, spatially? Or nearest node at each end of a member way is checked 
>>> to see which other node ways are closest? Or what?
>>>
>>
>> It's a little complicated.  The gist is that 'sort' tries to hook as much 
>> together as possible so that the ways are in 'the right order'.
>> It starts by making the longest chains possible by putting the ways with 
>> common endpoints together.
>> Once that's done, I *think* that it greedlly starts with the longest open 
>> chain and drops that in place. Then it successively finds the nearest 
>> endpoint on another open chain and starts from there, so that the gaps are 
>> as short as possible. This may not be the best choice, particularly if the 
>> relation is really messed up, but at least it connects what it can, and if 
>> you zoom to the disconnected ways, you can eyeball where you want them to go.
>> Routes are slightly more complicated, but once you learn to read the column 
>> with the arrows in the relation editor, you'll pretty quickly be able to 
>> figure out what's going on.  in that column, the arrows join if the ways 
>> share an endpoint, and the arrowhead points in the direction of the way. If 
>> the ways form a closed ring, the arrows will, too. In a multipolygon, if all 
>> the ways don't form closed rings after sorting, there's a problem. 
>
>
> -- 
> Dave Swarthout
> Homer, Alaska
> Chiang Mai, Thailand
> Travel Blog at > http://dswarthout.blogspot.com 
> <http://dswarthout.blogspot.com>
_______________________________________________
Tagging mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/tagging

Reply via email to