-
Notifications
You must be signed in to change notification settings - Fork 819
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
Change way_pixels calculation to use scale_denominator #3657
Conversation
Previously way_pixels was calculated from the way_area in square meters by dividing by pixel_width and pixel_height, however, this causes the calculation to change when the resolution is changed. Using the scale_denominator results in a consistent rendering at different rendering resolutions, and should be more compatible with vector tiles
In #3648 we discussed the best way to show this code. @imagico had suggested basing it on the ppi (pixels per inch) of the standard resolution, which is approximately 90.71, hence:
I think the current code, However, I'm happy to change this. |
Tested and works fine, thanks. Would still be good to get some feedback if this is useful in practical for-print rendering |
Good to have this finally fixed! |
Thanks! I use Kosmtik’s export function for printing, so it will help me,
at least.
I hope it will help with generating PDFs and SVG files for printing too.
(BTW, does anyone know a good way to create PDFs for printing?)
…On Sun, Feb 3, 2019 at 5:02 AM Matthijs Melissen ***@***.***> wrote:
Good to have this finally fixed!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3657 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AoxshOCuH-KOzB6hMIsVpOoNQGrB11Zsks5vJe7fgaJpZM4aUjko>
.
|
Have you looked into MyOSMatic? It creates printable maps and I think it supports PDF. If so, maybe you could email the person that created for ideas. |
That’s true, I’ve used their service before, but I assume it runs on Unix?
I think @imagico should suggest that they add his alt-colors style to the
options at https://maposmatic.osm-baustelle.de/. That way we could make
test renderings of any part of the world at mid and high zoom levels. It’s
also a pretty nice looking style for printing.
…On Sun, Feb 3, 2019 at 1:04 PM Adamant36 ***@***.***> wrote:
Have you looked into MyOSMatic <https://maposmatic.osm-baustelle.de/>? It
creates printable maps and I think it supports PDF. If so, maybe you could
email the person that created for ideas.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#3657 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AoxshDvZMo-OdU85grzIZMkcNc6Ry8T3ks5vJl_hgaJpZM4aUjko>
.
|
As it seems it's difficult to use way_pixels on vector tiles, I've played a bit with the MSS code. It is possible to define in MSS this variable |
Way pixels has two uses - MSS filtering and SQL filtering. The SQL filtering is important for performance. |
Changes proposed in this pull request:
Explanation:
way_pixels
is calculated from the way_area (which represents the approximate area of a polygon in square meters, but by Mercator projection) by dividing by pixel_width * pixel_height.Test rendering with links to the example places:
Southern Australia
9/-32.7988/137.0764
Screenshot at standard resolution - unchanged before and after PR
z8
z9
Export at 2x resolution
z8 2x Before
z8 2x After