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

DPI and zoom levels #39

Open
Phyks opened this issue Jul 18, 2019 · 0 comments
Open

DPI and zoom levels #39

Phyks opened this issue Jul 18, 2019 · 0 comments

Comments

@Phyks
Copy link
Contributor

Phyks commented Jul 18, 2019

Hi,

I don't get how zoom level is computed. I would have expected

python ./nik4.py --dpi 600 -a 4 --fit route --add-layers route ../cyclosm-cartocss-style/mapnik.xml a4.png --vars gpxroute=/tmp/route.gpx

and

python ./nik4.py --dpi 300 -a 2 --fit route --add-layers route ../cyclosm-cartocss-style/mapnik.xml a2.png --vars gpxroute=/tmp/route.gpx

and

python ./nik4.py --factor 2 --dpi 600 -a 4 --fit route --add-layers route ../cyclosm-cartocss-style/mapnik.xml a4.png --vars gpxroute=/tmp/route.gpx

to give the same output as an A2 paper is twice an A4 paper in each dimension.

Changing factor and DPIs gives the same result (that is a wider image but showing the same thing, at the same zoom level, as a --dpi 300 -a 4 image). Switching to A2 paper size however gets a different result, with a different zoom level in use. However, all of the generated images (A4 or A2 with the above commands) do have the same number of pixels.

Why does dpi does not have any effect on the zoom level in use?

Thanks!

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