Coastline error checker
The coastline error checker AKA "coastcheck" is a tool to convert OSM coastline data in the database to shapefiles for use in Mapnik. Before creating coastlines the tool performs a number of automated checks and also some automated fixes to the OpenStreetMap data to try to yield a fully joined-up coastline. The tool is still used for this purpose. It used to also be used to directly power a map display which allowed people to quickly see errors in the coastline. The map is currently offline and doesn't render any more, but alternatives are available and you can still get shapefiles of the coast line
The source for coastcheck is available in osm svn.
Alternative map views
Since the original coastline error checker map view is offline, the alternative is now the coastline view at OSM Inspector
- OSM Inspector coastline debug view - is a similar tool. Updated daily.
Types of errors
The Coastline error checker flags several types of error:
- Large dots: these are discontinuous sections of coastline where the shapefile creator couldn't find a feasable place to continue. Usually seen where an import ended. Before you start working on large sections of coastline check the Almien_coastlines_(PGS) page to see if someone else is working on the area.
- Small dots: these are discontinuities where the shapefile creator had to create an short extra segment to continue. Usually indicates two nodes that have not yet been joined.
- Purple dots: these are coastline self-intersections. If a coastline crosses itself, then the land-water choice for the polygon will contradict itself. (Note that the current map renderers work around this, so it is hard to spot on a finished map.)
- Red lines: This is where the coastline checker has determined that the shape is wrong in some way. It may be:
- The wrong way round. The rule is "water on the right" so if a loop goes anti-clockwise on land it's wrong
- Not a shape: You need at least three nodes to make a useful shape.
- Lake on island: If there are small lakes on islands the checker flags them. While technically I could write code to make it work, you're probably better off marking it natural=water.
- Black Lines: Are shown whenever the checker couldn't make a complete loop. Occasionally seen on smaller islands, but a continent will have a thick black line around the edge if there is a break in its polygonal boundary (which is permanent for those that wrap at 180 degrees E).
If you're having a problem with an island that shows an error and you can't find anything wrong with it, check the scale. The coastline checker coalesces points that are very close together which sometimes means for very small islands you might drop below the minimal 3 points needed for an area. Check the scale in your editor and decide whether or not replacing it with a node with natural=pebble would be more appropriate.
New hosting required
Note: The tiles are currently generated on Hypercube which is not guaranteed to be around forever. Hence there is a need to find alternative hosting for the coastline checker tiles (not the main page). The main requirement is to have a daily updated planet dump to work from (Hypercube currently produces these, but if you have an alternative source, such as an existing database, perhaps something else can be arranged). After that it's about 2 hours of processing. This produces a number of shapefiles which then need a mapnik instance to serve. There are only two layers. This map is not used as intensively as the main map, so the load should not be too much.
Getting better performance than the current system should not be too hard. Contact User:Kleptog if you can help.
The coastline error checker process appears to have stopped about a year ago. Current 'processed' coastline files/tiles can be downloaded here via:
wget http://tile.openstreetmap.org/world_boundaries-spherical.tgz wget http://tile.openstreetmap.org/processed_p.tar.bz2 wget http://tile.openstreetmap.org/shoreline_300.tar.bz2
as per the Mapnik page.
Error files can be obtained here.
- OSMCoastline an alternative tool for generating shapefiles of OSM coastlines