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
17 stars 1 forks source link

Distinguish maritime boundaries from land boundaries #744

Open 1ec5 opened 2 months ago

1ec5 commented 2 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 1 month 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 1 month ago

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

1ec5 commented 1 month 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 1 month 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 1 month 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 3 weeks 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 2 weeks 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