Zverik / Nik4

Mapnik to image export
Do What The F*ck You Want To Public License
123 stars 23 forks source link

Cannot input both ppi and scale_factor #42

Open JBacc1 opened 3 years ago

JBacc1 commented 3 years ago

When inputing both ppi and scale_factor, scale_factor is overwritten. The "zoom-level" used (which is passed to mapnik through the scale_factor) seems to not be changeable at a given dpi and scale (which is not not self-contradicting). Probably the same that you cannot input both zoom and scale (scale is overwritten). Is it too specialised (or badly-understood) a problem to be taken into account? (I'm usually using options: paper, dpi, scale, factor, center)

JBacc1 commented 2 years ago

Finally, I got around the issue by adding, between the fix_scale and bbox steps, a forced scale_factor update:

    if options.factor:
        scale_factor = options.factor

Works fine for me, may not be very clean…