Peach style having different zorders than the other styles
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?
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.
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.
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:
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.