Splitter error

Someone told me to run the splitter with the option --max-nodes=900000.
Doing this I get a lot of errors (mostly duplicate) like this:
“Relation 67869 in too many areas”.
Can anyone tell me, what this does mean and how to prevent from that?


Well, splitter is only able to keep track of OSM features in 4 tiles. If an feature like an relation is in more tiles then you get this error. It is a result of the low max-nodes setting which generates more smaller tiles and the 4-tile limitation of splitter. Not much you can do about.

Thanx for your info.
I can increase the number to 1500000 and the errors are no longer present.

How does the error affect the later generated map?
And whats the best setting for max-nodes?


maxnodes indirectly controls number and size of the generated tiles. Just go to Lambertus’ site to see how a result of the splitter looks like.

In general, maxnodes should be as large as possible so that fewer and bigger tiles are generated. However, depending on the area you are interested in, you will find tiles that will not compile because they contain too much information. I suggest that you start with the splitter’s default value (1,600,000) and make it smaller when you encounter failures of mkgmap.

The basis of the tiles on my site is generated with --max-nodes=1.200.000 and then further manually divided the failed tiles. As you see I still have some to do manually :wink:

I tried it for creating a map of the Netherlands. I got an error in mkgmap and I decreased the max-nodes to 1.5 million, 1.4, 1.3 and at least 1.0. But now I got an error in the splitter (Relation in too many areas).
How can I create an error free map?


The Netherlands is particularly difficult to split (as is Denmark). You have to manually define the tiles by editing the areas list and feed it back to splitter.

Could you please explain it for me a littlebit more detailed?

I have also tested another way. I increased the max-nodes in splitter until no error occured. Then I deleted from the mkgmap style-file all the POIs and from the lines the cycleways, footways tracks and paths. Now the map could generated with mkgmap and in in Mapsource it worked fine. But I lost a lot of information.

Ignoring the error of the splitter and generating the map will cause problems in Mapsource. Zooming in and out doesn’t work properly (the screen isn’t updated) and some tiles are completely empty.
The same behavior I noticed with the map of Netherland from Team-OID.

Isn’t it better to improve the splitter program, because the amount of data in OSM will increase more and more?


Splitter uses the nodes count to determine the proper size of a tile. This is a crude method because there are many more parameters which can limit the tile size. In general the ratio between ways and nodes is quite consistent so maps sizing based on max-nodes will work fine, but for areas with very high detail or very low detail this ratio may not be usable for determining the tile size. This is why the Netherlands, North Africa and Demark are so difficult to render.

Disclaimer: this is how I understand it.

What I did was choosing a nodes count that caused not too many failed tiles but still generated reasonably large tiles and then modified that areas.list file fix some of the failed tiles.

While we’re on the subject of splitting; What is better? osmcut.jar or the mkgmap’s tile splitter? I just saw your version of preprocess.pl which uses osmcut (0.5). I’m thinking of changing it to use splitter instead. Dont know perl, but know enough to uhm… hack it :roll_eyes:
I’want to use it to make maps for my vacation in France/Luxembourg/Germany/Belgium/Netherlands. By bike :sunglasses:
Standard maps are compiled and are a back-up in case my plan doesn’t succeed in time :wink:
Note that I just realized Lambertus cycle maps still have a problem with whitespaces between tiles (as it looks like to me). Could it be due to the use of osmcut?
I just compile tiles with a maximum of 3000000. Just enough to avoid problems with France that ways cover more than four tiles en not too much so mkgmap can still compile without bailing out with too many node/ways in a file… I had no chance yet to see of this problem persist with splitter. Tiles are rather large.

Oops… Just noticed you commented osmcut out… Sorry :roll_eyes:

I’m using Osmosis to cut the NL planet excerpt into about 200 tiles. Using Osmosis to cut osm data into tiles causes loss of data on the edges and the tiles won’t work for routing. I’m using Splitter for the routable maps and have to update the topo map building process to use the splitter tool too some day.