Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Positions attribute in text symbolizer #463

Closed
artemp opened this issue Oct 11, 2011 · 5 comments
Closed

Positions attribute in text symbolizer #463

artemp opened this issue Oct 11, 2011 · 5 comments

Comments

@artemp
Copy link
Member

artemp commented Oct 11, 2011

Patch from kosmosnimki (http://lists.berlios.de/pipermail/mapnik-users/2009-April/001787.html) and correspondence:

{{{
The #1 most visible tweak was placing labels at different positions
around points: we added a "positions" sattribute to TextSymbolizer,
with values like "s,n,e,se,ne,w" that would get tried in that order
for every label to be placed.

Vladimir


Hello Dane,

Just created diff file with our latest changes.
The svn revision was 1363.
I used "svn diff > my-patch-file.diff" command.

Please, let me know anything.

Michael Vorotnikov.
}}}

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[springmeyer] Patch from kosmosnimki (http://lists.berlios.de/pipermail/mapnik-users/2009-April/001787.html) and correspondence:

{{{
The #1 most visible tweak was placing labels at different positions
around points: we added a "positions" sattribute to TextSymbolizer,
with values like "s,n,e,se,ne,w" that would get tried in that order
for every label to be placed.

Vladimir


Hello Dane,

Just created diff file with our latest changes.
The svn revision was 1363.
I used "svn diff > my-patch-file.diff" command.

Please, let me know anything.

Michael Vorotnikov.
}}}

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[springmeyer] {{{
In the future there are several things you should do to make the patch smaller:

  • Use Unix line ending in your text editor or do $ svn diff -x --ignore-eol-style
  • Use four spaces instead of actual tabs or do $ svn diff -x --ignore-all-space

Besides removing whitespace and line endings, I have made several changes to get the patch to compile:

  • Removed all the 'get_shape_name' references - was this just for testing or does it have an impact on placement?
  • Added back jpeg support
  • added dummy functions in placement_finder and label_collision_detector to allow the cairo_renderer to temporarily use previous function signatures
  • changed the 'for each' usage with builder.Places() in placement finder which did not compile as it is not compliant C++ STL

I have attached the modified patch to this email. Can you apply to a pristine trunk checkout and see if it still works for you?

Also, can you explain more about the 'get_shape_name' code that I removed? What did it do?
And can you also explain why allow_overlap has been changed to a std::string? It seems like it should stay a bool and some other attribute should be created if a std::string is needed.

Thank you,

Dane
}}}

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[springmeyer] My modified patch attached.

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[springmeyer] adding Herm as we have discussed issues related to this ticket.

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[springmeyer] This feature is now working in the textplacement branch using a different approach than the original patch, so closing this and moving to that milestone http://trac.mapnik.org/milestone/GSOC%20Text%20Placement until it is merged into trunk.

@artemp artemp closed this as completed Oct 11, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant