0

I downloaded a .pbf OSM file and wants to convert it into a Garmin .img file . If possible direct, if not using a in between format. I have searched a lot, but could not find a real solution.

Attempeds :

Convert from .pbf to .osm and then to .img will do also for me. Your help is appreciated.

asked 24 May '17, 11:47

bernard123's gravatar image

bernard123
11112
accept rate: 0%


3 Answers:
1

The mkgmap documentation page says: "The input file must contain the boundaries that should be preprocessed. It can have OSM, PBF or O5M file format." - does it not work for you?

permanent link

answered 24 May '17, 12:25

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
73.3k866641137
accept rate: 24%

No. I have a Ubuntu Linux system.

Direct installation of mkgmap seems to be ok, but failed to execute. So I installed using

sudo apt-get install mkgmap

Which seems to be Ok because :

mkgmap --help=options

Returns a correct list of options.

The source of the file is a mirror of OSM :

http://ftp.snt.utwente.nl/pub/misc/openstreetmap/

When I tried :

bernard@desktop:~/Garmin/Europa$ mkgmap --gmapsupp europe-latest.osm.pbf
Using /usr/bin/java to execute mkgmap.
Error at line 1, col 1
Bad file format: europe-latest.osm.pbf
bernard@desktop:~/Garmin/Europa$

It fails. I have no idea where is goes wrong.

(24 May '17, 13:47) bernard123

@Fredrik Ramm. I posted my reply wrong, as an answer. Sorry for that, please read my reply.

(24 May '17, 13:49) bernard123
1

I wonder how much memory this will require during the generation and how large your final file will be. All services that allow you to download Garmin img files work with smaller regions (e.g. countries). Perhaps you should start with a much smaller region to see whether your tool chain works ?

(24 May '17, 14:57) escada

Yes, may I should. In the past I did so, with Garmin mapsource. But I read the would not be needed any more due to the current storage capacity of SD cards. I will try, and come back for the results.

(24 May '17, 15:21) bernard123

@bernard123 I've moved your reply below Frederik's - hope this is OK.

(24 May '17, 19:53) SomeoneElse ♦

Yes it is. But now the reply of Escada is lost. Escade pointed me on the huge size of the Europe map, and with the memory limitation to be able to xecute mkgmap. So I followed his suggestion, although very different than my question was. And I could create a map for Garmin.

This is what I like about (this) forum. An solution in a total different direction than I thought.

I would like to thank all for your help. But I do not know how. Accepting the reply of Frederik Ramm would new users get the impression the original question was solved. Escada gave me a successful workaround suggestion. Please give me a hint how to reply.

(24 May '17, 20:07) bernard123

But now the reply of Escada is lost

No - it's still there above this one (you might have to refresh the question to see it).

OSQA (the software used by OSM's help system) is a bit confusing - a bit like Stack Exchange but not quite the same. You should see an option to "add new comment" which allows you to comment below existing answers and questions.

(24 May '17, 20:15) SomeoneElse ♦
showing 5 of 7 show 2 more comments
1

I wrote a diary entry about the steps needed to run mkgmap: http://www.openstreetmap.org/user/SomeoneElse/diary/38613

One difference between that and what you tried is that it's downloading a version of mkgmap from the developers rather than fetching from a repository that apt-get knows about (I don't know how often those are updated). I don't know what OS you're running, so don't know what version of mkgmap you're using. It's possible that for some reason it doesn't know about the libraries used to process .pbf files.

Another difference is that it describes the use of "splitter" which you'll need to use unless working with trivially small files - but as escada suggests I'd definitely try a very small area first to see if that works. I've always (just out of habit) created .osm.gz files from splitter so may never actually have tested .pbf processing by mkgmap (though if the documentation says it works, I'm sure it does).

permanent link

answered 24 May '17, 20:02

SomeoneElse's gravatar image

SomeoneElse ♦
33.0k65343778
accept rate: 16%

edited 24 May '17, 20:06

At first I followed the manual and downloaded and try to install mkgmap. But it failed :

java -jar mkgmap.jar --help=options Exception in thread "main" java.lang.UnsupportedClassVersionError: uk/me/parabola/mkgmap/main/Main : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:643) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:277) at java.net.URLClassLoader.access$000(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:212) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:323) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:268) Could not find the main class: uk.me.parabola.mkgmap.main.Main. Program will exit.

So it tried apt-get and that was successful for me.

(24 May '17, 20:26) bernard123
0

I automated the use of mkgmap and splitter for my specific needs, I use it to create custom cycling maps for my Garmin Edge devices. If that’s what you’re looking for, check it out @ https://youtu.be/1lc-mW3cKkA

permanent link

answered 20 Mar '19, 17:58

wcruz's gravatar image

wcruz
111
accept rate: 0%

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:

×51
×6

question asked: 24 May '17, 11:47

question was seen: 6,949 times

last updated: 20 Mar '19, 17:58

powered by OSQA