5

I was trying to filter openstreet map data using osmosis. I used the following

osmosis --read-xml city.osm --tf accept-ways highway=* --used-node --write-xml highways.osm

But while i run this command in osmosis with osm file "city.osm" it throws run time exception

SEVERE: Thread for task 1-read-xml failed org.openstreetmap.osmosis.core.OsmosisRuntimeException: Cannot represent 2169105896 as an integer. at org.openstreetmap.osmosis.core.util.LongAsInt.longToInt(LongAsInt.java:33)

What could be the problem?

I updated osmosis to 0.43.1 version and it shows runtime exception

    SEVERE: Thread for task 1-read-xml failed
    org.openstreetmap.osmosis.core.OsmosisRuntimeException: The entity timestamp attribute is missing.
at org.openstreetmap.osmosis.core.domain.common.UnparsedTimestampContainer<init>(UnparsedTimestampContainer.java:34)
7

You are using an old version of Osmosis.

Since Openstreetmap has hit the line of 2^64 node numbers, all software using the data had to change node number variables from integer to long integer. If not, the software will return the error message you got.

Current versions of Osmosis have fixed this problem.

  • i updated osmosis to 0.43.1 version. please check the updated question. – poshan Nov 15 '13 at 7:52
  • 4
    For the timestamp issue: have you downloaded the data via Overpass api? They deliver timestamps only upon explicit request in the command using something like <print mode="meta"/>. – AndreJ Nov 15 '13 at 17:25
  • 2
    Thanks Andre the problem was with the data, it had no timestamps. I ran overpass query with meta printing mode and ran osmosis ,it worked. – poshan Nov 17 '13 at 6:22
3

This seems to be an error with missing timestamp values in the OSM file. See http://wiki.openstreetmap.org/wiki/Talk:Osmosis#Producing_empty_timestamps . You need timestamps in the OSM XML, perhaps just fake them.

  • I've tried to fake them, but can't figure out how exactly to do it. Any tips? – gregmacfarlane Jun 2 '15 at 16:21
  • Do you get your data from Overpass API? If so, see other answer. If not, set them to something like 1970-01-01T00:00with a text editor (for testing) or programattically (using e.g. python minidom) – til_b Jun 3 '15 at 15:29
  • I tried osmconvert --timestamp="properly formatted time" but no dice. Ended up downloading meta, marginally larger files. – gregmacfarlane Jun 3 '15 at 16:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.