[osmosis-dev] --read-xml and --sort osmosis operations of Srtm2osm output file failed with error: "...Cannot represent 70730 as a char"
Brett Henderson
brett at bretth.com
Sat Jul 20 01:44:16 UTC 2013
Hi Fedor,
On 28 April 2013 19:11, Fedor Snegov (MTS phone) <fsnegov at gmail.com> wrote:
> Hi, dear osmosis-dev list members
>
> I am trying to merge osm map file containing Srtm2osm contours of
> interested area ( boundaries='http://www.**openstreetmap.org/?lat=60.22&**
> lon=32.04&zoom=7&layers=M<http://www.openstreetmap.org/?lat=60.22&lon=32.04&zoom=7&layers=M>'
> ) with osm.pbf Openstreetmaps map file in order to obtain Garmin map.
>
> I employ osmosis (great tool) for merging procedure. The merging procedure
> fails every time with errors which are presented below.
>
> For test reasons I am trying simply to convert Srtm2osm program output
> file to pbf format. The command line invoking osmosis is the following:
>
> "./osmosis-0.43.1/bin/osmosis \
> --read-xml file=$contours_file_name.$**contours_file_extension \
> --sort \
> --write-pbf file=$contours_file_name.osm.**pbf omitmetadata=true
> compress=deflate"
>
> But it stops and gives me again the same error log like this:
>
> "Apr 27, 2013 11:35:22 PM org.openstreetmap.osmosis.**core.Osmosis run
> INFO: Osmosis Version 0.43.1
> Apr 27, 2013 11:35:22 PM org.openstreetmap.osmosis.**core.Osmosis run
> INFO: Preparing pipeline.
> Apr 27, 2013 11:35:22 PM org.openstreetmap.osmosis.**core.Osmosis run
> INFO: Launching pipeline execution.
> Apr 27, 2013 11:35:22 PM org.openstreetmap.osmosis.**core.Osmosis run
> INFO: Pipeline executing, waiting for completion.
> Apr 27, 2013 11:35:42 PM org.openstreetmap.osmosis.**core.pipeline.common.
> **ActiveTaskManager waitForCom
> SEVERE: Thread for task 1-read-xml failed
> org.openstreetmap.osmosis.**core.OsmosisRuntimeException: Cannot
> represent 70730 as a char.
> at org.openstreetmap.osmosis.**core.util.IntAsChar.intToChar(**
> IntAsChar.java:32)
> at
> org.openstreetmap.osmosis.core.domain.v0_6.Way.store(Way.java:200)der.run(XmlReader.java:111)
>
> <snip>
>
> 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...
> It is clear that for some not small areas with flat landscape Srtm2osm
> could generate a very long ways with huge amount of nodes.
>
> Please, could you give any suggestions or advices to overcome this problem?
>
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.
This change will be available in the next development build.
Brett
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20130720/875740a4/attachment.html>
More information about the osmosis-dev
mailing list