Where is the coastline?

By common agreement the coastline is tagged at the mean high water spring line. Basically that is the highest line the water reaches in normal circumstances. (See the images to the right for some ideas how to decide where that line is.)

The border between wet and dry sand roughly marks the high water line

Flotsam roughly marks the high water line

Around Antarctica where there are ice shelves the coastline is mapped at the "calving line", that is the line where the open water meets the permanent ice shelves. See Antarctica/Tagging for details.

How to enter the data

Tagging the coastline is a bit different than with all other features in OSM and you should be careful to get this right. Make sure you use natural=coastline on ways, not nodes or relations.

For smaller islands a single closed way can be drawn around the perimeter of an island, looping back on itself. For larger landmasses the coastline is defined as a series of linear ways connected end to end. These ways must create a continuous interlinked coastline, the end node of one way must be the start node of the next way. A break in the coastline or other error can cause serious difficulties when using this data. If you are not confident about editing, it is best to not make major changes beyond adjusting nodes to align better with aerial imagery.

The direction the ways are drawn is very important! They must be drawn so that the land is on the left side and water on the right side of the way (when viewing in the direction of the way arrows). If you regard this as tracing around an area of land, then the coastline way should be running counterclockwise.

Coastlines often coincide with other features, such as river mouths, landuse and boundaries. You can split up the coastline in as many pieces as you need to, just make sure there is always a continuous line.

Do not tag nodes or relations with natural=coastline.

What about lakes?

Before multipolygon relations were added to OSM, some large lakes were also tagged with natural=coastline, but they all have been converted now. The only waterbody without level connection to the oceans that is using this tag is the Caspian Sea. You should not use this tag for any other inland water areas.

River mouths

River ways tagged as waterway=river or waterway=stream end at the coastline on a common node for the river way and the coastline way. Larger rivers tagged with waterway=riverbank or natural=water and water=river have a way across their mouth that is tagged natural=coastline. In those cases the river line can also extend on the other side of the coastline, for example if there is a dug deepwater channel or a marked shipping lane.

Data sources

The shoreline data for most parts of the world was originally generated from a low-resolution data using the PGS import and other imports. Inaccurate shorelines can be seen mostly in a sawtooth shape, whereas in reality the coastlines are mostly gentle curves. In many parts of the world the coastline ways have subsequently been improved either with tracing from aerial imagery, or replaced by better vector data.

Be careful when tracing coastlines from aerial images. Those images are often not quite in the right position, so your coastline might look like it fits perfectly to the images, but in reality it is a few hundred meters off. Make sure that the data fits to GPS data.

Errors and consistency checking

It is very important that the coastline is formed and tagged correctly. A single error in the coastline somewhere in Africa might mean the whole Asia-Africa-Europe continent can't be drawn correctly! Always make sure the coastline has the right orientation (land to the left, water to the right). Do not cross a coastline over itself - this has no meaning and may cause renderers to behave badly. Don't use the same point twice (pinch point) other than the start/end point (if appropriate). If you want to make an island, start a new way.