-
Notifications
You must be signed in to change notification settings - Fork 24
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
scale_factor is misused? #20
Comments
Why can't you use |
There's not real difference - use ppi or factor — in both cases the map is scaled while I'm seeking for a way to scale features only. Let's see:
First, that same message:
while I don't like tiles. # ppi and scale factor are the same thing
if options.ppi:
ppmm = options.ppi / 25.4
scale_factor = options.ppi / 90.7 # ≈ 3.30
else:
... But is this scaling enough? |
Discussed on the IRC. Nik4 tries hard to preserve relative dimensions, so it protects from changing scale_factor apart from ppi. You can either change line 264 locally, or use nik2img, which doesn't have any checks. |
Привет, Зверик :)
I may be totally wrong but from my observations current implementation of
scale_factor
doesn't seem to work as expected.Let's take an example invocation:
This generates an image with dimensions 5809x7350 with unscaled features.
So I'm gonna get use of documented
scale_factor
which is implemented in Nik4 as--factor
parameter:and I get a double-sized image:
11618x14701
. Yet, labels (and the rest) are very tiny — which is pretty expected as thescale_factor
is not enough. But increasing it up to6
or more leads to even bigger images which requires--tiles
to be used - which is not an option. This happens also if the target is set to PDF.After brief code review I saw that
scale_factor
variable takes part in calculating map scale and the size of the resulting image. Which made me think that it is sorta misused: the only actual purpose ofscale_factor
— is to scale features. So I'd expect my image to be of the same5809x7350
size but with scaled text and features.In attempt to figure out an alternative approach of doing things I patched Nik4 by adding an additional parameter
--factor2
which is then passed tomapnik.render()
directly. As I expected the image size was preserved (5809x7350
) and the features were scaled. But this was not flawless, as lot of features began to disappear :(For example, this rule from
placenames.mss
:is not triggered at all at
-z 15
and I had to change it to[zoom >= 12] {
to get those features back.Well, any ideas?
Че делать-та?
The text was updated successfully, but these errors were encountered: