You are not logged in.

Announcement

*** NOTICE: forum.openstreetmap.org is being retired. Please request a category for your community in the new ones as soon as possible using this process, which will allow you to propose your community moderators.
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.***

#1 2011-02-24 17:27:46

Yggdrasil
Member
Registered: 2010-09-12
Posts: 187

Specifying typfiles in options file for mkgmap

Hi,

i'm setting up a multi-layer biking map. Does one know how to integrate .typ-files into a options file? for example:

start /b /wait /low java -Xmx%heap% -ea -esa -jar ..\..\tools\mkgmap.jar %params_general% --style-file=..\..\styles\active\ways -c ..\..\styles\active\ways\options.args ..\..\%datasource% 2>..\..\error.txt

with options.args:

charset:latin1
product-id:1
ignore-osm-bounds
country-name:Deutschland
country-abbr:DE
add-pois-to-areas
family-id:42
description:OSMWays
family-name:OSMWays
transparent
draw-priority:10
route
ignore-maxspeeds
ignore-turn-restrictions
remove-short-arcs:3
road-name-pois
input-file:0000010042.TYP  <--- seems to be ignored
mapname:65000000

The options.args is generated dynamically by a script. I tried input-file (seems to be ignored when the ending is .TYP), typ-file, typfile. Found no documentation about this. Of course, the file 0000010042.TYP (capital TYP!) is present and contains the right family-id.

And - if it once will work - i found out the following:
Each separate .img contains a typ file with the appropriate family-id. These individual .typ's are overwritten in the final step when they are combined with mkgmap to a gmapsupp (http://www.mkgmap.org.uk/pipermail/mkgm … 04981.html). I'd like to use mkgmap as it can easily be controlled by script-generated .args file.  gmt could be an alternative but it doesn't support giving names to layers - or does it?

Does one have experience with that? After several hours I'm getting a bit frustrated...

Thanks,
Manfred

Offline

#2 2011-02-24 18:44:01

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

Re: Specifying typfiles in options file for mkgmap

Just add the TYP file as an extra argument at the end of your mkgmap call:
java - jar mkgmap.jar -c \path\to\your\options.args yourtyp.TYP

Last edited by csdf (2011-02-24 18:44:24)

Offline

#3 2011-02-26 10:21:47

Yggdrasil
Member
Registered: 2010-09-12
Posts: 187

Re: Specifying typfiles in options file for mkgmap

thanks, csdf

I tried this before, and it works as long as the .TYP file is fixed text. I had the problem that the .TYP filename is generated dynamic in a loop in a windows batch script (it searches for an existing .TYP file in the directory which may be empty, and looks for the same file in the central typfile directory so I don't have lots of copies of .TYP files for every style)
The command call for mkgmap seems to be generated before the loop is executed - changes via SET in the loop, don't take effect on the generated command line.
I fixed it by generating a temporary batch file. Not nice but it works. Batch programming sucks...

Offline

#4 2011-03-01 20:55:06

Mark_S
Member
Registered: 2009-04-27
Posts: 31

Re: Specifying typfiles in options file for mkgmap

Yggdrasil wrote:

Batch programming sucks...

If it helps I've recently swapped from scripting with windows batch files to scripting with AutoIt to get round some of the problems you described. So you might want to try an alternative scripting language.

Offline

Board footer

Powered by FluxBB