[OSM-talk] tiles rendering

David Groom reviews at pacific-rim.net
Fri Feb 2 18:40:10 GMT 2007


----- Original Message ----- 
From: "Artem Pavlenko" <artem at pavlenko.uklinux.net>
To: "Jon Burgess" <jburgess777 at googlemail.com>; <dev at openstreetmap.org>
Cc: <talk at openstreetmap.org>
Sent: Friday, February 02, 2007 5:29 PM
Subject: Re: [OSM-talk] tiles rendering


> Hello,
>
> I've been thinking about improving the rendering of coastlines, and here 
> is
> what I came up with. Originally I was hoping to have one script that could 
> be
> run on Global Shoreline data and output boundary polygons. Unfortunately 
> the
> dataset has got too many broken geometries etc etc and it does
> require 'human' interaction to fix them.
>
> So here is how I solved this. I devided the world into 100x100km tiles. 
> For
> each tile I ran 'overlay' query and stored the results (LineStrings +BBOX
> polygon ).
>
> This is how it looks:
> http://media.mapnik.org/osmturk.png
> http://media.mapnik.org/osmturk-2.png
>
> Then using JUMP 1.2  (http://www.vividsolutions.com/JUMP/) it is possible
> to 'polygonize' linestrings , remove 'water' polygons  and output
> nice 'clean' polygons ready to go:
> http://media.mapnik.org/osmturk-3.png
>
> The results are quite good and make nice maps :
> http://media.mapnik.org/coast.jpg
>
> The whole process is pretty straight forward and requires just a few mouse
> clicks. Think 'mechanical turk'!
>
> I reckon three-four people could create UK boundaries in a couple of 
> hours.
> Anyone in the Oxford area fancy meeting up for a beer at coastlines event 
> this
> weekend?
>
> Cheers,
> -- Artem
>

Artem
it certainly looks good at the scale of the image 
http://media.mapnik.org/coast.jpg,

I presume it still looks like coast at higher zoom levels.

I think you might be over-optimistic in your time scale however.  The GSHSS 
data for the Solent area (image above) is in fact relatively clean compared 
to a lot of other areas in the UK.  In particular any long river estuary in 
the GSHSS data get broken down into very many separate polygons, and the 
West Coast of Scotland has hundreds, if not thousands of islands, also there 
are parts of the Scottish coast not covered by GSHSS data (I think due to 
cloud cover on the original satellite images).

However in theory it looks a good approach.  I'm not clear however where 
these new polygons would be stored?  Is it separate to the OSM  database?

David

> On Wednesday 31 January 2007 23:11, Jon Burgess wrote:
>> On Wed, 2007-01-31 at 22:36 +0000, Jon Burgess wrote:
>> > On Wed, 2007-01-31 at 21:43 +0000, Artem Pavlenko wrote:
>> > > Yes, good idea.  We should only output 'closed' polygons
>> > >
>> > > if (polygon && start_point == end_point)
>> > > {
>> > > ...
>> > > }
>> > > else
>> > > {
>> > > ..
>> > > }
>> > >
>> > > Artem
>> >
>> > That didn't seem to make any difference.
>> >
>> > It seems the issue is in osm.xml. The PolygonSymbolizer will render any
>> > data as a polygon, even if the source data is a linestring :-). This
>> > attached patch makes things look much better in my eyes. The style may
>> > need more tweaking.
>> >
>> > The data I have loaded in postgis currently is from the "open areas are
>> > not polygons" version of osm2pgsql currently so I can't be 100% certain
>> > that this style change alone fixed it, but i'm quite confident the
>> > osm.xml change is sufficient.
>> >
>> > Please try it out on your system and see if it fixes the grey
>> > triangulated coastline.
>> >
>> > Jon
>>
>> I found some issues with the last patch, I think this one renders more
>> cleanly at all zoom levels. It treats all natural= the same as
>> waterways, i.e draws as a blue line for the coastline.
>>
>> The only downside I see with this is that natural=water no longer gets
>> filled, you'll just get a blue outline. This may effect ponds, lakes
>> etc.
>>
>> Perhaps natural=water should be rendered as a polygon but I don't
>> understand the mapnik rule/scale/filter/else model well enough to make
>> the rendering work reliably at all zooms.
>>
>> Jon
>
> _______________________________________________
> talk mailing list
> talk at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/talk
>
> 







More information about the talk mailing list