[OSM-talk] Slippy map - Mapnik layer UK coastlines
Jon Burgess
jburgess777 at googlemail.com
Fri Mar 23 19:42:51 GMT 2007
On Fri, 2007-03-23 at 19:38 +0100, Martijn van Oosterhout wrote:
> On 3/23/07, David Groom <reviews at pacific-rim.net> wrote:
> > I can see advantages and disadvantages to storing polygons in the main OSM
> > database. One disadvantage I guess is it will dramatically increase the
> > amount of data in the database, but I presume it would have the advantage
> > that the polygons can be edited / amended using the usual OSM tools, so that
> > alterations could be made by people with local knowledge.
>
A combination of factors make storing the coastline as a polygon in OSM
and editting it using current tools impractical:
1) A Polygon can currently only be represented by a single way where the
start=end. Hence the UK coastline would all have to be in a single way
with 300,000+ nodes (based on stats generated as below).
2) Editors like JOSM need to download all nodes and segments of a way
before they can successfully perform edits.
3) Josm can not handle loading a single way as big as the UK coastline
on a "reasonably" spec'd PC.
I filtered a planet.osm dump to first produce a "uk.osm" file. Then
filtered again to produce an OSM file containing just the coastline
using planetosm-excerpt-area.pl and planetosm-excerpt-tags.pl.
This results in a 146MB uk-coast.osm file. This is approximately 10
times larger than JOSM can reasonably load on my PC. It is also an
enormous download for anyone wishing to modify a small part of the UK
coastline.
One possibility might be to introduce a special tag to indicate that the
way is part of a larger polygon (or superway if you prefer that). If
the individual ways were tagged with "superway=uk-coastline" this might
allow mapnik et al. to reconstruct the whole polygon while also allowing
editors to recognise that these ways may need special treatment.
> You know, there is no reason why all this has to be in the main
> database. Surely JOSM could be setup to have multiple data layer, one
> for streetdata, one for coastlines, and fetch them from different
> servers...
>
Could add another for TIGER pointing to another external DB.
Jon
More information about the talk
mailing list