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

Peach style having different zorders than the other styles #28

Open
beingalink opened this issue Aug 23, 2023 · 3 comments
Open

Peach style having different zorders than the other styles #28

beingalink opened this issue Aug 23, 2023 · 3 comments

Comments

@beingalink
Copy link

Hi,

thank you for this fantastic app/package! I just stumbled across a minor issue with the Peach style not showing a waterway in blue while the other styles do so (does not happen with every waterway). I had a quick look and it might have to do with the different zorders in this specific style. Is there a reason for that?

@chrieke
Copy link
Owner

chrieke commented Aug 25, 2023

Hi @beingalink thank you for the kind word. Do you have an example address or coordinates where this is happening? Will make it easier to find a solution while keeping the distinct style.

@beingalink
Copy link
Author

Hi, thanks for your reply. IMHO you should be easily able to fix that by changing the zorder to that of the other styles. Anyway, here is a script to get an example for the issue at hand:

from prettymapp.geo import get_aoi
from prettymapp.osm import get_osm_geometries
from prettymapp.plotting import Plot
from prettymapp.settings import STYLES

aoi = get_aoi(address="Göttingen, Germany", radius=1200, rectangular=False)
df = get_osm_geometries(aoi=aoi)

fig = Plot(
    df=df,
    aoi_bounds=aoi.bounds,
    draw_settings=STYLES["Peach"],
    name_on = True,
    name = "Göttingen",
    font_size = 25,
    font_color = "#2F3737",
    text_x = -44,
    text_y = 49,
    bg_buffer = 2,
    bg_color = "#F2F4CB",
).plot_all()

fig.savefig("map.png")

On the left side is a small river that should be blue.

Hope that helps.

@chrieke
Copy link
Owner

chrieke commented Aug 25, 2023

I see what you mean, Z-ordering of the Peach style really is different than the others. In your case the issue is that Peach draws water (the river) first (zorder: 1), then the grassland area is drawn above, so the river doesn't show up anymore.

However there also issues with the other oder. When drawing water above grassland etc. it can hide islands etc. like in the first example:
image

Need to think about this, maybe you also have any thoughts how the drawing order should be prioritized in general to have the least amount of errors.

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

2 participants