logo separator

[mkgmap-dev] Split planet error

From Chris Miller chris.miller at kbcfp.com on Fri Jan 15 13:37:38 GMT 2010

Based on the error message you've shown, I'm pretty sure there isn't a problem 
with the XML parser itself (it handles <changeset/> vs </changeset> automatically). 
The end of the input stream is being reached, so it looks like either the 
planet file that you're trying to parse is corrupt, or the bz2 code is having 
trouble uncompressing the file and thinks it has reached the end earlier 
than it should. I've seen the latter happen before, unfortunately the bz2 
unpacker we're using isn't all that great... If you're sure the planet file 
is OK and suspect the bz2 code is at fault, you could uncompress the planet 
file (assuming you have a spare 140GB or so!) and try again.

I realise this is hardly ideal. Rather than try to fix the bz2 code, I'll 
probably add a parameter that allows the input to come from stdin. That way 
it will be possible to pipe the osm file from an external uncompression tool, 
which should also greatly help performance.


RK> Every time I try to split the planet OSM file I get this:
RK> 
RK> A <bounds/> tag was found. Area covered is (-90.0,-180.0) to
RK> (90.0,180.0)
RK> Error opening or reading file java.io.EOFException: no more data
RK> available -
RK> expected end tags </changeset></osm> to close start tag <changeset>
RK> from
RK> line 4312 and start tag <osm> from line 2, parser stopped on TEXT
RK> seen
RK> ...006-04-21T20:39:35Z" closed_at="2006-04-21T23:28:58Z"
RK> open="false"...
RK> @4312:103
RK> java.io.EOFException: no more data available - expected end tags
RK> </changeset></osm> to close start tag <changeset> from line 4312 and
RK> start
RK> tag <osm> from line 2, parser stopped on TEXT seen
RK> ...006-04-21T20:39:35Z"
RK> closed_at="2006-04-21T23:28:58Z" open="false"... @4312:103
RK> at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3035)
RK> at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
RK> at
RK> org.xmlpull.mxp1.MXParser.parseStartTag(MXParser.java:1800)
RK> at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1127)
RK> at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
RK> at
RK> uk.me.parabola.splitter.AbstractXppParser.parse(AbstractXppParser.ja
RK> va:62)
RK> at
RK> uk.me.parabola.splitter.Main.processOsmFiles(Main.java:388)
RK> at uk.me.parabola.splitter.Main.processMap(Main.java:377)
RK> at
RK> uk.me.parabola.splitter.Main.calculateAreas(Main.java:267)
RK> at uk.me.parabola.splitter.Main.split(Main.java:158)
RK> at uk.me.parabola.splitter.Main.start(Main.java:106)
RK> at uk.me.parabola.splitter.Main.main(Main.java:95)
RK> Time finished: Thu Jan 14 16:47:45 CET 2010
RK> Total time taken: 0s
RK> 
RK> Looks like the splitter expects a <changeset></changeset> pair but
RK> gets <changeset [...] /> instead. Is this a bug?
RK> 






More information about the mkgmap-dev mailing list