Assistance in forming bat file for mkgmap

Below is the entire contents of my bat file for processing a map to be installed in mapsource. The bat presently emits only 1 file: 63420000_mdr.img not the 4 that I need. Also, the processor complains "could not open file: No file name, just that text followed by a series of lines that seem to indicate the internal subroutine that threw the exception. Are there any obvious errors in my bat file?

//-----------------------bat file contents follow
java.exe -Xmx512M -enableassertions -jar “c:\Garmin\Map_Tools\MKGMAP\mkgmap.jar” --max-jobs=12 --ignore-osm-bounds --route --family-id=2000 --overview-mapname=63240000 --tdbfile --index --keep-going --drive-on-right --overview-mapnumber=63240000 --family-name=“OSM Routable” --series-name=" " " " c:\Garmin\Maps\OSM_World_Routable*.img"

//-----------------------end bat file contents

Maybe use c:\Garmin\Map_Tools\MKGMAP\mkgmap.jar without double \ ?

What are you trying to do? What are the four files that you need? I think all the double quotes everywhere may be confusing things. You don’t need any in the file-path for mkgmap, nor in the path to the img files.

Not sure why you’re using an empty series-name either. You might as well just not use the --series-name option. And unless you specifically want to limit mkgmap to using 12 processors, just use --max-jobs instead. -enableassertions can be abbreviated to -ea

OK took the input above and revised the bat file to the text below:
…bat file follows------------------------------------------
java.exe -Xmx512M -enableassertions -jar c:\Garmin\Map_Tools\MKGMAP\mkgmap.jar --max-jobs --ignore-osm-bounds --route --family-id=2000 --overview-mapname=63240000 --tdbfile --index --keep-going --drive-on-right --overview-mapnumber=63240000 --family-name=“OSM Routable” c:\Garmin\Maps\OSM_World_Routable*.img

//end bat text ---------------------------------------------------

the processor chuntered along and quietly emiittted the following 4 files, as expected


Copied into mapsource directory with the .img files. Mapsource failed to start, with the following message:

“There is a problem with mapsource. reinstall and try again.”
deleted the 4 files, replaced the 4 generated by the mapsource installer, all is fine with mapsource and the original maps(not the ones I am trying to compile)

What I am trying to do is compile the .img files contained in the directory noted into a madsource installation.

Try changing the name to a different 8 digit number, and use the MapSetToolKit “Install” button to set up a new map family. cdsf has pointed out that once TDB files have been created you can use MSTK to create the appropriate registry settings.

I see the option in mapsetoolkit. There’s a mapsetname, Family ID product code and registry name. Do they all need to be unique and separate from the other mapsets installed?

If you hit the “Install” button (bottom right of window) a second window will pop up. Browse for the locations of the TDB file, the overview map, and the map directory. Most of the boxes will fill in automatically. I think the only thing you will need to fill in is the registry name. I use a one word contraction of the mapset name for that.

Looked several times at your batfile but cannot figer out next question: Would you be as kind as to explain what the input is for mkgmap? On which files (full path please) is it acting?

And in which directory does it put the four mentioned files?

This is the location o the input IMG files that mapsource is processing

Processor drops the output files on the root of my c drive. Have intended to add lines to relocate them once i get a successfull build. (along with opening lines to delete old files prior to starting build) future polishing.

Family ID and registry name must be unique for every mapset installed, otherwise you’ll get MapSource errors like the one you quoted above.

So all .img files in that directory are taken?! The one who does that is mkgmap … i think, because thats the one you invoke.

But why there? What in the batfile causes that? Or is it implicit in mkgmap or what else? Is your commandprompt
running from C:?

My mistake, it actually drops into the desktop. believe that is because that is where the .bat file sits and is the “current directory” when the bat runs. I will try and relocate the .bat file to verify that is what controls the destination path.

ok, my process is now successful. Relocated the bat file to the osm directory with the img files and placed a shortcut on the desktop. Now drops files directly into the directory with the .img files. Thanks for all your help.