[Imports] Boundary of Tonga

Toby Murray toby.murray at gmail.com
Tue May 15 20:22:56 UTC 2012


On Tue, May 15, 2012 at 12:30 PM, Andy Allan <gravitystorm at gmail.com> wrote:
> On 15 May 2012 17:13, Toby Murray <toby.murray at gmail.com> wrote:
>
>> The only comment I would add is that it shouldn't replace the node.
>
> It should replace the node. See
> http://wiki.openstreetmap.org/wiki/Once_and_only_once
>
>> Other countries still have a node, sometimes added to the boundary
>> relation with a role of "label."
>
> Eugh, that's nasty. We should not be adding point geometries
> representing "labels" to the database.
>
>> Probably mostly because mapnik
>> renders country names from nodes, not relations.
>
> I'm sure the renderers will catch up if the nodes are removed. I
> remember kerfuffle regarding osmarender and parking nodes back in the
> day. Thankfully we tagged things sensibly (see the above wiki page)
> and, indeed, the renderer caught up.

While I don't entirely disagree with this, label placement is a tricky
thing. Look at the US. If you do some kind of center of gravity
calculation based on the whole multipolygon, Alaska and Hawaii are
going to pull the label oddly to the west. I guess you could do a
center of mass of the largest conterminous area which would result in
the expected placement of the US label (In Kansas!) but I'm not sure
if mapnik supports this.

This problem is visible on OpenCycleMap. It renders city names based
on multiploygons and it completely breaks when the city has several
exclaves as a lot of cities here do.
http://opencyclemap.org/?zoom=12&lat=39.15772&lon=-96.60744&layers=B00

So fix OpenCycleMap and I'll be happy to see the nodes vanish :)

Although even then... people have pointed out before that label
placement for cities is often expected to be in a "downtown" area or
the old part of town rather than at the centroid of any area. So...
it's complicated.

Toby



More information about the Imports mailing list