-
Notifications
You must be signed in to change notification settings - Fork 827
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
Don't render tiny water areas #867
Don't render tiny water areas #867
Conversation
Don't render tiny water areas (4px or less). This should resolve gravitystorm#73.
👎, this will cause parts of rivers to disappear. I could see going for |
@imagico, thanks, closing this one. |
Great test! Do you have a way to test which value causes river problems too? |
I don't see any river problems in my Oklahoma test. With my suggested threshold, only river parts smaller than one thousandth of a pixel would be hidden, and these parts are probably not observable even if they are shown. |
Wow, the possibilities of Carto-CSS are impressive! (Of course, the gamma issue that @imagico mentions should be looked into anyway.) |
I think this might potentially also be useful for landcover. |
Does anyone understand the rendering algorithm by the way? Why would an area of 0,001 with non-zero gamma lead to a cyan pixel? |
Wild guess: anti-aliasing gone bad? |
@math1985 - the exact mechanism how the cyan color is produced eludes me, this could be some kind of accumulated rounding error (i.e. a bug) or a perfectly normal side effect of the gamma manipulation. Generally this whole gamma thing is a really ugly way to work around a systemic limitation of the rendering framework. The gamma parameter is originally not intended to be used this way, it is meant for optimizing antialiasing for specific characteristics of the output device (see http://www.antigrain.com/research/gamma_correction/). The way it is usually used in mapnik actually reduces antialiasing quality so it is more or less used against its original intent. And limiting the gamma manipulation to larger polygons works fine, here for example with a limit of 0.1 pixel polygon size: |
polygon-gamma was left over from the XML conversion, and doesn't actually seem to help anything Fixes gravitystorm#73 Superceeds gravitystorm#867
Don't render tiny water areas (4px or less).
This should resolve #73.