Coastline

From OpenStreetMap

Jump to: navigation, search

In the database we can create coastline ways with Tag:natural=coastline, however if/how this is rendered, is a complicated matter...

Contents

Coastline rendering

Unlike many things you see on the maps the rendering of coastline is handled significantly differently in the The Tiles@home ('osmarender' layer) and the Mapnik layer.

The following is a very basic, and uninformed, guide to the two:

Tiles at Home

The process for generating coastline rendering is described more fully at Tiles@home/Dev/Interim_Coastline_Support. Essentially however it allows data to be brought into the main OSM database and tagged as Tag:natural=coastline, which will cause detailed coastline to be rendered.

Since the detailed data is in the main database it can be edited in any of the usual tools, Potlatch or JOSM, which allows for correction of inaccuracies, particularly where the area in question is covered by Yahoo imagery, and the coastline can be moved to fit the image. On a larger scale the Coastline error checker gives, worldwide, a daily view of where the coastlines been uploaded and where there are problems.

Main Mapnik Layer

At low zoom levels, up to and including zoom level 9, Mapnik renders all the sea as a solid fill of blue, generated from two shapefiles (used for z0-6 and z7-9 respectively), which have relatively low resolution.

At high zoom levels the coast polygons used are generated from the natural=coastline tag -- the data is made available to the Mapnik renderer as a large shapefile generated by the coastline error checker. This high resolution data is not updated on a regular basis, but is updated manually every so often when the data doesn't look too broken.

Other users of Mapnik may handle coastline differently.

Shapefiles from the database

The main problem of showing coastlines from OSM data is that Mapnik really needs 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. For many areas the coastlines are imperfect, with many small gaps, reversed ways and other defects. One of the features of the Coastline error checker is to try and join coastlines in such a way as to make high-quality coastlines even with these imperfections. As the coastlines are uploaded and completed the quality can be checked.

Uploading coastline

If the part of the world you are interested in does not appear to have its coastline in the database, then look at Running the coastline upload to find out how to upload it yourself.

Personal tools
recent changes