Opened 15 years ago

Last modified 14 years ago

#6653 closed defect

osmChange file format no longer supported for import — at Version 14

Reported by: rickmastfan67 Owned by: team
Priority: major Milestone:
Component: Core Version: latest
Keywords: Cc:

Description (last modified by bastiK)

Alright, I have this older (from February) *.osm file that a friend made for me out of the 2010 TIGER data so I could use it to replace/fix/add roads to OSM where necessary locally.

Well, I had been able to open the file with no problems in JOSM up until recently. It last opened in r4264. Every release after that, it refuses to open. When I try to open it in r4272 or r4274, the following message shows up:

Could not read file 'TIGER2010_Allegheny_PA.osm'.
Error is:
Line 1 column 60: Unsupported version: 0.3 (at line 1, column 60)

Back in r4264 and previous versions, I did notice this when I opened the file in the CL:

Undefined element: 'osmChange' found in input stream. Skipping.
Undefined element: 'modify' found in input stream. Skipping.

But I didn't pay attention to it since it was "skipped".

Is this something that can be fixed in JOSM to have the file work again, or is there something I should fix in the osm file so that it can be loaded in JOSM versions later than r4264?

Change History (15)

comment:1 by bastiK, 15 years ago

Can you attach the file?

comment:2 by rickmastfan67, 15 years ago

Alright, I'm attaching the Butler County 2010 TIGER file my buddy provided me. I would attach the Allegheny County one, but it's 115MB un-compressed, and only compresses down to 6.26MB (with 7-zip). However, the Butler County one compresses down to below 2MB, so I can attach it. It does the same thing as the Allegheny one; works in r4264; doesn't work in r4272 & r4274 and gives the same messages in the CL and inside of JOSM.

Last edited 15 years ago by rickmastfan67 (previous) (diff)

by rickmastfan67, 15 years ago

Attachment: TIGER2010_Butler_PA.7z added

2010 TIGER Data - Butler County, PA

comment:3 by rickmastfan67, 15 years ago

Also, I think [4268] might be the reason this is happening, since I do see "osmChange" mentioned in it.

in reply to:  3 ; comment:4 by bastiK, 15 years ago

Replying to rickmastfan67:

Also, I think [4268] might be the reason this is happening, since I do see "osmChange" mentioned in it.

Right, I think we never really supported import of osc files, it is more a coincidence that this works (or used to work).

Open your file in an editor and change the version from 0.3 to 0.6. JOSM is right to reject this outdated version, this is probably a problem of the generating software. If you open http://api.openstreetmap.org/api/0.6/changeset/98051/download, you'll get a osc file with correct version.

in reply to:  4 comment:5 by rickmastfan67, 15 years ago

Resolution: othersoftware
Status: newclosed

Replying to bastiK:

Open your file in an editor and change the version from 0.3 to 0.6. JOSM is right to reject this outdated version, this is probably a problem of the generating software. If you open http://api.openstreetmap.org/api/0.6/changeset/98051/download, you'll get a osc file with correct version.

That did the trick. The file(s) are now loading once again in JOSM r4277.

I've also directed my friend who originally created the files for me to this ticket. He might comment on it later, but I'll mark this as "othersoftware" right now.

comment:6 by rickmastfan67, 15 years ago

Description: modified (diff)

comment:7 by rickmastfan67, 15 years ago

Resolution: othersoftware
Status: closedreopened

I hate to have to reopen this, but the files are now no longer opening in JOSM. When I go to open said file, JOSM says "No data found in file (file location)".

What do you think this time could have broken the file? I'll try out several older JOSM copies I have to try to nail down when the files stopped working again. It does have the " osmChange version="0.6" " line in it, so it can't be that problem.

Will update this once I find the last version the files worked in.

comment:8 by rickmastfan67, 15 years ago

Alright, found the place where the file stopped loading in JOSM and giving the message above.

[4412] works
[4413] doesn't work

What do you think might be the problem?

comment:9 by Don-vip, 15 years ago

It's because of the unknown tag <modify>. Delete it, and it works again.

comment:10 by bastiK, 15 years ago

Summary: Recent change in JOSM has broken some older *.osm filesosmChange file format no longer supported for import

The osc format is different from the (j)osm file format. JOSM's osm parser used to be very lenient, and opened osc files by ignoring the create, modify and delete tags. The result is incorrect, but could be still useful.

We had reasons, to make the osm parser more strict. As a side affect, it won't accept the osmChange files any longer.

So we need a proper implementation of a osc importer.

in reply to:  9 comment:11 by rickmastfan67, 15 years ago

Resolution: othersoftware
Status: reopenedclosed

Replying to Don-vip:

It's because of the unknown tag <modify>. Delete it, and it works again.

:facepalm: That's for letting me know that. I deleted it and it's working again.

comment:12 by bastiK, 15 years ago

Resolution: othersoftware
Status: closedreopened

comment:13 by Don-vip, 14 years ago

In [4530/josm]:

see #6653 and #6960 - Allow JOSM to download osmChange files again

comment:14 by bastiK, 14 years ago

Description: modified (diff)

Thanks. Why not import deleted objects as deleted primitives? I think doNothing() could cause hiccup, when there are inner elements. Use jumpToEnd(false) instead?

Note: See TracTickets for help on using tickets.