
I tried the new OSM splitter for the first time yesterday and I really like it. It works great on normal OSM data. When I ran it on countour lines generated by srtm2osm it failed: I tried to split a SRTM osm file with 12 million nodes into subfiles with max-nodes 1200000. It generated only one file which contains only 45174 nodes. Any ideas?

Hi
When I ran it on countour lines generated by srtm2osm it failed: I tried to split a SRTM osm file with 12 million nodes into subfiles with max-nodes 1200000. It generated only one file which contains only 45174 nodes.
Was there anything special about what did end up in the file? I tried it out and although my file was not big enough to need splitting, all of it ended up in the output file. Were there any messages? It could be that contour lines are very long and regularly cross more than four tiles. Otherwise I have no idea, could you put up the files you were using somewhere? ..Steve

Steve Ratcliffe wrote:
Was there anything special about what did end up in the file? I tried it out and although my file was not big enough to need splitting, all of it ended up in the output file.
The nodes and ways in the resulting 63240001.osm.gz look fine to me. The only difference I see is that srtm2osm uses double quotation marks and splitter.jar uses single quotation marks.
Were there any messages? It could be that contour lines are very long and regularly cross more than four tiles.
I made another test with a smaller file and this is what it says: $java -Xmx2048M -jar splitter.jar --mapid=31000001 --max-nodes=100000 srtm_5.8_47.7.osm key mapid/ val 31000001 key max-nodes/ val 100000 comparing size 6 a (47.9443359375,6.0205078125) to (47.98828125,6.064453125), size=6 Total time 10s The result is: -rw-r--r-- 1 unrz96 unrz 99M 2009-01-29 09:52 srtm_5.8_47.7.osm -rw-r--r-- 1 unrz96 unrz 158 2009-01-29 09:52 areas.list -rw-r--r-- 1 unrz96 unrz 340 2009-01-29 09:53 template.args -rw-r--r-- 1 unrz96 unrz 535K 2009-01-29 09:53 63240001.osm.gz The original file had ~ 1 million nodes: $grep "<node id" srtm_5.8_47.7.osm | wc -l 1041479 The result has just 15086: $gzip -cd 63240001.osm.gz | grep "<node id" | wc -l 15086 BTW: The name of the output file is not correct, I had set the map id to 31000001 but it used 63240001.
Otherwise I have no idea, could you put up the files you were using somewhere?
Sure, here it is: http://www.kleineisel.de/ralf/gps/splitter/

Hi
BTW: The name of the output file is not correct, I had set the map id to 31000001 but it used 63240001.
Oh... The documentation says --mapid, but in reality it was --mapname. If changed the code in svn to now allow both.
Otherwise I have no idea, could you put up the files you were using somewhere?
Sure, here it is: http://www.kleineisel.de/ralf/gps/splitter/
Thanks for that. The reason becomes clear. The ways and nodes are mixed up in the file. I guess it was made using the -large option to srtm2osm? I've just added an option --mixed=yes to deal with that case. It is available at: http://www.mkgmap.org.uk/splitter/splitter-r19.jar ..Steve

Steve Ratcliffe wrote:
Oh... The documentation says --mapid, but in reality it was --mapname. If changed the code in svn to now allow both.
Great!
The ways and nodes are mixed up in the file. I guess it was made using the -large option to srtm2osm?
Yes, that's right.
I've just added an option --mixed=yes to deal with that case.
It is available at: http://www.mkgmap.org.uk/splitter/splitter-r19.jar
This one doesn't work at all for me: $java -Xmx2048M -jar splitter-r19.jar --mapid=31000001 --max-nodes=100000 srtm_5.8_47.7.osm key mapid/ val 31000001 key max-nodes/ val 100000 Exception in thread "main" java.lang.NoClassDefFoundError: uk/me/parabola/mkgmap/general/MapDetails at uk.me.parabola.splitter.DivisionParser.<init>(DivisionParser.java:42) at uk.me.parabola.splitter.Main.calculateAndSplit(Main.java:144) at uk.me.parabola.splitter.Main.split(Main.java:82) at uk.me.parabola.splitter.Main.main(Main.java:67) Caused by: java.lang.ClassNotFoundException: uk.me.parabola.mkgmap.general.MapDetails at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) ... 4 more

It is available at: http://www.mkgmap.org.uk/splitter/splitter-r19.jar
This one doesn't work at all for me:
Yes, sorry I don't have a proper build process for that project.. please try again it should be fixed now. ..Steve

Steve Ratcliffe wrote:
It is available at: http://www.mkgmap.org.uk/splitter/splitter-r19.jar This one doesn't work at all for me:
Yes, sorry I don't have a proper build process for that project.. please try again it should be fixed now.
I'm sorry, but it's not much better: $java -Xmx2048M -jar splitter-r19.jar --mapid=31000001--max-nodes=100000 srtm_5.8_47.7.osm Invalid or corrupt jarfile splitter-r19.jar

How many OSM nodes should a single img contain? I'm having problems generating img from srtm2osm contours. Will use the splitter to do this. cheers, maning On 2/1/09, Steve Ratcliffe <steve@parabola.demon.co.uk> wrote:
$java -Xmx2048M -jar splitter-r19.jar --mapid=31000001--max-nodes=100000 srtm_5.8_47.7.osm Invalid or corrupt jarfile splitter-r19.jar
You know, I've never seen that message before.
OK, *now* it should be fixed.
..Steve _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------

maning sambale wrote:
How many OSM nodes should a single img contain? I'm having problems generating img from srtm2osm contours. Will use the splitter to do this.
It depends heavily on the type of map. The splitter does not know anything about your mkgmap style, e.g. which types of ways and nodes you do include in your map and which you don't. Other mkgmap features like the new POI-for-roads feature need space as well if you use them. I have successfully created maps from OSM data with "--max-nodes=1000000" and overlay maps with contour lines only from SRTM data with "--max-nodes=5000000".

I have an SRTM contour osm file (270 MB) with 2875513 nodes I'm using the dafault map-features.csv On Sat, Feb 7, 2009 at 8:41 PM, Ralf Kleineisel <ralf@kleineisel.de> wrote:
maning sambale wrote:
How many OSM nodes should a single img contain? I'm having problems generating img from srtm2osm contours. Will use the splitter to do this.
It depends heavily on the type of map. The splitter does not know anything about your mkgmap style, e.g. which types of ways and nodes you do include in your map and which you don't. Other mkgmap features like the new POI-for-roads feature need space as well if you use them.
I have successfully created maps from OSM data with "--max-nodes=1000000" and overlay maps with contour lines only from SRTM data with "--max-nodes=5000000".
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- cheers, maning ------------------------------------------------------ "Freedom is still the most radical idea of all" -N.Branden wiki: http://esambale.wikispaces.com/ blog: http://epsg4253.wordpress.com/ ------------------------------------------------------
participants (3)
-
maning sambale
-
Ralf Kleineisel
-
Steve Ratcliffe