[OSM-talk] Mapnik name rendering problem case

Artem Pavlenko artem.mapnik at googlemail.com
Fri Aug 24 11:30:25 BST 2007


Hi David,

On 17/08/07, David Earl <david at frankieandshadow.com> wrote:
> Probably one for Artem:
>
> In this location on Mapnik...
>
> http://www.openstreetmap.org/?lat=52.206067043510274&lon=0.11694516460297456&zoom=18&layers=B0F
>
> 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?
>
> David
>

Artem
> _______________________________________________
> talk mailing list
> talk at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
>




More information about the talk mailing list