<div dir="ltr">Hi Fedor,<br><div><div class="gmail_extra"><br><div class="gmail_quote">On 28 April 2013 19:11, Fedor Snegov (MTS phone) <span dir="ltr"><<a href="mailto:fsnegov@gmail.com" target="_blank">fsnegov@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, dear osmosis-dev list members<br>
<br>
I am trying to merge osm map file containing Srtm2osm contours of interested area ( boundaries='<a href="http://www.openstreetmap.org/?lat=60.22&lon=32.04&zoom=7&layers=M" target="_blank">http://www.<u></u>openstreetmap.org/?lat=60.22&<u></u>lon=32.04&zoom=7&layers=M</a>' ) with osm.pbf Openstreetmaps map file in order to obtain Garmin map.<br>

<br>
I employ osmosis (great tool) for merging procedure. The merging procedure fails every time with errors which are presented below.<br>
<br>
For test reasons I am trying simply to convert Srtm2osm program output file to pbf format. The command line invoking osmosis is the following:<br>
<br>
"./osmosis-0.43.1/bin/osmosis \<br>
--read-xml file=$contours_file_name.$<u></u>contours_file_extension \<br>
--sort \<br>
--write-pbf file=$contours_file_name.osm.<u></u>pbf omitmetadata=true compress=deflate"<br>
<br>
But it stops and gives me again the same error log like this:<br>
<br>
"Apr 27, 2013 11:35:22 PM org.openstreetmap.osmosis.<u></u>core.Osmosis run<br>
INFO: Osmosis Version 0.43.1<br>
Apr 27, 2013 11:35:22 PM org.openstreetmap.osmosis.<u></u>core.Osmosis run<br>
INFO: Preparing pipeline.<br>
Apr 27, 2013 11:35:22 PM org.openstreetmap.osmosis.<u></u>core.Osmosis run<br>
INFO: Launching pipeline execution.<br>
Apr 27, 2013 11:35:22 PM org.openstreetmap.osmosis.<u></u>core.Osmosis run<br>
INFO: Pipeline executing, waiting for completion.<br>
Apr 27, 2013 11:35:42 PM org.openstreetmap.osmosis.<u></u>core.pipeline.common.<u></u>ActiveTaskManager waitForCom<br>
SEVERE: Thread for task 1-read-xml failed<br>
org.openstreetmap.osmosis.<u></u>core.OsmosisRuntimeException: Cannot represent 70730 as a char.<br>
        at org.openstreetmap.osmosis.<u></u>core.util.IntAsChar.intToChar(<u></u>IntAsChar.java:32)<br>
        at org.openstreetmap.osmosis.core.domain.v0_6.Way.store(Way.java:200)der.run(XmlReader.java:111)<br><br></blockquote><div><snip> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
I am not a programmer, but it seems, that the reason for such an  errors is some osmosis limit for maximum number of nodes in a way...<br>
It is clear that for some not small areas with flat landscape Srtm2osm could generate a very long ways with huge amount of nodes.<br>
<br>
Please, could you give any suggestions or advices to overcome this problem?<br></blockquote><div><br></div><div>I've just checked in a change which should fix this.  You are right in that Osmosis was limiting the maximum number of nodes in a way to 2^15.  This has been increased to 2^31.  It adds a small overhead to Osmosis processing, but should be barely noticeable.<br>
<br></div></div>This change will be available in the next development build.<br><br>Brett<br><br></div></div></div>