[Tagging] Another multipolygon question
daveswarthout at gmail.com
Fri Oct 26 09:52:36 UTC 2018
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 <kevin.b.kenny at gmail.com>
> On Thu, Oct 25, 2018 at 10:40 PM Dave Swarthout <daveswarthout at gmail.com>
>> 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
> 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.
Chiang Mai, Thailand
Travel Blog at http://dswarthout.blogspot.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tagging