Alternate text for upside down rendering #1533

herm opened this Issue Oct 13, 2012 · 7 comments


None yet

3 participants

herm commented Oct 13, 2012

On Sat, Oct 13, 2012 at 03:44:01AM +0200, Hermann Kraus wrote:

As my Google Summer of Code project I worked on improving Mapnik's text
rendering. The most important change was adding support for complex
scripts, but I also implemented some other nice features. You can read
more about my work here:
Build instructions are included and I would like to hear about your
success stories, but bug reports are also welcome.
Wow, thanks a lot! I was especially waiting for the upright=""

In an application I'm planning to use this, I would actually prefer to use
an alternate text if it is turned upside down (because I'd like to print
"<- that way" or "that way ->" depending on rotation).

Something like:

<TextSymbolizer upright="alternate" alternate_text="[name_right]">[name_left]</TextSymbolizer>

or (maybe easier):

<TextSymbolizer upright="only_left">[name_left]</TextSymbolizer>
<TextSymbolizer upright="only_right">[name_right]</TextSymbolizer>

Do you think this would be possible?


@herm herm was assigned Oct 13, 2012
@herm herm added a commit that referenced this issue Apr 2, 2013
@herm herm Implement upright=right_only/left_only.
Closes #1533.
herm commented Apr 2, 2013

Implemented. Sample file is included.

@herm herm closed this Apr 2, 2013
plepe commented Apr 14, 2013

On ways running from right/bottom to left/top resp. right/top to left/bottom (the two cases which are not included in the visual test) the labels are written on the head - the wrong "upright" is chosen. See the two attached images.
45460 90920

Note: the arrows do not show the direction of the way.

@herm herm reopened this Apr 14, 2013
@herm herm added a commit that referenced this issue Apr 14, 2013
@herm herm Add more tests for upright="XXX_only".
Refs #1533.
herm commented Apr 14, 2013

I am unable to reproduce the problem. I added more tests and it seems to work. Is the text rendered correctly if you set upright = "auto"?

plepe commented Apr 15, 2013

With upright="auto" the labels are turned the right way (but pointing in the wrong direction):

How can I help? The way in question in the image is

greetings, Plepe


@plepe - can you confirm if this problem still persists? Test with master branch after #2087

plepe commented Nov 24, 2013

It seems that the problem has been solved. Rendering the area with the old setup the problem is still visible (therefore possible changes in the data had no effect), but with the new Mapnik version the problem is gone and the result looks awesome. Hurray!

Btw, I couldn't get mod_tile to work, see openstreetmap/mod_tile#55.



great, thanks for confirming! Will close this now. I commented on the mod_tile bug: looks like mapnik-config --defines -cxxflags are being ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment