Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error OsmosisRuntimeException: Cannot represent 89962 a s a char. #4

Closed
andreysmyntyna opened this issue Feb 28, 2012 · 1 comment
Closed

Comments

@andreysmyntyna
Copy link

Hello

I have got an error while trying to merge two osm data files as follows:

org.openstreetmap.osmosis.core.OsmosisRuntimeException: Cannot represent 89962 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)

In the mail archive of openstreetmaps stored similar issues, but link to patches is broken and last osmosis build 0.40.1 and build from github sources reproduce error as well
http://www.mail-archive.com/dev@openstreetmap.org/msg09679.html
http://lists.openstreetmap.org/pipermail/osmosis-dev/2011-March/000961.html

command line for merging is

D:\temp\osmosis_latest\osmosis_src\package\bin\osmosis.bat --read-xml enableDateParsing=no file=map_track_klimec.osm outPipe.0=1 --read-xml enableDateParsing=no file=strm_klimec.osm outPipe.0=2 --sort type="TypeThenId" inPipe.0=1 outPipe.0=3 --sort type="TypeThenId" inPipe.0=2 outPipe.0=4 --merge conflictResolutionMethod=version inPipe.0=3 inPipe.1=4 outPipe.0=5 --write-xml file=all_klimec.osm inPipe.0=5

first file is osm part of country map and second osm, that represent rtsm data

@brettch
Copy link
Member

brettch commented Jun 10, 2012

Osmosis stores the number of way nodes as a char which has a maximum size of 64K. This is not an issue unless broken data is entered into the OSM database.

If this becomes a common issue, Osmosis can be patched to treat the way node count (and relation member count) as a 32-bit integer but I'm hesitant to make this change for what appears to be a one-off (or perhaps two-off ...) incident.

@brettch brettch closed this as completed Jun 10, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants