[OSM-talk] Making the sea blue in mapnik [getting there]
Jon Burgess
jburgess777 at googlemail.com
Sat Nov 3 22:59:36 GMT 2007
On Sat, 2007-11-03 at 23:32 +0100, Martijn van Oosterhout wrote:
> I've been looking into making the sea around NL blue in mapnik and it
> seems what needs to be done is to fix the shapefiles that describe the
> coastline. However, as anyone who has imported coastlines knows, the
> quality of the data at that level is pretty poor. To fix it you have
> to do the same work as someone who imports the data into the DB. So I
> figured, why not just extract the coastlines out of the DB and turn
> them into shapefiles?
That is a good idea. This is how I wanted to fix the Mapnik coastline
problem :-)
> Anyway, I've done this and have something working. However, it's not
> quite there yet, I need to run the equivalent of close-areas over it.
> My initial goal is to get the entire coastline of western europe
> working (well, maybe NL first) because the coastline there is almost
> completely imported. See this image:
>
> http://kleptog.org/temp/image.png
>
> White is areas that are properly closed, the black lines are unclosed
> areas but continuous and the red dots are places where the coastline
> is discontinuous. These need to be fixed so that the coastline is a
> single unbroken line.
>
> To acheive this goal only bits near portugal need to be imported, as
> well and fixing problems near italy and greece. (please coordinate
> this, not everyone at once).
>
> Hopefully within a week we can have nice seas on mapnik, even at high zoom...
Looks like a very good start.
There is one further processing step which I think we will need to do.
A single polygon for a very large area (e.g. UK, or Europe) will have an
enormous number of points. This makes it really inefficient to determine
whether a given point is inside or outside the polygon.
What Artem did with the existing shoreline_a.shp was to slice up the
polygons along a square grid. The number of point within a single square
is quite small and is much more efficient for Postgis & Mapnik to
operate with.
Artem: Is there an tool available to create tiled polygon like you did
with shoreline_a.shp?
Jon
More information about the talk
mailing list