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

remove text-min-distance - increase label density #2195

Merged
merged 1 commit into from
Jun 25, 2016
Merged

remove text-min-distance - increase label density #2195

merged 1 commit into from
Jun 25, 2016

Conversation

matkoniecz
Copy link
Contributor

This results in rendering more labels for placenames for renderers using Mapnik 2.

For renderers using Mapnik 3 this will have no effect (text-min-distance is applicable only to text placed on line).

This change is equivalent in effect to upgrading to Mapnik 3.

fixes #2189, related to #1935

According to my testing rendering more placenames results in much better/better map (in many cases), unchanged (most cases) or at least not worse (in rare cases).

Some examples with changes to lower zoom levels are at #2189 (comment)

Examples of changes to higher will be below.

Note that attached rendered examples were not generated with exactly the same code as submitted in PR (code included removal of text-line-spacing: 1; in for country names).

https://cloud.githubusercontent.com/assets/899988/16321281/5f3e6b84-399c-11e6-801f-8a3943bb7c68.png
https://cloud.githubusercontent.com/assets/899988/16321286/5f65bcfc-399c-11e6-8401-f102992c47c6.png
https://cloud.githubusercontent.com/assets/899988/16321283/5f63983c-399c-11e6-8cb1-132f796c8a76.png
https://cloud.githubusercontent.com/assets/899988/16321285/5f63f08e-399c-11e6-9941-50c798fdc08c.png
https://cloud.githubusercontent.com/assets/899988/16321284/5f63850e-399c-11e6-9ba9-63c9d9a36dd9.png
https://cloud.githubusercontent.com/assets/899988/16321288/5f7771e0-399c-11e6-82d6-9d3ec50cb167.png
https://cloud.githubusercontent.com/assets/899988/16321289/5f7e01ea-399c-11e6-8003-1030e70c53b5.png
https://cloud.githubusercontent.com/assets/899988/16321291/5f812212-399c-11e6-898e-ef6f488edbd3.png
https://cloud.githubusercontent.com/assets/899988/16321290/5f80d53c-399c-11e6-9e61-fe4e302cdf1c.png
https://cloud.githubusercontent.com/assets/899988/16321293/5f831b12-399c-11e6-9569-f5dfabe485a6.png
https://cloud.githubusercontent.com/assets/899988/16321292/5f82af7e-399c-11e6-8615-e25d71ae559e.png
https://cloud.githubusercontent.com/assets/899988/16321287/5f665720-399c-11e6-81f3-c1a8d0a41552.png
https://cloud.githubusercontent.com/assets/899988/16321294/5f99b61a-399c-11e6-8a1a-ee9dd3d6654d.png
https://cloud.githubusercontent.com/assets/899988/16321295/5f9d066c-399c-11e6-82f0-f8d18504fd7e.png
https://cloud.githubusercontent.com/assets/899988/16321296/5f9eca38-399c-11e6-8fb8-a70000b413d1.png

This results in rendering more labels for placenames for renderers using Mapnik 2.

For renderers using Mapnik 3 this will have no effect (text-min-distance is applicable only to text placed on line).

This change is equivalent in effect to upgrading to Mapnik 3.

fixes #2189, related to #1935
@matkoniecz
Copy link
Contributor Author

matkoniecz commented Jun 23, 2016

Note: above notes about Mapnik 2/3 may be untrue - see my confusion at #2189 and correction by @nebulon42.

@pnorman
Copy link
Collaborator

pnorman commented Jun 25, 2016

I'm not seeing many differences locally when comparing production and this branch - what types of areas would be good to review?

@matkoniecz
Copy link
Contributor Author

I'm not seeing many differences locally when comparing production and this branch

What version of mapnik you are using? With mapnik 3.0 text-min-distance is anyway working only for lines. It is caused caused by redefining text-min-distance from mapnik 2.3 where it means

Minimum permitted distance to the next text symbolizer.

to

Minimum distance to the next label with the same text. Only works for line placement. Deprecated: replaced by text-repeat-distance and text-margin

In mapnik 3.0.

https://github.com/mapbox/carto/blob/master/docs/2.3.0.md#text-min-distance-float
https://github.com/mapbox/carto/blob/master/docs/3.0.0.md#text-min-distance-float

That is what I mean by "change is equivalent in effect to upgrading to Mapnik 3".

what types of areas would be good to review?

High density of placenames competing to be displayed with other labels. I see no obvious candidates in region where you edit. In USA effect should be most noticeable in regions like New York (many towns, cities). In Seattle effect is less pronounced as it is on higher latitude and density is lower.

@matthijsmelissen matthijsmelissen merged commit 3b5ba78 into gravitystorm:master Jun 25, 2016
@matkoniecz matkoniecz deleted the preempt_mapnik3 branch June 25, 2016 20:33
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

Successfully merging this pull request may close these issues.

remove "text-min-distance" in placenames.mss
3 participants