Coastline

From OpenStreetMap Wiki
Jump to navigation Jump to search

two merging arrows

It has been proposed that this page or section be merged with Tag:natural=coastline. (Discuss)
Logo. Feature : Coastline
One example for Feature : Coastline
Description
Where the land meets the sea
Group

Marine

Tags

natural=coastline

The coastline is a rich and complex environment at the edge of the marine environment including cliffs, beaches, harbors, headlands, bays, wetlands and islands.

Tagging coastlines in OSM

The natural=coastline tag is used to mark  mean high water springs (also known as mean high-water level; MHWL) which is the point of highest tide. See natural=coastline for all the details. See also de:Coastline for much more details. If you want to map a water feature with highly variable contour over time, but there is no official data source for its MHWL, one suggestion, albeit laborious, for inferring a better approximate mean contour is to overlay images from sources such as OpenAerialMap and Sentinel-2 from various scattered random dates.

Avoid building large boundary or multipolygon relations (e.g. large bays, peninsulas, or continents) out of coastline segments since this will often create polygons that are very difficult to edit and process. That is the reason why we are using natural=coastline the way we do - instead of building huge landmass relations. Each time any coastline way is split by someone during normal editing, a new version of the relation is created and needs to be uploaded. Such huge objects tend to be frowned upon by the community and require a very good reason for their existence. Often the desired effect can be achieved by building a simpler, less precise polygon or by simply using a node.

Using OSM coastline data

The presentation of the coastline is often more complex than that for other features.

The main problem of showing coastlines from OSM data is that many renderers really need closed polygons. The polygon can (and normally should) be made of several ways, but the ways should join end-to-end and eventually loop back round without interruption, to close the polygon. An imperfect coastline with many small gaps, reversed ways and other defects will cause the polygon to break, and the coastline to be rendered incorrectly.

Pay attention to data limitation caused by 180th meridian and Antarctica.

Rendering in Standard tile layer on openstreetmap.org

For OpenStreetMap Carto there can be significant delays between changes being made to the high water line and its appearance on the map. This can be easily several days.

Coastline rendering in Standard tile layer on openstreetmap.org may update later than other rendering changes. There are two reasons for this:

  • To avoid major disruptions of map rendering due to data errors (entire continents displayed as sea instead as land) the coastline is not automatically updated if there are larger changes in the geometry compared to the last time it was successfully processed. For example any addition or removal of a large lake with coastline tag will require manual intervention. This is done to avoid entire continents being flooded because someone broke small coastline section. You can look at the update times of the layers on https://osmdata.openstreetmap.de/data/land-polygons.html to see when the last successful update of the coastlines was done.
  • Normally changes in OSM data will be detected by the update process on the tile servers and affected tiles will be marked as to be updated. This does not always happen correctly for coastlines. The problem is that the need for the update might be detected and a re-rendering scheduled, but if at that time the new coastlines aren't available (see above), it will re-render the old coastlines. So sometimes it needs further changes to trigger the re-render again.

Technical detail

At low zoom levels (used for z0–9), up to and including zoom level 9, standard tile layer renders all the sea as a solid fill of blue, generated from the shapefile simplified-land-polygons-complete-3857.zip from osmdata.openstreetmap.de, which has a relatively low resolution. At higher zoom levels the coast polygons used are generated from a larger shapefile (land-polygons-split-3857.zip). These files are automatically generated daily from planet dumps + diffs, but they will only be made available if the coastlines are geometrically correct (or can be fixed to be correct, so no intersections etc.) and if they are not too different from the last valid coastline.

See also