Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Alternate text for upside down rendering #1533

Closed
herm opened this Issue · 7 comments

3 participants

Hermann Kraus Stephan Bösch-Plepelits Dane Springmeyer
Hermann Kraus
Collaborator

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:
http://mapnik.org/news/2012/10/06/gsoc2012-status9/
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=""
functionality.

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?

greetings,
Stephan

Hermann Kraus herm was assigned
Hermann Kraus herm referenced this issue from a commit
Hermann Kraus herm Implement upright=right_only/left_only.
Closes #1533.
7754f37
Hermann Kraus
Collaborator

Implemented. Sample file is included.

Hermann Kraus herm closed this
Stephan Bösch-Plepelits

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.

Hermann Kraus herm reopened this
Hermann Kraus
Collaborator

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"?

Stephan Bösch-Plepelits

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

How can I help? The way in question in the image is http://www.openstreetmap.org/browse/way/13449372

greetings, Plepe

Dane Springmeyer
Owner

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

Stephan Bösch-Plepelits

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.

Thanks!

Dane Springmeyer
Owner

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
Something went wrong with that request. Please try again.