OpenHistoricalMap / issues

File your issues here, regardless of repo until we get all our repos squared away; we don't want to miss anything.
Creative Commons Zero v1.0 Universal
19 stars 1 forks source link

Distinguish maritime boundaries from land boundaries #744

Open 1ec5 opened 7 months ago

1ec5 commented 7 months ago

Some map styles don’t primarily focus on boundaries, so maritime boundaries represent clutter that distracts the reader from the main data being presented. @vknoppkewetzel @tsinn @jeffreyameyer have expressed interested in visually differentiating or even hiding maritime boundaries in the main Historical stylesheet. This forum discussion discusses the pros and cons of including maritime boundaries in the database. To the extent that they are included, it should be possible for stylesheet authors to decide what to do with them.

An administrative area’s territorial water limit is tagged as maritime=yes. In OSM, other kinds of maritime boundaries, such as exclusive economic zones, are tagged as boundary=maritime, though this tag isn’t being used in OHM yet. Neither maritime=yes nor boundary=maritime is exposed in the vector tiles.

maritime=yes only applies to individual member ways of a boundary relation, not the relation itself, so our current polygon representation of boundaries cannot accommodate this attribute: #701. As discussed in that issue, the tiles would ideally contain both a polygon and linestrings for each boundary for maximum style flexibility, but this would have a significant tradeoff in size. Naïvely, we could continue to represent boundaries as polygons, but additionally represent maritime boundary ways as linestrings. However, this would only allow the stylesheet to obscure the overall boundary polygon’s line with a maritime boundary line over water, not to hide it completely. Therefore, I think this issue is blocked by #701.

jeffreyameyer commented 5 months ago

Given that #701 appears to no longer be blocking and that there are plenty of boundary relations with segments already marked with maritime=yes (see map below),

Monosnap overpass turbo 2024-05-24 17-45-01
vknoppkewetzel commented 5 months ago

Following up on this, the maritime yes/no doesn't exist here (yet :) ) image image

1ec5 commented 5 months ago

This is mostly blocked by #800, which was split out from #701, because only an administrative area completely surrounded by water would have a boundary relation that consists of only maritime boundary ways.

Rub21 commented 5 months ago

The maritime boundaries cannot be displayed together with the administrative boundaries or as attributes. Administrative boundaries come from relations and closed ways, and the attributes come from there. Since maritime=yes is an attribute of a way that could be part of a relation or not, those geometries need to be stored in another table in the database and also shown in another layer, like land_ohm_maritime. I am working on it.

1ec5 commented 5 months ago

A separate layer would only be usable for making maritime boundaries more prominent than land boundaries. It wouldn’t necessarily be useful for hiding maritime boundaries, because the style specification lacks a masking mechanism: mapbox/mapbox-gl-js#4969 mapbox/mapbox-gl-js#6267.

Edit: I guess the maritime boundary’s line layer could have the same line-color as the water fill layer’s fill-color. Seems hacky but better than nothing.

Rub21 commented 5 months ago

I added the Maritime layer, which is showing in the vtiles staging. However, it is still not efficient because it is duplicating the geometry with the admin boundary lines. I am still working on an efficient way to deploy those maritime lines. https://vtiles.staging.openhistoricalmap.org/#3.79/34.27/132.99

Screenshot 2024-06-10 at 11 28 20 PM
Rub21 commented 5 months ago

The maritime features has been deployed in production 👇 , it is showing as a additional linestring. later with https://github.com/OpenHistoricalMap/issues/issues/800 can be optimized that. image

vknoppkewetzel commented 3 months ago

Per slack discussions, I believe I cannot yet style these separately:

_Jeff: So, wait - we already have boundary lines that are just on land already? It looks to me like the over-water portion of the boundaries are still included in land_ohmlines & don't have any way of styling them differently from the over-land boundary segments: https://vtiles.openhistoricalmap.org/#5.55/32.752/-121.448 Image

\

Rub21 commented 1 week ago

@vknoppkewetzel there is another layer called land_ohm_maritime that you could use for styling the lines

image