As I can see this is a frequently discussed subject. The interest for the subject is especially high when doing streaming based mapping. I am one of these and doing the coastline-to-land conversion process frequently. So, let me allow a few related notes.<div>
If interested, you can find (and download) the planet_land (area) files, based on OSM coastline source data just from a short wile ago. The link is here</div><div><a href="https://docs.google.com/folder/d/0B6qGm3k2qWHqb0xnLUVKc0ZyMzQ/edit" target="_blank" style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">https://docs.google.com/folder/d/0B6qGm3k2qWHqb0xnLUVKc0ZyMzQ/edit</a>
</div><div>Careful, some of the polygons are really huge. The source data consists of 27 787 840 points/nodes in 685 610 polylines. The conversion is a chain of processes:</div><div>-LatLong to the usual Mercator projection.</div>
<div>-Formal error detection and reparation. The number of errors was 15, surprisingly low, excellent.</div><div>-Defragmentation, or polylines to polygons transformation. There were some replicated polygons and points. These were ignored. The number of polygons is 455 636 and the number of points is 27 555 018.. There is no structure in this set of polygons. Any semantic relational tags are ignored. </div>
<div>-The final process was the polygons to areas transformation/structuring. The area structure detection is topology/geometry criteria based. Anyway, the topology is here overriding any other criteria. The number of areas is 455 398. These areas are in the planet_land file. Otherwise, the vector structure is the same as in the original data. </div>
<div>Now, this area file may be (and is) subject of many further actions. In bullets:</div><div>-Inversion to planet_sea data. This, to make more effective streaming based client rendering (we mostly pan, zoom, rotate ... in land areas so this is the background color). Note that this is not necessary if you use a robust scan-line based fill (compared to a polygon based algorithm).</div>
<div>-Scale/zoom level generation by vector smoothing and data reduction, These levels allow continuous scaling and a radically low data size to transmit to clients. An example of a such level is also reachable by the given link. It is supposed to be used for scales between 1:90 000 000 and 1;180 000 000 (for other scales other levels are used). It contains only 6898 points.</div>
<div>-Finally the global tiling (or generating of large tiles). The local (or small) tiles for transmission are generated on-the-fly. Now, such tiled data is loaded into a DB (if needed at all). Scale levels combined with the tiling allow compact data formats and radically reduced data size per km**2 equivalent (just several kB) in transmission.</div>
<div>Thanks for your attention.</div><div>Sandor</div>