[Tagging] natural=bay as nodes are evil

moltonel 3x Combo moltonel at gmail.com
Mon Oct 27 14:38:40 UTC 2014


On 27/10/2014, Christoph Hormann <chris_hormann at gmx.de> wrote:
> On Monday 27 October 2014, moltonel 3x Combo wrote:
>> I'm really curious what your method to figure out the bay area from
>> the node is, because even as a human I find that most bay nodes can
>> lead to many different interpretations.
>
> There are a lot of different possibilities to approach this.  A very
> simple method would be:
>
> - find the point on the coastline closest to the bay node.
> - collect all coastline segments within 2-3 times the distance of the
> closest node.
> - connect all open ends of these coastlines with the closest other open
> end.
> - assemble a polygon and use it.
>
> This extremely simple approach will probably result in reasonable
> polygons for label placement in more than half the cases.  You can
> easily improve the algorithm of course to properly deal with various
> special cases, in particular the case of small islands within a bay
> deserves consideration.

That's a very fragile algorythm. It depends on the mapper placing the
node at a strategic point. And it has problem with long thin bays for
example. You might start to see mappers tune the node position to
match your algorythm. And then you'll tune your algorythm, breaking
the mapper's tuning. It's quirky and might be expensive to run.

Having an algorythm to turn nodes into areas is not a bad thing, since
we currently have many more bay nodes than areas in the db. But it's a
fallback at best. And until you get something working reasonably well
upstreamed in all data consumers, we mappers should bite the bullet
and map bays as areas (in other words, not treat them any different
than any other area-like obbjects in osm).



More information about the Tagging mailing list