You are not logged in.
- Topics: Active | Unanswered
Announcement
Please create new topics on the new site at community.openstreetmap.org. We expect the migration of data will take a few weeks, you can follow its progress here.***
Pages: 1
#1 2011-08-18 10:40:03
- Jouke1
- Member
- Registered: 2011-03-14
- Posts: 28
mkgmap in windows can't open style-file
On a linux computer I've got mkgmap version 1953 running with my own custom style.
I've got the necesarry files (version, lines, points, etc.) in a directory called "allroadmap". I invoked the style with the options --style-file=allroadmap --style=allroadmap. It works this way on my linux computer.
Now I'm trying to set up mkgmap version 2012 on a spare windows vista laptop in the same way. In the mkgmap directory I created a "allroadmap" directory. Again I use --style-file=allroadmap and --style=allroadmap but it keeps saying: "Could not open style allroadmap".
Offline
#2 2011-08-19 08:52:00
- ligfietser
- Member

- Registered: 2008-10-09
- Posts: 5,353
- Website
Re: mkgmap in windows can't open style-file
Maybe you need to specify the path to the directory like --style-file=c:\mkgmap\allroadmap
BTW Why do you need two --style= and --style-file= arguments? One --style-file should be enough
Offline
#3 2011-08-20 10:18:55
- Jouke1
- Member
- Registered: 2011-03-14
- Posts: 28
Re: mkgmap in windows can't open style-file
Maybe you need to specify the path to the directory like --style-file=c:\mkgmap\allroadmap
BTW Why do you need two --style= and --style-file= arguments? One --style-file should be enough
I tried it all. Forward slashes, backward slashes, trailing slashes, complete paths. Only --style or --style-file, or a combination of the two in different orders. I can't get it to work. I Just downloaded r2012 on my linux computer and I don't have any problems.
Am I the only one who uses mkgmap with a custom style on a windows computer?
Last edited by Jouke1 (2011-08-20 10:20:23)
Offline
#4 2011-08-20 14:04:53
- csdf
- Member
- From: UK, living in Abu Dhabi
- Registered: 2009-08-11
- Posts: 313
- Website
Re: mkgmap in windows can't open style-file
I tried it all. Forward slashes, backward slashes, trailing slashes, complete paths. Only --style or --style-file, or a combination of the two in different orders. I can't get it to work. I Just downloaded r2012 on my linux computer and I don't have any problems.
Am I the only one who uses mkgmap with a custom style on a windows computer?
Nope! Here's my batch file:
@echo off
REM Batch file to launch mkgmap and compile tiles
setlocal
REM set mkgmap version
set mkgmapVer=-r1970
REM set inputs
set stylefile=../../../styles/CF_Mapsource
set optionsFile=options_GCC_Mapsource.args
REM TYP file
set typfile="../../../TYP files/Charlie/CF1423.TYP"
REM run mkgmap
@echo on
java -Xmx1500m -ea -jar ../../../mkgmap/mkgmap%mkgmapVer%/mkgmap.jar --style-file=%stylefile% -c %optionsFile% %typfile%
@echo off
echo Finished!!!
pauseOffline
#5 2011-08-20 15:42:43
- Jouke1
- Member
- Registered: 2011-03-14
- Posts: 28
Re: mkgmap in windows can't open style-file
OMG!
I didn't notice that notepad automaticaly adds a .txt extension ![]()
Last edited by Jouke1 (2011-08-20 15:43:01)
Offline
#6 2011-08-21 08:56:50
- ligfietser
- Member

- Registered: 2008-10-09
- Posts: 5,353
- Website
Re: mkgmap in windows can't open style-file
I don't think Notepad does that but your Windows. Better use notepad++ for editing the style files and something like Total Commander for file management because the default windows programms sucks.
Last edited by ligfietser (2011-08-21 08:57:40)
Offline
#7 2011-08-23 05:51:01
- csdf
- Member
- From: UK, living in Abu Dhabi
- Registered: 2009-08-11
- Posts: 313
- Website
Re: mkgmap in windows can't open style-file
By the way, the --style=foo option only works to select one of the pre-built mkgmap styles that "live" inside the mkgmap.jar file. You cannot use it to select one of your own styles (this is what --style-file=foo is for).
http://wiki.openstreetmap.org/wiki/Mkgm … le_options
Last edited by csdf (2011-08-23 05:51:24)
Offline
Pages: 1