[OSM-talk] Mapnik name rendering problem case
artem.mapnik at googlemail.com
Fri Aug 24 11:30:25 BST 2007
On 17/08/07, David Earl <david at frankieandshadow.com> wrote:
> Probably one for Artem:
> In this location on Mapnik...
> the caption for Trinity Lane is upside down. I am preparing a map for
> publication and the proofreaders picked this up.
Yes, fair point.
> I think I see why: the southern arm points just a degree or two east of
> south, and the eastern branch just a degree or two south of east. I'm
> guessing you're looking at the southern arm, which on its own would have
> text with top to the right, but because it goes round the corner, it
> looks like it is the wrong way up.
> Obviously there are cases that are unsolvable, like a W shape on its
> side, and I'm sure this case is hard. If, as I suspect, you are
> inspecting only one segment to determine direction,
I'll need to check but sounds plausible.
I wonder whether you
> could take all the segments into which the string will flow (which
> presumably you know) into account. You could average the angle perhaps,
> but maybe weight nearer horizontals more highly, as these have more
> influence on the reader than near verticals.
I think text placement logic should only consider geometry (segments)
where text will be placed.
Then even in case of 'W' on its side we only consider middle '>' or
'<' (depending on text lenght, scale obviously). Then we can
calculate (avarage) the angle based on those segments. Would this
solve the problem? ..
> In the meantime, I'm going to run the way in the other direction, which
> I think will solve the problem for now.
Did it solve it?
> talk mailing list
> talk at openstreetmap.org
More information about the talk