[OSM-talk] Funny Mapnik rendering of lakes

Jon Burgess jburgess777 at googlemail.com
Mon Aug 13 22:22:16 BST 2007


On Mon, 2007-08-13 at 21:40 +0100, Jon Burgess wrote:
> On Mon, 2007-08-13 at 20:27 +0100, Dermot McNally wrote:
> > Hi Mapnik experts,
> > 
> > Take a look at Lough Corrib on the Mapnik layer:
> > 
> > http://www.openstreetmap.org/?lat=53.38802704172361&lon=-9.17438578308073&zoom=11&layers=B0F
> > 
> > See the straight line along the west bank? It doesn't really exist,
> > and I'm pretty sure that it wasn't like that at any point during the
> > upload of the lake. (Doesn't JOSM upload all points, then define the
> > segments and only then define the ways?)
> > 
> > Maybe it'll just go away next time the area is rendered, but I mention
> > it in case there's a bug.
> > 
> 
>  Looking at the intermediate Mapnik PostgreSQL DB shows the way
> (id=5021907) as being made up of two short polygons plus a couple of
> very long linestrings. I'll have to dig a little deeper to figure out
> why this is happening. The data looks OK in JOSM (all 1852 segments of
> it) but I've not looked too closely at it yet.
> 
> It could be a bug in the osm2pgsql code or one of the libraries it uses
> or some non-obvious data problem.

I found a minor problem with the data which meant the way overlapped
itself at 2 places. The points of overlap were very tiny but enough to
confuse the osm2pgsql code and result in the bad rendering. I have
attached 2 screenshots showing the problem data in JOSM.

I've moved the nodes 33487448 & 33486514 a tiny bit so that the area is
non-overlapping and it renders fine for me now. It should re-render OK
on the map after the next planet dump on Wednesday.

The code causing the problem simplifies branching and overlapping
segments in roads. It looks like this code does not work correctly with
overlapping segments in polygons.

	Jon

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lough-corrib1.png
Type: image/png
Size: 1282 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20070813/bf6302f0/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lough-corrib2.png
Type: image/png
Size: 1921 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/talk/attachments/20070813/bf6302f0/attachment-0001.png>


More information about the talk mailing list