NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I have :

I want to :

  • change things with JOSM

But :

  • When I want to download map data from my OSM server with JOSM, JOSM reports an error:

Failed to download data. Its format is either unsupported, ill-formed, and/or inconsistent. Details (untranslated): Illegal value for attribute 'version' on OSM primitive with ID 26616418. Got -1. (at line 4, column 128)

Here is an extract from the map.osm that JOSM tries to import :

<node id="65262752" version="-1" changeset="-1" lat="36.76644" lon="3.06899" visible="true" timestamp="1970-01-01T00:59:59Z">

What's going wrong here?

asked 17 Oct '12, 17:26

Lucciniolo's gravatar image

Lucciniolo
31112
accept rate: 0%

closed 18 May '17, 23:31

SimonPoole's gravatar image

SimonPoole ♦
44.7k13326701

In fact, all vesion and changeset of the .osm that i have imported was equal to -1 !

I think that it is not normal. What do you think about that ?

(17 Oct '12, 21:20) Lucciniolo

Ok. In fact, it is normal because I dowmload tne data on http://download.bbbike.org/osm/ which have not diffs.

What can i do to use my database with JOSM ?

Can i change version and changeset manuelly ?

(17 Oct '12, 21:29) Lucciniolo

The question has been closed for the following reason "The question is answered" by SimonPoole 18 May '17, 23:31


As you said, the extracts from bbbike.org have the version of all map objects set to -1. They also have all timestamps set to 1969. I'm not sure why, but this definitely makes them unusable for editing in JOSM.

I suppose you could modify the version manually by replacing version="-1" with version="1" in your downloaded extract before importing it. Or you could run some SQL queries on the database to change the version manually. You would need to update version in the tables: current_nodes, current_ways and current_relations. The changeset_id might need to be changed too but I'm not sure about that.

It might be easier to look for a different extract that provides the real OSM data with real version numbers instead of a modified version of it.

Other extract providers are listed on the wiki "Planet" page. I personally would recommend the geofabrik ones.

permanent link

answered 18 Oct '12, 05:19

ToeBee's gravatar image

ToeBee
976920
accept rate: 27%

As explained by ToeBee, this is a problem with the OSM data you downloaded - the data contains wrong version values (namely -1). This is because the extracts from bbbike.org are not suitable for editing.

The FAQ at http://extract.bbbike.org/extract.html explains:

The extracts don't contain metadata as version number, author, timestamp etc. If you need to edit OSM data, please go to the OpenStreetMap.org web site.

Consequently, the extracts in Protocol Buffers format (.pbf) all have all version attributes set to -1, at least when I checked (2017-05-18).

The downloads in OSM XML format (.xml.gz) also do not contain a proper version, only there the version is always set to 1 instead of -1 (which is arguably even worse, because tools will not notice right away).

You will have to obtain OSM data from somewhere else.

(18 May '17, 09:55) sleske

No, manually "fixing" the version will not work (or cause even more trouble). JOSM needs the right version of each object to update it correctly. That information is simply missing in the downloads, there is no way to fix that.

(18 May '17, 09:56) sleske

How would JOSM know whether the data contains the "right version" or not? There's no such thing. As long as JOSM gets a valid version number (ie. >=1), it shouldn't have a problem opening it and working with it. Keep in mind that the database in question here is separate from the "live" OSM database and they didn't say anything about uploading this data to the OSM database, so mis-matching versions wouldn't be an issue.

(18 May '17, 16:34) alester
1

Folks this question was asked nearly 5 years ago, and is long outdated. not to mention that the author is unlikely to still be waiting for your input.

(18 May '17, 23:30) SimonPoole ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×622
×18
×8

question asked: 17 Oct '12, 17:26

question was seen: 5,296 times

last updated: 18 May '17, 23:31

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum