pnorman / spirit

Creative Commons Zero v1.0 Universal
10 stars 1 forks source link

Water polygons are not merged #35

Open westnordost opened 8 months ago

westnordost commented 8 months ago

The StreetComplete style draws lines around water bodies as "shore lines". The various docks and canals in Hamburg are mapped in OSM each as individual neighboring polygons.

Current behavior

Neighbouring water polygons are not merged. The area around Ellerholzbrücke looks like this:

ellerholzbruecke-tilekiln

See https://streetcomplete.app/map-osm/

Expected behavior

Neighbouring water polygons are merged. The area around Ellerholzbrücke looks like this with the JawgMaps tiles:

ellerholzbruecke-jawg

See https://streetcomplete.app/map-jawg/

pnorman commented 8 months ago

I should merge them for tile size, but it's valid to have them unmerged. In fact, if you're dealing with multiple water= values, they can't* be fully merged.

westnordost commented 8 months ago

True, I think jawg just throws all water into one bucket. Shortbread doesn't.

pnorman commented 8 months ago

You probably want an offset polygon approach similar to the standard ways of doing strokes on roads. You should only directly style a line on a polygon if you want two of the same type of polygon to be distinct.

westnordost commented 8 months ago

Not sure what you mean.

pnorman commented 8 months ago

What you're getting will always end up happening when styling the outer line of a polygon.

westnordost commented 8 months ago

But is there another way?

pnorman commented 8 months ago

Yes - a larger fill followed by a smaller inner, the same way we do casings on roads.

westnordost commented 8 months ago

Oh, I have been using "line-gap-width" for the casing. But anyway, when using two fill layers with one of them being slightly offset to be smaller, it sounds like it would result in the same rendering as when using an offset line for the "shore".