logo separator

[mkgmap-dev] Options file

From Mike Baggaley mike at tvage.co.uk on Thu Jun 4 08:46:00 BST 2020

HI Gerd, I think adding "Was it meant as an option?" would be more
confusing, especially as --name is not a valid option. You could possibly
check the filename against the valid list of options and if it matches
include something like "Did you intend --<name>? However, the current short
message seems fine to me. For the particular case here, I think the best
improvement would be to indicate that the --list option ends in a comma and
hence has a missing value.

Regards,
Mike

-----Original Message-----
From: Gerd Petermann [mailto:gpetermann_muenchen at hotmail.com] 
Sent: 04 June 2020 06:11
To: daveswarthout at gmail.com
Cc: Development list for mkgmap <mkgmap-dev at lists.mkgmap.org.uk>
Subject: Re: [mkgmap-dev] Options file

Hi Dave,

I fear we can document whatever we want, this misunderstanding happens again
and again. With the --style option it is very obvious and the user will find
out. With
other options like --link-pois-to-ways it might take longer as its effect is
not so obvious.
Maybe mkgmap should warn once when such an option is not the same for all
processed tiles?

I've changed the error message a little bit : Severe(Main): name: input file
'name' doesn't exist.
Maybe it should be changed to "SEVERE (Main): name: input file 'name'
doesn't exist. Was it meant as an option?" because the "filename" has no dot
and thus no extension?

Gerd

________________________________________
Von: Dave Swarthout <daveswarthout at gmail.com>
Gesendet: Donnerstag, 4. Juni 2020 01:11
An: Gerd Petermann
Cc: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Options file

I agree that the bit about parm placement should not be repeated. I saw and
read the text you provided but for some reason associated it more with
splitter rather than mkgmap as a whole. It doesn't stand out very well the
way it's written now. My bad.

Also, I think it would be good if the filename in the error message was
enclosed in quotes. Again, it might be obvious to you developers that "file
name" is different than "filename" but it wasn't to me. If the message had
said "SEVERE (Main): name: file "name" doesn't exist, it would have been so
much more helpful.

I'm all set now. Thanks very much, Gerd.

Dave

On Wed, Jun 3, 2020 at 10:24 PM Gerd Petermann
<gpetermann_muenchen at hotmail.com<mailto:gpetermann_muenchen at hotmail.com>>
wrote:
Hi Dave,

See r4511.
I don't know if it helps, command line parsing depends on the OS / used
shell as well.
On windows this change allows to use  --name-tag-list="name:de,name:en,
name"

Reg. your other question about the documentation of the importance of order
in the options: This is documented and it is true for almost all options, so
it makes no sense to repeat the hint for each option:
"The order of the options is significant in that options only apply to
subsequent input files. If you are using splitter, you probably will need to
put most of your options before '-c template.args' (this file is generated
by
splitter). "

Gerd

________________________________________
Von: Dave Swarthout
<daveswarthout at gmail.com<mailto:daveswarthout at gmail.com>>
Gesendet: Mittwoch, 3. Juni 2020 16:59
An: Gerd Petermann
Cc: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Options file

OMG!  An extra space?

Yep, that fixed it. Is there some way to make the processing of that parm
string more robust?

Thank you for your quick response.

On Wed, Jun 3, 2020 at 6:01 PM Gerd Petermann
<gpetermann_muenchen at hotmail.com<mailto:gpetermann_muenchen at hotmail.com><mai
lto:gpetermann_muenchen at hotmail.com<mailto:gpetermann_muenchen at hotmail.com>>
> wrote:
Hi Dave,

I think there is a superflous space in the name-tag-list before name:
name:en,loc_name:en,int_name,alt_name:en,short_name:en, name

This means that mkgmap searches for an input file with the name 'name' and
that also explains the error message.

Gerd

________________________________________
Von: mkgmap-dev
<mkgmap-dev-bounces at lists.mkgmap.org.uk<mailto:mkgmap-dev-bounces at lists.mkgm
ap.org.uk><mailto:mkgmap-dev-bounces at lists.mkgmap.org.uk<mailto:mkgmap-dev-b
ounces at lists.mkgmap.org.uk>>> im Auftrag von Dave Swarthout
<daveswarthout at gmail.com<mailto:daveswarthout at gmail.com><mailto:daveswarthou
t at gmail.com<mailto:daveswarthout at gmail.com>>>
Gesendet: Mittwoch, 3. Juni 2020 12:33
An: Development list for mkgmap
Betreff: [mkgmap-dev] Options file

This is a two-part question.
Firstly:
I have been trying to change my compilation method to use a config file but
am having problems. During my experimentations I managed to insert the style
file directive "--style-file=directory|zip-filename|url" _after_ the
filespec for the OSM data file. My map compiled without errors but was not
using my styles. I was very confused because it had always worked before. It
took me 20 or 30 minutes to discover that I had accidentally "misplaced" my
style file parameter in the mkgmp parameter list. Once I moved it in front
of the filespecs for my OSM data file and custom TYP file, all was well
again.

I am assuming that the "options" file included with every mkgmap download is
the primary help file for running mkgmap. So I guess I'm asking if someone
would please add a sentence to the options file where the use _and
placement_ of the style file parameter is explained more completely. The way
it is now, one cannot know that the placement of that parameter is
important. Apparently,  the placement of ALL parameters must come before any
filespecs in the mkgmap invocation but that important fact isn't obvious (at
least to me) from reading the options help file.

A line saying "the style file parameter must appear before any references to
a file specification for input data or custom TYP file." inserted just after
the "=== Style options ===" section divider would be very helpful

Or perhaps a line at the very top of the options file saying "Note: all
options specified herein must appear on the mkgmap invocation before any
reference to an OSM input file or a custom TYP file."

*******************************************
Secondly:

The problem I'm having with using a configuration file might be related to
file specifications, but I'm not sure. My first try used the filespecs in
quotes as they appear in my parm specification. That didn't work. When I
compile a map using the scenario below, mkgmap produces an error saying
"SEVERE (Main): name: file name doesn't exist" but does not supply a
filename. Not very helpful.

Here is my mkgmap invocation string and the configuration file I'm trying to
employ:

java -Xmx4000m -jar mkgmap.jar  -c DJS.cfg --family-id=18028
--name-tag-list=name:en,loc_name:en,int_name,alt_name:en,short_name:en, name
--description="Lanna" --country-name=THAILAND --country-abbr=THA
"C:\Users\alask\Downloads\Maps\Lanna.osm"
"C:\Users\alask\Dropbox\Mapping\24983djs.TYP"

And the config file: DJS.cfg follows:

gmapsupp
route
index
bounds=C:\Users\alask\Downloads\Maps\bounds.zip
precomp-sea=C:\Users\alask\Downloads\Maps\sea.zip
generate-sea=land-tag=natural=background
location-autofill=is_in,nearest
housenumbers
max-jobs
drive-on=detect
add-pois-to-areas
link-pois-to-ways
process-destination
process-exits
code-page=1252
check-routing-island-len=700
remove-ovm-work-files
#road-name-config=mkgmap-rel/examples/roadNameConfig.txt
split-name-index
make-opposite-cycleways
order-by-decreasing-area
style-file=C:\Users\alask\Dropbox\Mapping\DJS_styles

I'm sure you experts will easily see what I'm doing wrong. Thanks in
advance.

Cheers,

Dave

--
Dave Swarthout
Homer, Alaska
Chiang Mai, Thailand
Travel Blog at http://dswarthout.blogspot.com


--
Dave Swarthout
Homer, Alaska
Chiang Mai, Thailand
Travel Blog at http://dswarthout.blogspot.com


--
Dave Swarthout
Homer, Alaska
Chiang Mai, Thailand
Travel Blog at http://dswarthout.blogspot.com




More information about the mkgmap-dev mailing list