when I use SPLITTER to IMPORT om.pbf files into JOSM I get error

I am trying to use JOSM for offline editing and osm.pbf files created by splitter r427 cause this error when importing into JOSM r9329 with the pbf import plugin: Could not read file '12360002.osm.pbf'. Error is: java.lang.IndexOutOfBoundsException: Index: 0 I think I saw a post that there might be missing meta data from the osm.pbf files produced by splitter. JOSM has a max of 50000 node for input files. Is there a different 'splitter' that JOSM can import?

Hi Greg. You can use osmconvert which should be able to read the output of splitter, e.g. osmconvert 12360002.osm.pbf -o=12360002-josm.osm.pbf In the meantime I'll try to find out if this is related to the pbf libraries. My understanding was that the pbf format should be up - and downward compatible, and splitter uses the "official" libs, I think JOSM as well, but maybe different versions. Gerd ________________________________ Von: mkgmap-dev-bounces@lists.mkgmap.org.uk <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von greg crago <gregcrago@gmail.com> Gesendet: Donnerstag, 25. Februar 2016 21:52 An: Development list for mkgmap Betreff: [mkgmap-dev] when I use SPLITTER to IMPORT om.pbf files into JOSM I get error I am trying to use JOSM for offline editing and osm.pbf files created by splitter r427 cause this error when importing into JOSM r9329 with the pbf import plugin: Could not read file '12360002.osm.pbf'. Error is: java.lang.IndexOutOfBoundsException: Index: 0 I think I saw a post that there might be missing meta data from the osm.pbf files produced by splitter. JOSM has a max of 50000 node for input files. Is there a different 'splitter' that JOSM can import?

Gerd Petermann wrote
Hi Greg.
You can use osmconvert which should be able to read the output of splitter, e.g.
osmconvert 12360002.osm.pbf -o=12360002-josm.osm.pbf
Sorry, was too quick. You probably need option --fake-version for osmconvert: osmconvert --fake-version 12360002.osm.pbf -o=12360002-josm.osm.pbf I think that's the reason for the problem: JOSM doesn't like input in pbf format that doesn't have the meta info (version, author etc) I never cared about that because I use o5m format and an o5m plugin that I wrote once for JOSM. It is not in the plugins repo, but I may try again to add it there. A 3rd alternative is to use --output=xml in splitter, the files in that format are no problem in JOSM, but may decrease performance in splitter and mkgmap. Gerd -- View this message in context: http://gis.19327.n5.nabble.com/when-I-use-SPLITTER-to-IMPORT-om-pbf-files-in... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Thank you, thank you,thank you! I have been struggling with this for 1 month. Both 'osmconvert' and 'osmconvert --fake-version' worked. I only use .pbf because I found this website for OSM downloads: http://download.geofabrik.de/north-america.html is there a website to get similar sized o5m map downloads? Greg On Thu, Feb 25, 2016 at 5:46 PM, Gerd Petermann < gpetermann_muenchen@hotmail.com> wrote:
Gerd Petermann wrote
Hi Greg.
You can use osmconvert which should be able to read the output of splitter, e.g.
osmconvert 12360002.osm.pbf -o=12360002-josm.osm.pbf
Sorry, was too quick. You probably need option --fake-version for osmconvert: osmconvert --fake-version 12360002.osm.pbf -o=12360002-josm.osm.pbf
I think that's the reason for the problem: JOSM doesn't like input in pbf format that doesn't have the meta info (version, author etc)
I never cared about that because I use o5m format and an o5m plugin that I wrote once for JOSM. It is not in the plugins repo, but I may try again to add it there.
A 3rd alternative is to use --output=xml in splitter, the files in that format are no problem in JOSM, but may decrease performance in splitter and mkgmap.
Gerd
-- View this message in context: http://gis.19327.n5.nabble.com/when-I-use-SPLITTER-to-IMPORT-om-pbf-files-in... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

osmconvert dach-latest.osm.pbf -o=dach-latest.o5m You can convert that yourself, just use the name of the map you want in the example above
Am 26.02.2016 um 01:27 schrieb greg crago:
Thank you, thank you,thank you!
I have been struggling with this for 1 month.
Both 'osmconvert' and 'osmconvert --fake-version' worked.
I only use .pbf because I found this website for OSM downloads:
http://download.geofabrik.de/north-america.html
is there a website to get similar sized o5m map downloads?
Greg
On Thu, Feb 25, 2016 at 5:46 PM, Gerd Petermann <gpetermann_muenchen@hotmail.com <mailto:gpetermann_muenchen@hotmail.com>> wrote:
Gerd Petermann wrote > Hi Greg. > > > You can use osmconvert which should be able to read the output of > splitter, e.g. > > osmconvert 12360002.osm.pbf -o=12360002-josm.osm.pbf
Sorry, was too quick. You probably need option --fake-version for osmconvert: osmconvert --fake-version 12360002.osm.pbf -o=12360002-josm.osm.pbf
I think that's the reason for the problem: JOSM doesn't like input in pbf format that doesn't have the meta info (version, author etc)
I never cared about that because I use o5m format and an o5m plugin that I wrote once for JOSM. It is not in the plugins repo, but I may try again to add it there.
A 3rd alternative is to use --output=xml in splitter, the files in that format are no problem in JOSM, but may decrease performance in splitter and mkgmap.
Gerd
-- View this message in context: http://gis.19327.n5.nabble.com/when-I-use-SPLITTER-to-IMPORT-om-pbf-files-in... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk <mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Gerd, I also struggled around with this incompatibility splitter/JOSM. I used XML-files, but JOSM does not support API V0.5 for quite a while now, and splitter still produces v0.5 XML files. Dirty Workaround: I open all yml-file in an editor, changed Line 2 into "osm version='0.6'" and add "version='1'" to all id-instances. For VIM: :%s/ id='/ version='1' id='/g Maybe that's also the reason why JOSM doesn't like the PBF-files... Regards, Michael Am 25.02.2016 um 23:46 schrieb Gerd Petermann:
Gerd Petermann wrote
Hi Greg.
You can use osmconvert which should be able to read the output of splitter, e.g.
osmconvert 12360002.osm.pbf -o=12360002-josm.osm.pbf
Sorry, was too quick. You probably need option --fake-version for osmconvert: osmconvert --fake-version 12360002.osm.pbf -o=12360002-josm.osm.pbf
I think that's the reason for the problem: JOSM doesn't like input in pbf format that doesn't have the meta info (version, author etc)
I never cared about that because I use o5m format and an o5m plugin that I wrote once for JOSM. It is not in the plugins repo, but I may try again to add it there.
A 3rd alternative is to use --output=xml in splitter, the files in that format are no problem in JOSM, but may decrease performance in splitter and mkgmap.
Gerd
-- View this message in context: http://gis.19327.n5.nabble.com/when-I-use-SPLITTER-to-IMPORT-om-pbf-files-in... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Michael, yes, JOSM seems to expect metainfo (version, userid, last change timestamp) and fails to read a pbf file without that info. No idea why, but I've added a workaround in splitter r428 right now. I was not aware that JOSM requires version 0.6 now, how crazy is that ? Instead of using an editor you can use osmconvert: osmconvert --fake-version <input-file> -o=output.osm I hesitate to change splitter in this case because the extra information increases the osm.gz files by ~2% . I'd first like to understand why JOSM doesn't allow api version 0.5 anymore. Gerd ________________________________ Von: mkgmap-dev-bounces@lists.mkgmap.org.uk <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Michael Schlenstedt <schlenn@gmail.com> Gesendet: Freitag, 26. Februar 2016 07:38 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] when I use SPLITTER to IMPORT om.pbf files into JOSM I get error Hi Gerd, I also struggled around with this incompatibility splitter/JOSM. I used XML-files, but JOSM does not support API V0.5 for quite a while now, and splitter still produces v0.5 XML files. Dirty Workaround: I open all yml-file in an editor, changed Line 2 into "osm version='0.6'" and add "version='1'" to all id-instances. For VIM: :%s/ id='/ version='1' id='/g Maybe that's also the reason why JOSM doesn't like the PBF-files... Regards, Michael Am 25.02.2016 um 23:46 schrieb Gerd Petermann: Gerd Petermann wrote
Hi Greg.
You can use osmconvert which should be able to read the output of splitter, e.g.
osmconvert 12360002.osm.pbf -o=12360002-josm.osm.pbf
Sorry, was too quick. You probably need option --fake-version for osmconvert: osmconvert --fake-version 12360002.osm.pbf -o=12360002-josm.osm.pbf I think that's the reason for the problem: JOSM doesn't like input in pbf format that doesn't have the meta info (version, author etc) I never cared about that because I use o5m format and an o5m plugin that I wrote once for JOSM. It is not in the plugins repo, but I may try again to add it there. A 3rd alternative is to use --output=xml in splitter, the files in that format are no problem in JOSM, but may decrease performance in splitter and mkgmap. Gerd -- View this message in context: http://gis.19327.n5.nabble.com/when-I-use-SPLITTER-to-IMPORT-om-pbf-files-in... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk<mailto:mkgmap-dev@lists.mkgmap.org.uk> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi, They said that they disabled Api V0.5 since JOSM r7013 because V0.6 is out since 2009 and there should be no reason to still support V0.5. See https://josm.openstreetmap.de/ticket/9975 osmconvert is a good option. From my point of view it would be also ok to stay at V0.5 and add the osmconvert workaround to the documentation. Von meinem iPad gesendet
Am 26.02.2016 um 08:23 schrieb Gerd Petermann <GPetermann_muenchen@hotmail.com>:
Hi Michael,
yes, JOSM seems to expect metainfo (version, userid, last change timestamp) and fails to read a pbf file without that info. No idea why, but I've added a workaround in splitter r428 right now.
I was not aware that JOSM requires version 0.6 now, how crazy is that ? Instead of using an editor you can use osmconvert:
osmconvert --fake-version <input-file> -o=output.osm
I hesitate to change splitter in this case because the extra information increases the osm.gz files
by ~2% . I'd first like to understand why JOSM doesn't allow api version 0.5 anymore.
Gerd
Von: mkgmap-dev-bounces@lists.mkgmap.org.uk <mkgmap-dev-bounces@lists.mkgmap.org.uk> im Auftrag von Michael Schlenstedt <schlenn@gmail.com> Gesendet: Freitag, 26. Februar 2016 07:38 An: Development list for mkgmap Betreff: Re: [mkgmap-dev] when I use SPLITTER to IMPORT om.pbf files into JOSM I get error
Hi Gerd,
I also struggled around with this incompatibility splitter/JOSM. I used XML-files, but JOSM does not support API V0.5 for quite a while now, and splitter still produces v0.5 XML files.
Dirty Workaround: I open all yml-file in an editor, changed Line 2 into "osm version='0.6'" and add "version='1'" to all id-instances. For VIM: :%s/ id='/ version='1' id='/g
Maybe that's also the reason why JOSM doesn't like the PBF-files...
Regards, Michael
Am 25.02.2016 um 23:46 schrieb Gerd Petermann: Gerd Petermann wrote
Hi Greg.
You can use osmconvert which should be able to read the output of splitter, e.g.
osmconvert 12360002.osm.pbf -o=12360002-josm.osm.pbf
Sorry, was too quick. You probably need option --fake-version for osmconvert: osmconvert --fake-version 12360002.osm.pbf -o=12360002-josm.osm.pbf
I think that's the reason for the problem: JOSM doesn't like input in pbf format that doesn't have the meta info (version, author etc)
I never cared about that because I use o5m format and an o5m plugin that I wrote once for JOSM. It is not in the plugins repo, but I may try again to add it there.
A 3rd alternative is to use --output=xml in splitter, the files in that format are no problem in JOSM, but may decrease performance in splitter and mkgmap.
Gerd
-- View this message in context: http://gis.19327.n5.nabble.com/when-I-use-SPLITTER-to-IMPORT-om-pbf-files-in... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (6)
-
Gerd Petermann
-
Gerd Petermann
-
greg crago
-
Jakob Mühldorfer
-
Michael Schlenstedt
-
schlenn@gmail.com