OpenStreetMap

Fixed the Harz

Posted by Brian Schimmel on 31 January 2008 in English.

The Harz is said to be the largest continous wood in germany... some say it was the even the largest one in europe, but who knows.

At least it is big enough to screw up Tiles@Home rendering. T@H uses osmarender to render zoom level 12 Tiles and all subparts. If such a tile is in the middle of the Harz, and does not touch the Harz border, then T@H will not know that there should be some wood around. This way, you get huge white squares inside the Harz. There were about 20 or 30 of these.

I fixed this the quick and dirty way a month before. Someony called Nils has found a better solution, and I adapted this to the whole Harz now. At this moment I found enormous errors in the shape, which I corrected for the northern and eastern boundary. South and west still to be done some other day...

In the slippy map it should look nice, but if you load this area into JOSM you might notice that it's still a dirty hack.

Fixing the software would mean fixing the API at a very low level... to dangerous to fix a single wood. There are no other areas in germany that are big enough to cause this problem.

Due to a bug in JOSM I had to restart 10 times!

By the way, T@H worked well for level 11 and below... while Mapnik is the other way round, and the Harz is missing in all lower zoom levels. But this is another issue. I have no Idea what causes this.

Location: 38879, Schierke, Wernigerode, Landkreis Harz, Saxony-Anhalt, Germany

Discussion

Comment from 80n on 31 January 2008 at 10:26

Can you explain Nils hack so that other people know how to do it?

Comment from brainwad on 31 January 2008 at 13:41

If there is only one forest in Germany that is big enough to have that problem... then you don't have many big forests! This problem has happened with a region of forest to the west of Sydney, Australia... I'd love to know how to fix it.

Comment from Brian Schimmel on 31 January 2008 at 16:08

Ok... so there seems to be some interest in how to do this... I assume that everyone who is interested has the possibility to start JOSM.

Take this adress to download a bounding box into JOSM: http://www.openstreetmap.org/?lat=51.83102&lon=10.86181&zoom=16&layers=0BFT

It should look like this:

You will get two object, a node called Benzingerode and the big Harz. You will see some cuts small cuts going through the wood. If you zoom in, you will notice that these cuts have a "negative width", because the shape is self-intersecting. Never versions of JOSM will show the wood as a filled green area and those cuts will be background color, what means black for most of you.

Osmarender seems to handle the cuts different, not showing them at all. I hope this won't break the mapnik layer!

I have installed the slippymap plugin. It shows me where the boundarys of zoom level 12 are located, and I made shure that my cuts are aligned so that every level 12 tile intersets with eiter the real outline or a cut.

Comment from Brian Schimmel on 31 January 2008 at 18:19

Oops... this has fixed the problem for most tiles, but now there are other tiles which become white...

Especially good news is that it works for Clausthal-Zellerfeld, a city in the middle of the Harz. The city area is marked to be a hole in the wood, using a multipolygon relation. I feared that this complex thing would interfere with the self-intersecting Harz, but it worked well. Until then, it was rendered partly incorrect.

Comment from daveemtb on 31 January 2008 at 18:30

Can't you just have seperate areas of forest which have edges sharing the same nodes? I suppose this could cause problems where the renderer tries to smooth corners out though...

Comment from Brian Schimmel on 31 January 2008 at 19:34

@daveemtb: Sounds lika a good idea. Anyway, I did not want to have multiple parts. Don't know why I wanted this, must have had my reasons :)

I will now wait until some of these tiles are re-rendered (already requested it, but seems to take some time...). If my solution won't work, I will try yours.

Comment from ToniE on 31 January 2008 at 20:52

South-East of Munich there is a mixture of daveemtb's and another solution. There are also slightly overlapping (small) areas for bigger forests. Most of them have been mapped before the "multipolygon" and "relations" appeared (before OSM 0.5).

Comment from Brian Schimmel on 1 February 2008 at 01:22

There used to be an image in my comment I wrote 16:08:05. Now it's gone. Seems like I was the first one to use an img tag and will also be the last one :(

Comment from Brian Schimmel on 3 February 2008 at 15:56

Ok, the image is back. But now I realized that I did not fix the Harz, I broke it! There are about as much white squares as before. Sorry for this! I will try to fix this (again) when I find time...

Log in to leave a comment