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

Artifacts in plant_nursery pattern #2771

Closed
kocio-pl opened this issue Aug 23, 2017 · 4 comments · Fixed by #4458
Closed

Artifacts in plant_nursery pattern #2771

kocio-pl opened this issue Aug 23, 2017 · 4 comments · Fixed by #4458

Comments

@kocio-pl
Copy link
Collaborator

Follow up to #2759 (comment).

Current plant_nursery pattern is not regular - there are subtle artifacts (some rows and columns are bit wider):
screen shot 2017-08-19 at 00 04 29

It's visible in pattern generator with current settings:

http://www.imagico.de/map/jsdotpattern.php#x,128,jdp32360;gv,6,32,32;rd,1,0,0,pixel,0.125,4,4,0,jdp23814,749d6c,aedea3

Changing distance from 6 to 8 seems to be enough to get rid of this effect:

http://www.imagico.de/map/jsdotpattern.php#x,128,jdp32360;gv,8,32,32;rd,1,0,0,pixel,0.125,4,4,0,jdp23814,749d6c,aedea3

The question is if it would be safe to produce SVG version or just recreate PNG image with a fixed pattern?

@kocio-pl kocio-pl added this to the Bugs and improvements milestone Aug 23, 2017
@sommerluk
Copy link
Collaborator

some rows and columns are bit wider

This is because 6 (the distance) is not a divisor 128 (the pattern size), so obviously using 8 as distance fixes this. This is independent of #2750 and applies to both SVG and PNG.

As rendering is pixel-aligned and the symbol is a simple pixel, this pattern might likely work as SVG.

@kocio-pl
Copy link
Collaborator Author

Makes sense now... 😄

PNG (distance 6)->SVG (distance 8), z19 (click to see full size images)

Before
yjqe4jcx
After
yc nl7sc

@kocio-pl
Copy link
Collaborator Author

Well, no SVG this time, since it also uses gamma (like an orchard):

[feature = 'landuse_plant_nursery'] {
[zoom >= 10] {
polygon-fill: @orchard;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}
[zoom >= 14] {
polygon-pattern-file: url('symbols/plant_nursery.png');
polygon-pattern-alignment: global;
[way_pixels >= 4] { polygon-pattern-gamma: 0.75; }
[way_pixels >= 64] { polygon-pattern-gamma: 0.3; }
}
}

@kocio-pl
Copy link
Collaborator Author

Closing this as a small problem which I'm not going to investigate deeper at the moment. It can be reopened if needed, of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants