New splitter version available

I've checked in a new version of the tile splitter. It's not yet available for download on the splitter homepage, but until then you can either check it out of Subversion at http://svn.mkgmap.org.uk/splitter/trunk or download a prebuilt version from http://redyeti.net/splitter.jar Here is what has changed: - Reduced memory requirements, especially during the generation of areas.list - About 10% faster overall - Uses a slightly faster and leaner XML parser (XPP instead of SAX) - Removed the 4-area limit for relations - Improved the log messages to give more information about what is happening during the split - Can handle an arbitrary number of areas. Note however that each multiple of 255 areas requires a separate pass over the XML. This means a large number of areas will slow down the splitting due to the additional passes. This is still a lot better than the previous behaviour which was for the splitter to silently put elements into the wrong areas. It should be possible to split the whole planet file with far less memory now. The amount of memory required is roughly 2.5GB(?) for the initial areas.list generation, and then roughly proportional to (--max-nodes * 255). The smaller you make --max-nodes, the less memory the split will require but also the longer it will take (since a full parsing run over the planet file is required for each multiple of 255 areas). I've just kicked off the following before I go to bed, will be interesting to see if it manages to complete by the morning without running out of memory: java -Xmx4000m -jar splitter.jar --mapid=1 --max-nodes=1200000 planet-090715.osm Enjoy! Chris

On Aug 6, 2009, at 1:39, Chris Miller wrote:
've checked in a new version of the tile splitter. It's not yet available for download on the splitter homepage, but until then you can either check it out of Subversion at http://svn.mkgmap.org.uk/splitter/trunk or download a prebuilt version from http://redyeti.net/splitter.jar
I tried this version (not yet the newest SVN version with the ways restriction removed) on the geofabrik extract of Europe, and splitter threw the following exception: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 200000 at org .apache .tools .bzip2 .CBZip2InputStream.getAndMoveToFrontDecode(CBZip2InputStream.java:647) at org .apache.tools.bzip2.CBZip2InputStream.initBlock(CBZip2InputStream.java: 282) at org .apache .tools.bzip2.CBZip2InputStream.setupNoRandPartA(CBZip2InputStream.java: 839) at org .apache .tools.bzip2.CBZip2InputStream.setupNoRandPartB(CBZip2InputStream.java: 888) at org.apache.tools.bzip2.CBZip2InputStream.read0(CBZip2InputStream.java: 211) at org.apache.tools.bzip2.CBZip2InputStream.read(CBZip2InputStream.java: 179) at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158) at java.io.InputStreamReader.read(InputStreamReader.java:167) at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:2992) at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046) at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1384) at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093) at uk.me.parabola.splitter.AbstractXppParser.parse(AbstractXppParser.java: 43) at uk.me.parabola.splitter.Main.writeAreas(Main.java:211) at uk.me.parabola.splitter.Main.split(Main.java:98) at uk.me.parabola.splitter.Main.main(Main.java:78) Any ideas? I'll try again tonight with the latest SVN version. Here is my command line: $JAVA6_JAR ../splitter-latest/splitter.jar --mapid=23000001 --max- nodes=800000 europe.osm.bz2 (Where $JAVA6_JAR is the long path to the Mac OS java 1.6 binary) I continued anyway with the map compilation, because splitter was almost finished, and have not yet found anything missing. I have not checked throughly though. Cheers.

Interesting... to me that looks like either a corrupt .bz2 file, or there's a bug in the .bz2 decoder that the splitter is using. Either way, I don't think it'll matter what version of the splitter you use, the bz2 code hasn't been changed at all. Are you sure that your download isn't corrupt? Have you tried uncompressing it using a standalone app such as 7zip? Chris
On Aug 6, 2009, at 1:39, Chris Miller wrote:
've checked in a new version of the tile splitter. It's not yet available for download on the splitter homepage, but until then you can either check it out of Subversion at http://svn.mkgmap.org.uk/splitter/trunk or download a prebuilt version from http://redyeti.net/splitter.jar I tried this version (not yet the newest SVN version with the ways restriction removed) on the geofabrik extract of Europe, and splitter threw the following exception:
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 200000 at org .apache .tools .bzip2 .CBZip2InputStream.getAndMoveToFrontDecode(CBZip2InputStream.java:647) at org .apache.tools.bzip2.CBZip2InputStream.initBlock(CBZip2InputStream.java : 282) at org .apache .tools.bzip2.CBZip2InputStream.setupNoRandPartA(CBZip2InputStream.java : 839) at org .apache .tools.bzip2.CBZip2InputStream.setupNoRandPartB(CBZip2InputStream.java : 888) at org.apache.tools.bzip2.CBZip2InputStream.read0(CBZip2InputStream.java: 211) at org.apache.tools.bzip2.CBZip2InputStream.read(CBZip2InputStream.java: 179) at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158) at java.io.InputStreamReader.read(InputStreamReader.java:167) at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:2992) at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046) at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1384) at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093) at uk.me.parabola.splitter.AbstractXppParser.parse(AbstractXppParser.java : 43) at uk.me.parabola.splitter.Main.writeAreas(Main.java:211) at uk.me.parabola.splitter.Main.split(Main.java:98) at uk.me.parabola.splitter.Main.main(Main.java:78) Any ideas? I'll try again tonight with the latest SVN version. Here is my command line:
$JAVA6_JAR ../splitter-latest/splitter.jar --mapid=23000001 --max- nodes=800000 europe.osm.bz2
(Where $JAVA6_JAR is the long path to the Mac OS java 1.6 binary)
I continued anyway with the map compilation, because splitter was almost finished, and have not yet found anything missing. I have not checked throughly though.
Cheers.

On Aug 8, 2009, at 12:35, Chris Miller wrote:
Interesting... to me that looks like either a corrupt .bz2 file, or there's a bug in the .bz2 decoder that the splitter is using.
You're correct: the .bz2 file appears to be corrupt. I'm surprised I even got a workable map out of this. Thanks!
participants (2)
-
Chris Miller
-
Clinton Gladstone