OpenStreetMap Forum

The Free Wiki World Map

You are not logged in.

#1 2011-12-12 22:10:24

Newbie Map Creator

Hi
Just getting into OSM and am now beginning to feel my way around. I have just bought a Garmin Monatana and was really disapointed with the GB Discoverer software that came with it which made me look here.
My primary use for the device is cycle touring, I wish to see cafes, cycle shops, tea rooms, campsites, hotels etc as poi's on my map. Also, I prefer to a white background so that its easier to see, the coloured contoured lines make reading difficult in low light conditions.
Anyway, I downloaded OSM maps for UK without contours from TalkyToaster and am impressed. What I now want is to be able to show my specific poi's on my map.
I have managed to cut tiles from maps, converted them from OSM to IMG files but now need a simple beginners guide on how to style these maps. I have searched through the Wiki pages and have ended up knee deep in bookmarks!!!
Can anyone point me in the right direction.

Cheers
Rich

Offline

#2 2011-12-13 06:22:32

Re: Newbie Map Creator

You should try the site Garmin Openstreetmap : Can be found here : http://garmin.openstreetmap.nl/


Walk the planet

Offline

#4 2011-12-14 22:26:37

Re: Newbie Map Creator

Thanks for those links, plenty there to read and learn, should keep me going for a while.

Offline

#5 2011-12-29 12:28:58

Re: Newbie Map Creator

Hi
I have spent a little while now trying to get my maps to the style i want without any success. The problem I am having is that I can download a tile of the area of the map that I am interested in, no problem.
Then after reading the tutorials I am trying to add a style to the map using Mkgmap. I found an existing style (Funky Munky) which appears to do what I want. When I run the programme it reduces the file size down to from 9580KB to 11kb. I have followed instructions in tutorials but cant seem to get anywhere. I used a progromme called Img2typ to look at the 11KB file and its not loading so I guess the problem is with the way I am using mkgmap.
These are my paths:
c:/mapping/mkgmap-r2148 inside this folder I place my fresh downloaded gmapsupp.img file
Style file path
c:/mapping/mkgmap-r2148/examples/styles/munky_styles
Typ file is at level c:/mapping/mkgmap-r2148

I then issue this command at dos prompt
java -jar mkgmap.jar --gmapsupp --style-file=examples/styles/munky_styles munky.typ

Can anyone see what I am doing wrong, its driving me mad :-)

Offline

#6 2011-12-29 13:47:24

Re: Newbie Map Creator

richlewt wrote:

These are my paths:
c:/mapping/mkgmap-r2148 inside this folder I place my fresh downloaded gmapsupp.img file
Style file path
c:/mapping/mkgmap-r2148/examples/styles/munky_styles
Typ file is at level c:/mapping/mkgmap-r2148

I then issue this command at dos prompt
java -jar mkgmap.jar --gmapsupp --style-file=examples/styles/munky_styles munky.typ

Can anyone see what I am doing wrong, its driving me mad :-)

That way it will not work. The correct workflow is:

- load osm raw data from cloudmade or Geofabrik
- maybe cut it with osmosis or osmconvert to the area you desire
- tile it with splitter
- convert it with mkgmap to several .img, specifiying the folder where the splitter output is
- join them to a gmapsupp, specifiying the imgs created in the step before
(The last two steps can also be done in one)

If you take someone elses gmapsupp, you can split that with gmaptool, but you can only change the TYP file a bit, and put it all togehter again with the last step mentioned above.

If you want to change the style itself, you have to start at the beginning with the osm data.

HTH
ajoessen

Last edited by ajoessen (2011-12-29 13:48:00)

Offline

#7 2012-01-02 07:21:17

csdf
Senior Member
From: UK, living in Abu Dhabi
Registered: 2009-08-11
Posts: 314
Website

Re: Newbie Map Creator

ajoessen is right - you need to start with OSM data (in XML or PBF format) if you want to apply a style using mkgmap.  See also my workflow here:
http://www.cferrero.net/maps/step_by_step.html

Offline

#8 2012-01-02 20:58:04

Re: Newbie Map Creator

csdf wrote:

ajoessen is right - you need to start with OSM data (in XML or PBF format) if you want to apply a style using mkgmap.  See also my workflow here:
http://www.cferrero.net/maps/step_by_step.html

Thanks for posting that, I will now download these batch files and try and run them through. No doubt I will be back with some more questions. :-)

Offline

#9 2012-01-04 21:28:01

Re: Newbie Map Creator

Hi
Right, I started off by going to Geofabrik and downloaded the latest copy of england.osm.pbf 310,463KB
Then renamed it to gcc_20120104.osm.pbf
Placed the splitter.bat file in my splitter-r195 folder and ran it.
This is the log from my command prompt window



Enter year_month_day of latest OSM data or hit 1 to accept gcc_20120104.osm.pbf:
1
cache=./cache
description=
geonames-file=cities15000.zip
legacy-mode=false
mapid=63247001
max-areas=255
max-nodes=1500000
max-threads=2 (auto)
mixed=false
no-trim=false
output=pbf
output-dir=
overlap=2000
resolution=13
split-file=
status-freq=120
write-kml=
Elapsed time: 0s   Memory: Current 15MB (1MB used, 14MB free) Max 483MB
Time started: Wed Jan 04 19:20:00 GMT 2012
Map is being split for resolution 13:
- area boundaries are aligned to 0x800 map units
- areas are multiples of 0x1000 map units wide and high
Processing gcc_20120104.osm.pbf
Bounding box -7.748030000000001 48.97894 2.361859 56.08932
10,000,000 nodes processed... id=700993596
20,000,000 nodes processed... id=1234745152
1,000,000 ways processed... id=35806743
2,000,000 ways processed... id=81214974
3,000,000 ways processed... id=122727201
in 1 file
Time: Wed Jan 04 19:21:17 GMT 2012
Exact map coverage is (48.978939056396484,-7.748022079467773) to (56.08930349349
9756,2.3618459701538086)
Trimmed and rounded map coverage is (48.9990234375,-7.7783203125) to (56.1181640
625,2.3291015625)
Splitting nodes into areas containing a maximum of 1,500,000 nodes each...
Area (48.9990234375,-7.7783203125) to (52.2509765625,-3.5595703125) contains 1,0
10,022 nodes. DONE!
Area (48.9990234375,-3.5595703125) to (52.2509765625,-2.5048828125) contains 1,2
80,269 nodes. DONE!
Area (49.1748046875,-2.5048828125) to (50.8447265625,-1.0107421875) contains 569
,149 nodes. DONE!
Area (50.8447265625,-2.5048828125) to (51.2841796875,-1.0107421875) contains 1,3
33,501 nodes. DONE!
Area (51.2841796875,-2.5048828125) to (51.7236328125,-1.0107421875) contains 850
,193 nodes. DONE!
Area (51.7236328125,-2.5048828125) to (52.2509765625,-1.0107421875) contains 1,0
20,917 nodes. DONE!
Area (49.2626953125,-1.0107421875) to (51.1083984375,2.2412109375) contains 726,
801 nodes. DONE!
Area (51.1083984375,-1.0107421875) to (51.5478515625,-0.5712890625) contains 678
,115 nodes. DONE!
Area (51.1083984375,-0.5712890625) to (51.5478515625,-0.1318359375) contains 1,0
04,954 nodes. DONE!
Area (51.1083984375,-0.1318359375) to (51.5478515625,0.3076171875) contains 759,
315 nodes. DONE!
Area (51.1083984375,0.3076171875) to (51.5478515625,2.3291015625) contains 789,7
72 nodes. DONE!
Area (51.5478515625,-1.0107421875) to (52.2509765625,-0.3955078125) contains 795
,405 nodes. DONE!
Area (51.5478515625,-0.3955078125) to (52.2509765625,0.2197265625) contains 1,28
6,042 nodes. DONE!
Area (51.5478515625,0.2197265625) to (52.2509765625,0.8349609375) contains 757,3
37 nodes. DONE!
Area (51.5478515625,0.8349609375) to (52.2509765625,2.3291015625) contains 1,289
,869 nodes. DONE!
Area (52.2509765625,-6.3720703125) to (53.3935546875,-2.5048828125) contains 561
,764 nodes. DONE!
Area (52.2509765625,-2.5048828125) to (52.6025390625,-1.9775390625) contains 395
,921 nodes. DONE!
Area (52.2509765625,-1.9775390625) to (52.6025390625,-1.5380859375) contains 1,3
75,758 nodes. DONE!
Area (52.6025390625,-2.5048828125) to (53.3935546875,-1.5380859375) contains 1,2
53,716 nodes. DONE!
Area (53.3935546875,-7.7783203125) to (55.5908203125,-2.7685546875) contains 800
,487 nodes. DONE!
Area (53.3935546875,-2.7685546875) to (53.6572265625,-1.5380859375) contains 617
,643 nodes. DONE!
Area (53.6572265625,-2.7685546875) to (54.1845703125,-1.5380859375) contains 1,0
28,516 nodes. DONE!
Area (54.1845703125,-2.7685546875) to (56.1181640625,-1.5380859375) contains 1,1
64,307 nodes. DONE!
Area (52.2509765625,-1.5380859375) to (52.6904296875,-0.3076171875) contains 604
,599 nodes. DONE!
Area (52.6904296875,-1.5380859375) to (53.1298828125,-0.3076171875) contains 1,1
60,427 nodes. DONE!
Area (52.2509765625,-0.3076171875) to (53.1298828125,0.7470703125) contains 672,
804 nodes. DONE!
Area (52.2509765625,0.7470703125) to (53.1298828125,2.3291015625) contains 846,5
23 nodes. DONE!
Area (53.1298828125,-1.5380859375) to (53.6572265625,2.3291015625) contains 1,39
5,349 nodes. DONE!
Area (53.6572265625,-1.5380859375) to (55.8544921875,2.3291015625) contains 1,23
5,248 nodes. DONE!
Error opening or reading file java.io.FileNotFoundException: cities15000.zip (Th
e system cannot find the file specified)
java.io.FileNotFoundException: cities15000.zip (The system cannot find the file
specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at java.io.FileInputStream.<init>(FileInputStream.java:97)
        at uk.me.parabola.splitter.Utils.openFile(Utils.java:86)
        at uk.me.parabola.splitter.geo.CityLoader.load(CityLoader.java:49)
        at uk.me.parabola.splitter.Main.nameAreas(Main.java:315)
        at uk.me.parabola.splitter.Main.split(Main.java:167)
        at uk.me.parabola.splitter.Main.start(Main.java:118)
        at uk.me.parabola.splitter.Main.main(Main.java:107)
Time finished: Wed Jan 04 19:21:17 GMT 2012
Total time taken: 76s
Press any key to continue . . .

Seems like I'm missing something. Any help would be most appreciated. This is turning into a real challenge now!!

Offline

#10 2012-01-05 07:21:21

csdf
Senior Member
From: UK, living in Abu Dhabi
Registered: 2009-08-11
Posts: 314
Website

Re: 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)

Last edited by csdf (2012-01-05 07:22:03)

Offline

#11 2012-01-05 22:36:28

Re: Newbie Map Creator

csdf wrote:

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.

Offline

#12 2012-01-06 09:33:20

Re: Newbie Map Creator

richlewt wrote:

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

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

But your current problem is:

Failed to open logging config file logging.properties
Could not open file: 63247001.osm.gznull

which has to do with the script you use.

HTH,
ajoessen

Last edited by ajoessen (2012-01-06 09:40:01)

Offline

#13 2012-01-06 12:59:16

csdf
Senior Member
From: UK, living in Abu Dhabi
Registered: 2009-08-11
Posts: 314
Website

Re: Newbie Map Creator

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/ … properties

Last edited by csdf (2012-01-06 13:00:27)

Offline

#14 2012-01-06 16:01:35

Re: Newbie Map Creator

csdf wrote:

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/ … 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

Offline

#15 2012-01-07 15:54:16

Re: Newbie Map Creator

csdf wrote:

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/ … properties

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 :-)

Offline

#16 2012-01-08 07:27:26

csdf
Senior Member
From: UK, living in Abu Dhabi
Registered: 2009-08-11
Posts: 314
Website

Re: Newbie Map Creator

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

Last edited by csdf (2012-01-08 07:41:32)

Offline

#17 2012-01-08 07:29:18

csdf
Senior Member
From: UK, living in Abu Dhabi
Registered: 2009-08-11
Posts: 314
Website

Re: Newbie Map Creator

ajoessen wrote:
csdf wrote:

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/ … 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

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.

Offline

#18 2012-01-09 10:03:47

Re: Newbie Map Creator

csdf wrote:
ajoessen wrote:

I wonder if anyone else uses that method.

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

Offline

#19 2012-01-09 10:59:07

Re: Newbie Map Creator

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 ;-)

Last edited by ligfietser (2012-01-09 10:59:31)

Offline

#20 2012-01-09 11:24:27

Re: Newbie Map Creator

ligfietser wrote:

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 ;-)

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 ;-) )

Greetings,
ajoessen

Offline

#21 2012-01-09 12:03:09

Re: Newbie Map Creator

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.

Offline

#22 2012-01-09 13:02:54

csdf
Senior Member
From: UK, living in Abu Dhabi
Registered: 2009-08-11
Posts: 314
Website

Re: Newbie Map Creator

ligfietser wrote:

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.

Offline

#23 2012-01-09 13:19:10

Re: Newbie Map Creator

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

ajoessen wrote:

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.

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 ;-)

Last edited by ligfietser (2012-01-09 13:21:57)

Offline

#24 2012-01-09 13:40:43

Re: Newbie Map Creator

ligfietser wrote:

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

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

Offline

#25 2012-01-09 14:30:06

Re: Newbie Map Creator

@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?

Last edited by ligfietser (2012-01-09 14:30:20)

Offline

Board footer

Powered by FluxBB 1.4.8
Hosting sponsored by Oxilion