Newbie Map Creator

Yes, you’re missing the cities15000.zip file which you can get from here:
http://download.geonames.org/export/dump/

This contains coords for major cities around the world and means splitter can name each tile it creates according to the largest city it contains.

See also the bottom of
http://www.cferrero.net/maps/splitter_advanced.html (the bit about --geonames)

Thanks for that. Success, I have now split the england map…
Now for the next part.
Think I am having some path issues, I will explain my paths.
c:/mapping/mkgmap-r2148 is where I am running the next stage. At this level I have placed all the *.osm.pbf files along with
template.args, options_GCC_GPS.args (copied from your webpage), mkgmap.jar.
Style files etc are located c:/mapping/mkgmap-r2148/examples/styles/munky_styles (this is a style I found that should give me everything I am after) inside this folder is also the munky.typ file.
The first 30 lines of the mkgmap batch file look like this:

@echo off
REM Batch file to launch mkgmap and compile GCC basemap tiles
setlocal

REM set mkgmap version
set mkgmapVer=-r2148

REM set inputs
set stylefile=/examples/styles/munky_styles
set optionsFile=options_GCC_GPS.args

REM TYP file
set typfile=“/examples/styles/munky_styles/munky.typ”
rem set typfile=“…/…/TYP files/mapnik/mapnik2.TYP”

call :GETDATEPARTS “%date%”
call :GETTIMEPARTS

REM run mkgkap
@echo Running mkgmap

@echo on
rem enable logging properties
java -Xmx1500m -ea -Dlog.config=logging.properties -jar mkgmap.jar --style-file=%stylefile% -c %optionsFile% %typfile%
rem standard compile
REM java -Xmx1500m -ea -jar mkgmap.jar --style-file=%stylefile% -c %optionsFile% %typfile%
rem default style, no TYP
rem java -Xmx1500m -ea -jar mkgmap.jar -c %optionsFile%

@echo off
@echo mkgmap finished: copying gmapsupp

I have tried modifying some of the paths to hopefully match my set up.
Then when I run this is the log file:

C:\mapping\mkgmap-r2148>mkgmap.bat
Running mkgmap

C:\mapping\mkgmap-r2148>rem enable logging properties

C:\mapping\mkgmap-r2148>java -Xmx1500m -ea -Dlog.config=logging.properties -jar
mkgmap.jar --style-file=/examples/styles/munky_styles -c options_GCC_GPS.args “/
examples/styles/munky_styles/munky.typ”
Failed to open logging config file logging.properties
Could not open file: 63247001.osm.gznull
Exception in thread “main” java.lang.NullPointerException
at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:13
9)
at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:413)
at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.ja
va:126)
at uk.me.parabola.mkgmap.main.Main.main(Main.java:112)

C:\mapping\mkgmap-r2148>rem standard compile

C:\mapping\mkgmap-r2148>REM java -Xmx1500m -ea -jar mkgmap.jar --style-file=/exa
mples/styles/munky_styles -c options_GCC_GPS.args “/examples/styles/munky_styles
/munky.typ”

C:\mapping\mkgmap-r2148>rem default style, no TYP

C:\mapping\mkgmap-r2148>rem java -Xmx1500m -ea -jar mkgmap.jar -c options_GCC_GP
S.args
mkgmap finished: copying gmapsupp
The system cannot find the file specified.
Finished!!!
Press any key to continue . . .


So it seems like it fails to open logging config file logging.properties?

Sorry to be a pain with this, its a great example for someone who is struggling to get to terms with mapping, your splitter instructions and batch files were great and a massive help. I think I need to set my paths up to match your batch files and I guess we should be away.

The TYP-file should always be named xyz.TYP, not .typ. Thats a big difference for the Garmin unit!

But your current problem is:

which has to do with the script you use.

HTH,
ajoessen

That’s right - either you enable the standard compile mkgmap call (the one that is currently REMed out below the call you’re currently making) or you add a file called logging.properties to the working directory
http://www.cferrero.net/maps/downloads/logging.properties

I have made up my workflow wikout your scripts, and found out that I can use several config-files in the same call. So I put my mkgmap-commands in one, and the template.args from the splitter separately behind:


cd img
java -Xmx1500M -jar D:\Karten\OpenStreetMap\mkgmap\mkgmap.jar -c ..\myTopo.cfg -c ..\myTopo-osm\template.args ..\myTopo.TYP

I wonder if anyone else uses that method.

Greetings,
ajoessen

Hi
Pretty close now I think. I have now added logging.properties file. When I run I now get

C:\mapping\mkgmap-r2148>mkgmap.bat
Running mkgmap

C:\mapping\mkgmap-r2148>rem enable logging properties

C:\mapping\mkgmap-r2148>java -Xmx1500m -ea -Dlog.config=logging.properties -jar
mkgmap.jar --style-file=/examples/styles/munky_styles/ -c options_GCC_GPS.args "
/examples/styles/munky_styles/munky.TYP"
Could not open file: 63247029.osm.pbfnull
Could not open style /examples/styles/munky_styles/

C:\mapping\mkgmap-r2148>rem standard compile

Firstly it does not appear to be able to open 63247029.osm.pbf? Where is the “null” at the end of my file name coming from. Secondly, it does not appear to be able to load the style file which seems strange.
Massive learning curve going on here :slight_smile:

So splitter is splitting files and using names 63247001 onwards? And mkgmap has no problem until it gets to 63247029? Is that the last file? If so, make sure there is at least one empty line after it in your option_GCC_GPS.args file (i.e. the last line in that file should be empty about from a hard return) - that might be the source of the null issue. As far as not being able to open the styles file, there must be something wrong with your relative paths. Can you post your folder structure?

Oh, and try removing the trailing / from your definition of the style file path

I like that - I’ll probably integrate that into how I do things as it saves having to copy the details from the template.args whenever the split list changes.

Yes, that was a point that was annoying me. Here in Germany the number of tiles is increasing almost every week.

Greetings,
ajoessen

cool, I didnt know this mkgmap option, I used this in a windows script:
type parameters\mkgmap.args > %argsfile%
type parameters\template.args >> %argsfile%
type parameters\contours.args >> %argsfile%

So this thread is also for a not-so-newbie interesting :wink:

And how did you get the splitter to output in mkgmap.args and contours.args?
I let him split in different folders to avoid overriding template.args.

(Just to ask a question by myself :wink: )

Greetings,
ajoessen

The only file that varies is the template.args file that the splitter produces, the mkgmap.args and contour.args are every update basically the same (unless you want to change it of course).
Contour files I only have to make once and after that you can feed those img’s into the workflow, so you dont need to split them again and again. Of course those tiles dont match anymore with your osm tiles so a better way would be to merge them with the osm data before the splitter process, but thats another discussion.

Does it really matter if the contour tiles don’t exactly match the road tiles? I’m sure I’ve worked in the past with non-overlapping tiles without a problem.

It doesnt matter, but maybe ajoessen can comment on this why he splits contours and osm data:

I think it is a better way to integrate them into one map so you dont have overlapping tiles anymore (confusing for the user).
If you have separate tiles on the other hand, the user can decide whether include contours or not in the gmapsupp.
Like a famous Dutch football player quotes, every disadvantage has its advantages :wink:

Off course I do the contour splitting only once for a specific region. Renaming that template.args might also work. I keep the contour osm.gz in a seperate folder, but the img all togeher in one, so they can be used in baseCamp.

I dont like integrating the contours in the main osm data. For my region I have 7 contour tiles and 27 OSM-tiles.
The first I dont have to compile in future runs. Putting the data together will also make the tile areas even smaller, leading to problems with cross-tile-routing.

While planning a days walking trip, I build a seperate map only for that area, which needs only one osm tile and one contour tile. That way the Garmin unit is easier to handle instead of a nation-wide Map.
For that workflow osm and contours have to be run every time, as the area changes.

Greetings,
ajoessen

@ajoessen: you mentioned earlier in this thread that the TYP extension from the typfile should be in capitals, but I see no problems with typ in lowercase letters. Is this not working good in a specific unit or OS?

It works on BaseCamp and QLandkaretGT, but on the Garmin unit it will not be recognized. You will get a map with standard Garmin type lines and POIs. If your typfile is not much away from that, you might not see it.

Greetings,
ajoessen

Well, I understand you know my Openfietsmap so you can see it is quite different from the standard Garmin types. I’m not using capitals for TYP but I guess Mapsource and mkgmap automatically convert this from typ into TYP as I look into my gmapsupp. I have no experience with Qlandkarte though.

Hi
Been away on holiday for 2 weeks, just returned to see this thread has taken off!!!
To answer your questions.

  1. 63247029 is the last file.
  2. I have made sure that option_GCC_GPS.args file has two empty lines at the end.
  3. Folder structure is
    c:\mapping\mkgmap-r2148 this is where i run my mkgmap.bat from and all the *.osm.pbf files are kept, along with template.args, logging.properties, option_GCC_GPS.args

Style files are located here C:\mapping\mkgmap-r2148\examples\styles\munky_styles at this level I have munky.TYP, lines, options, points etc.

Just done another run with the modified option_GCC_GPS.args file and now get:

C:\mapping>cd mkgmap-r2148

C:\mapping\mkgmap-r2148>mkgmap.bat
Running mkgmap

C:\mapping\mkgmap-r2148>rem enable logging properties

C:\mapping\mkgmap-r2148>java -Xmx1500m -ea -Dlog.config=logging.properties -jar
mkgmap.jar --style-file=/examples/styles/munky_styles -c options_GCC_GPS.args “/
examples/styles/munky_styles/munky.TYP”
Could not open style /examples/styles/munky_styles

C:\mapping\mkgmap-r2148>rem standard compile

C:\mapping\mkgmap-r2148>REM java -Xmx1500m -ea -jar mkgmap.jar --style-file=/exa
mples/styles/munky_styles -c options_GCC_GPS.args “/examples/styles/munky_styles
/munky.TYP”

C:\mapping\mkgmap-r2148>rem default style, no TYP

C:\mapping\mkgmap-r2148>rem java -Xmx1500m -ea -jar mkgmap.jar -c options_GCC_GP
S.args
mkgmap finished: copying gmapsupp
The system cannot find the file specified.
Finished!!!
Press any key to continue . . .

I now notice from line above starting C:\mapping\mkgmap-r2148>REM java -Xmx1500m that the line contains forward and backslashes, is this ok?

Many thanks to all who have taken the trouble to answer. Hopefully other newbies will benefit from all this.

Anyone any clues?