Alternate text for upside down rendering #1533

Closed
herm opened this Issue Oct 13, 2012 · 7 comments

Projects

None yet

3 participants

Member
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:
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

@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.
7754f37
Member
herm commented Apr 2, 2013

Implemented. Sample file is included.

@herm herm closed this Apr 2, 2013
Contributor
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.
b42cf19
Member
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"?

Contributor
plepe commented Apr 15, 2013

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

Owner

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

Contributor
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.

Thanks!

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